[Bug 768510] appsrc: handle pushing custom segments

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jul 29 06:24:41 UTC 2016


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

--- Comment #16 from Seungha Yang <sh.yang at lge.com> ---
(In reply to Sebastian Dröge (slomo) from comment #12)
> Review of attachment 331618 [details] [review]:
> 
> 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.

Because current GstSample implementation uses time-format as a default (please
refer to gst_sample_new() method), I think there is no way to clarify whether
this segment is intentionally or not.

Unlike to the other member variable (caps/buffer/info, they can be NULL),
segment always has value. I can cause uncertainty.
Could we change default format of segment in GstSample to GST_FORMAT_UNDEFINED,
in order to notify that this is not meaningful segment?

Please review patch for GstSample

> 
> @@ +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?

the restriction for random-access stream was removed :)

> 
> @@ +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?
> 

I tried to unify them on top of attachment 332330.

> @@ +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?

complete GstSample will be queued.

-- 
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