[Bug 768510] appsrc: handle pushing custom segments

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Jul 25 06:54:46 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=768510

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #331618|none                        |needs-work
             status|                            |

--- Comment #12 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 331618:
 --> (https://bugzilla.gnome.org/review?bug=768510&attachment=331618)

Looks better already, thanks for the update :)

::: gst-libs/gst/app/gstappsrc.c
@@ +1871,3 @@
+      /* initialized segment (i.e., gst_segment_init (segment, format))
+       * we don't know whether it's pushed intentionally or not. ignore */
+      GST_LOG_OBJECT (appsrc, "initialized segment, ignore segment");

It might very well be intentional, don't ignore it here.

@@ +1876,3 @@
+      /* if we are here, application pushed segment intentionally for
+       * random-access stream-type. Something wrong, return error */
+      GST_LOG_OBJECT (appsrc, "random-access stream type, error");

Why?

@@ +1904,3 @@
+        gst_caps_unref (g_queue_pop_tail (priv->queue));
+      }
+      gst_caps_replace (&priv->last_caps, caps);

Maybe this code should be unified with the other caps setting code, that is,
maybe always pass a GstSample around. Or does that actually complicate the
code?

@@ +1915,3 @@
+        gst_sample_new (NULL, caps ? gst_caps_ref (caps) : NULL, segment,
NULL);
+    GST_DEBUG_OBJECT (appsrc, "queueing sample %p", new_sample);
+    g_queue_push_tail (priv->queue, new_sample);

Why not just enqueue the complete GstSample and take the buffer out of it on
the other side?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list