How to bypass prerolling

Sebastian Dröge sebastian at
Mon Feb 17 11:36:29 PST 2014

On Mo, 2014-02-17 at 11:57 +0530, Yogesh Tyagi wrote:
> Hi,
> I tried to remove gstreamer prerolling from my plugin and in READY_TO_PAUSE
> transition I tried to directly set my audio device to PAUSE state which
> failed. Later I found that audio device needs some information about audio
> format to be set before I can set it to PAUSE state.
> I found audio format is set in gst_pad_set_setcaps_function which is not
> being invoked from gstreamer until one audio buffer is received on audio
> pad.This is not letting me set my audio device to PAUSE state and forcing
> me to wait for one audio buffer.
> Is it possible to get this information about audio format without waiting
> for one audio buffer?

Yes, if you use GStreamer 1.x you'll get the caps before any audio
buffers arrive. In 0.10 it's not possible.

But even then, usually an audio buffer needs to be decoded before the
format is really known. See how this very problem is solved in
resindvdbin in 1.x (check the sending of GAP events there).

In 0.10 you're basically lost here.

Sebastian Dröge, Centricular Ltd -
Expertise, Straight from the Source
-------------- 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: <>

More information about the gstreamer-devel mailing list