audio: Add logging that was useful in figuring out the last commit
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 20 Dec 2021 16:13:25 +0000 (21:43 +0530)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 8 Jan 2022 05:15:30 +0000 (05:15 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1461>

subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioaggregator.c
subprojects/gst-plugins-base/gst/audioresample/gstaudioresample.c
subprojects/gstreamer/libs/gst/base/gstaggregator.c

index 4eb91db..40e569a 100644 (file)
@@ -282,6 +282,7 @@ gst_audio_aggregator_convert_pad_update_converter (GstAudioAggregatorConvertPad
   if (in_info->finfo->format == GST_AUDIO_FORMAT_UNKNOWN) {
     /* If we haven't received caps yet, this pad should not have
      * a buffer to convert anyway */
+    GST_FIXME_OBJECT (aaggcpad, "UNREACHABLE CODE: Unknown input format");
     return;
   }
 
@@ -293,6 +294,7 @@ gst_audio_aggregator_convert_pad_update_converter (GstAudioAggregatorConvertPad
     /* FIXME: Not converting when we need to but the config is invalid (e.g.
      * because the mix-matrix is not the right size) produces garbage. An
      * invalid config should cause a GST_FLOW_NOT_NEGOTIATED. */
+    GST_FIXME_OBJECT (aaggcpad, "Failed to update converter");
     return;
   }
 
@@ -1335,7 +1337,7 @@ gst_audio_aggregator_sink_event (GstAggregator * agg,
       gst_event_parse_segment (event, &segment);
 
       if (segment->format != GST_FORMAT_TIME) {
-        GST_ERROR_OBJECT (agg, "Segment of type %s are not supported,"
+        GST_ERROR_OBJECT (aggpad, "Segment of type %s are not supported,"
             " only TIME segments are supported",
             gst_format_get_name (segment->format));
         gst_event_unref (event);
index f031bb6..fbfb5ca 100644 (file)
@@ -759,6 +759,9 @@ gst_audio_resample_process (GstAudioResample * resample, GstBuffer * inbuf,
   in_len = srcabuf.n_samples;
   out_len = gst_audio_converter_get_out_frames (resample->converter, in_len);
 
+  GST_DEBUG_OBJECT (resample, "in %" G_GSIZE_FORMAT " frames, out %"
+      G_GSIZE_FORMAT " frames", in_len, out_len);
+
   /* ensure that the output buffer is not bigger than what we need */
   gst_buffer_set_size (outbuf, out_len * resample->in.bpf);
 
index cdf8883..b24ef48 100644 (file)
@@ -3016,6 +3016,8 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
   GstFlowReturn flow_return;
   GstClockTime buf_pts;
 
+  GST_TRACE_OBJECT (aggpad, "entering chain internal");
+
   PAD_LOCK (aggpad);
   flow_return = aggpad->priv->flow_return;
   if (flow_return != GST_FLOW_OK)
@@ -3054,7 +3056,7 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
       SRC_UNLOCK (self);
       goto flushing;
     }
-    GST_DEBUG_OBJECT (aggpad, "Waiting for buffer to be consumed");
+    GST_DEBUG_OBJECT (aggpad, "Waiting for buffer to be consumed (chain)");
     GST_OBJECT_UNLOCK (self);
     SRC_UNLOCK (self);
     PAD_WAIT_EVENT (aggpad);
@@ -3112,7 +3114,7 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
   GST_OBJECT_UNLOCK (self);
   SRC_UNLOCK (self);
 
-  GST_DEBUG_OBJECT (aggpad, "Done chaining");
+  GST_TRACE_OBJECT (aggpad, "Done chaining");
 
   return flow_return;
 
@@ -3133,6 +3135,8 @@ gst_aggregator_pad_chain (GstPad * pad, GstObject * object, GstBuffer * buffer)
   GstFlowReturn ret;
   GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
 
+  GST_TRACE_OBJECT (aggpad, "entering chain");
+
   PAD_FLUSH_LOCK (aggpad);
 
   ret = gst_aggregator_pad_chain_internal (GST_AGGREGATOR_CAST (object),