mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	Track stream state
Keep track of the stream state better
This commit is contained in:
		
							parent
							
								
									205a471e49
								
							
						
					
					
						commit
						dbeee31c89
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -272,7 +272,7 @@ fdpayload_data_destroy (gpointer user_data)
 | 
			
		|||
  pinos_buffer_builder_end (&b, &pbuf);
 | 
			
		||||
 | 
			
		||||
  GST_OBJECT_LOCK (pinossrc);
 | 
			
		||||
  if (pinossrc->stream)
 | 
			
		||||
  if (pinossrc->stream_state == PINOS_STREAM_STATE_STREAMING)
 | 
			
		||||
    pinos_stream_send_buffer (pinossrc->stream, &pbuf);
 | 
			
		||||
  GST_OBJECT_UNLOCK (pinossrc);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -379,6 +379,10 @@ on_stream_notify (GObject    *gobject,
 | 
			
		|||
 | 
			
		||||
  GST_DEBUG ("got stream state %d", state);
 | 
			
		||||
 | 
			
		||||
  GST_OBJECT_LOCK (pinossrc);
 | 
			
		||||
  pinossrc->stream_state = state;
 | 
			
		||||
  GST_OBJECT_UNLOCK (pinossrc);
 | 
			
		||||
 | 
			
		||||
  switch (state) {
 | 
			
		||||
    case PINOS_STREAM_STATE_UNCONNECTED:
 | 
			
		||||
    case PINOS_STREAM_STATE_CONNECTING:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -61,6 +61,7 @@ struct _GstPinosSrc {
 | 
			
		|||
  PinosMainLoop *loop;
 | 
			
		||||
  PinosContext *ctx;
 | 
			
		||||
  PinosStream *stream;
 | 
			
		||||
  PinosStreamState stream_state;
 | 
			
		||||
  GstAllocator *fd_allocator;
 | 
			
		||||
 | 
			
		||||
  GstBuffer *current;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue