parsebin: Minor debug statement updates
authorEdward Hervey <edward@centricular.com>
Wed, 23 Oct 2024 12:24:18 +0000 (14:24 +0200)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Mon, 28 Oct 2024 13:15:40 +0000 (13:15 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7764>

subprojects/gst-plugins-base/gst/playback/gstparsebin.c

index e6bcc955a56f39099354cfc07d2002422d3a663b..57a13334816c2a8d1f329d7daebb0d1a3c009656 100644 (file)
@@ -1597,8 +1597,6 @@ setup_caps_delay:
 
     /* connect to caps notification */
     CHAIN_MUTEX_LOCK (chain);
-    GST_LOG_OBJECT (parsebin, "Chain %p has now %d dynamic pads", chain,
-        g_list_length (chain->pending_pads));
     ppad = g_new0 (GstPendingPad, 1);
     ppad->pad = gst_object_ref (pad);
     ppad->chain = chain;
@@ -1608,6 +1606,8 @@ setup_caps_delay:
     chain->pending_pads = g_list_prepend (chain->pending_pads, ppad);
     ppad->notify_caps_id = g_signal_connect (pad, "notify::caps",
         G_CALLBACK (caps_notify_cb), chain);
+    GST_LOG_OBJECT (parsebin, "Chain %p has now %d dynamic pads", chain,
+        g_list_length (chain->pending_pads));
     CHAIN_MUTEX_UNLOCK (chain);
 
     /* If we're here because we have a Parser/Converter
@@ -4105,9 +4105,15 @@ gst_parse_pad_stream_start_event (GstParsePad * parsepad, GstEvent * event)
   gst_event_parse_stream_flags (event, &streamflags);
 
   if (parsepad->active_stream != NULL &&
-      g_str_equal (parsepad->active_stream->stream_id, stream_id))
+      g_str_equal (parsepad->active_stream->stream_id, stream_id)) {
+    GST_DEBUG_OBJECT (parsepad, "Saw repeat stream id %s", stream_id);
     repeat_event = TRUE;
-  else {
+  } else {
+    if (parsepad->active_stream)
+      GST_DEBUG_OBJECT (parsepad, "Saw a different stream id (%s vs %s)",
+          parsepad->active_stream->stream_id, stream_id);
+    else
+      GST_DEBUG_OBJECT (parsepad, "Saw a new stream_id : %s", stream_id);
     /* A new stream requires a new collection event, or else
      * we'll place it in a fallback collection later */
     gst_object_replace ((GstObject **) & parsepad->active_collection, NULL);