mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	gst: fix log level of GStreamer debug messages
Messages that are printed for every buffer should use the LOG debug level, while messages that happen during setup and tear down should use the DEBUG debug level. Therefore, use LOG in on_process and when popping buffers and DEBUG when Pipewire adds or removes buffers.
This commit is contained in:
		
							parent
							
								
									d5b1ab9db4
								
							
						
					
					
						commit
						dfa8011ed4
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -359,7 +359,7 @@ on_add_buffer (void *_data, struct pw_buffer *b)
 | 
				
			||||||
  GstPipeWireSrc *pwsrc = _data;
 | 
					  GstPipeWireSrc *pwsrc = _data;
 | 
				
			||||||
  GstPipeWirePoolData *data;
 | 
					  GstPipeWirePoolData *data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  GST_LOG_OBJECT (pwsrc, "add buffer");
 | 
					  GST_DEBUG_OBJECT (pwsrc, "add buffer");
 | 
				
			||||||
  gst_pipewire_pool_wrap_buffer (pwsrc->pool, b);
 | 
					  gst_pipewire_pool_wrap_buffer (pwsrc->pool, b);
 | 
				
			||||||
  data = b->user_data;
 | 
					  data = b->user_data;
 | 
				
			||||||
  data->owner = pwsrc;
 | 
					  data->owner = pwsrc;
 | 
				
			||||||
| 
						 | 
					@ -374,7 +374,7 @@ on_remove_buffer (void *_data, struct pw_buffer *b)
 | 
				
			||||||
  GstBuffer *buf = data->buf;
 | 
					  GstBuffer *buf = data->buf;
 | 
				
			||||||
  GList *walk;
 | 
					  GList *walk;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  GST_LOG_OBJECT (pwsrc, "remove buffer %p", buf);
 | 
					  GST_DEBUG_OBJECT (pwsrc, "remove buffer %p", buf);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  GST_MINI_OBJECT_CAST (buf)->dispose = NULL;
 | 
					  GST_MINI_OBJECT_CAST (buf)->dispose = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -415,7 +415,7 @@ on_process (void *_data)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  h = data->header;
 | 
					  h = data->header;
 | 
				
			||||||
  if (h) {
 | 
					  if (h) {
 | 
				
			||||||
    GST_INFO ("pts %" G_GUINT64_FORMAT ", dts_offset %"G_GUINT64_FORMAT, h->pts, h->dts_offset);
 | 
					    GST_LOG_OBJECT (pwsrc, "pts %" G_GUINT64_FORMAT ", dts_offset %" G_GUINT64_FORMAT, h->pts, h->dts_offset);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (GST_CLOCK_TIME_IS_VALID (h->pts)) {
 | 
					    if (GST_CLOCK_TIME_IS_VALID (h->pts)) {
 | 
				
			||||||
      GST_BUFFER_PTS (buf) = h->pts + GST_PIPEWIRE_CLOCK (pwsrc->clock)->time_offset;
 | 
					      GST_BUFFER_PTS (buf) = h->pts + GST_PIPEWIRE_CLOCK (pwsrc->clock)->time_offset;
 | 
				
			||||||
| 
						 | 
					@ -827,7 +827,7 @@ gst_pipewire_src_create (GstPushSrc * psrc, GstBuffer ** buffer)
 | 
				
			||||||
      goto streaming_stopped;
 | 
					      goto streaming_stopped;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    buf = g_queue_pop_head (&pwsrc->queue);
 | 
					    buf = g_queue_pop_head (&pwsrc->queue);
 | 
				
			||||||
    GST_DEBUG ("popped buffer %p", buf);
 | 
					    GST_LOG_OBJECT (pwsrc, "popped buffer %p", buf);
 | 
				
			||||||
    if (buf != NULL)
 | 
					    if (buf != NULL)
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -857,8 +857,8 @@ gst_pipewire_src_create (GstPushSrc * psrc, GstBuffer ** buffer)
 | 
				
			||||||
  if (GST_CLOCK_TIME_IS_VALID (dts))
 | 
					  if (GST_CLOCK_TIME_IS_VALID (dts))
 | 
				
			||||||
    dts = (dts >= base_time ? dts - base_time : 0);
 | 
					    dts = (dts >= base_time ? dts - base_time : 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  GST_INFO ("pts %" G_GUINT64_FORMAT ", dts %"G_GUINT64_FORMAT
 | 
					  GST_LOG_OBJECT (pwsrc,
 | 
				
			||||||
      ", base-time %"GST_TIME_FORMAT" -> %"GST_TIME_FORMAT", %"GST_TIME_FORMAT,
 | 
					      "pts %" G_GUINT64_FORMAT ", dts %" G_GUINT64_FORMAT ", base-time %" GST_TIME_FORMAT " -> %" GST_TIME_FORMAT ", %" GST_TIME_FORMAT,
 | 
				
			||||||
      GST_BUFFER_PTS (*buffer), GST_BUFFER_DTS (*buffer), GST_TIME_ARGS (base_time),
 | 
					      GST_BUFFER_PTS (*buffer), GST_BUFFER_DTS (*buffer), GST_TIME_ARGS (base_time),
 | 
				
			||||||
      GST_TIME_ARGS (pts), GST_TIME_ARGS (dts));
 | 
					      GST_TIME_ARGS (pts), GST_TIME_ARGS (dts));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue