appsrc with GST_FORMAT_BYTES cannot query duration

Nicolas Dufresne nicolas.dufresne at gmail.com
Sun Mar 27 01:11:03 UTC 2016


Le samedi 26 mars 2016 à 17:24 -0700, gyunaev a écrit :
> Is apprsrc really format-agnostic, meaning it ignores the caps set? I
> thought the whole purpose of caps is to let the pipeline know about
> the
> format produced by appsrc, so it could use this to convert time,
> duration,
> etc. But this doesn't seem to be the case.

It is, it cannot (and does not) convert bytes to time and vis-versa.
The caps mechanism is also format agnostic, as it can be used by code
that does not know the meaning of the caps (code like appsrc).

Note, a way to get some conversion happening is to use RANDOM_ACCESS
mode instead. Assuming you have an audio sink that support this, in
RANDOM_ACCESS, the audio sink will operate in pull mode. The audio sink
know how to convert time to bytes for seeking. This feature of audio
sink is rarely used though, so don't build too much hope. You are
likely better using TIME format, and doing the conversion yourself.

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


More information about the gstreamer-devel mailing list