appsrc with GST_FORMAT_BYTES cannot query duration

Sebastian Dröge sebastian at centricular.com
Fri Mar 25 08:02:53 UTC 2016


On Do, 2016-03-24 at 17:43 -0700, gyunaev wrote:
> Good morning,
> 
> I've set up appsrc with format GST_FORMAT_BYTES, use push signal and set the
> buffer position via buffer->offset and buffer->offset_end. It works fine,
> but the maximum duration is reported.
> 
> However if I also set the "size" property of appsrc, querying the duration
> fails - gst_element_query_duration() returns 0.

In your application you query position/duration in TIME format, but
appsrc can only answer duration queries in BYTES format. If you use
that, it should reply with the value you set for size.

It might make sense to also add a duration property to appsrc that
would be used for replying to the duration query in TIME format though.
If you need that, please file a bug here
  https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer

It's easy to add :)

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160325/42db66d4/attachment.sig>


More information about the gstreamer-devel mailing list