How to bypass prerolling
sebastian at centricular.com
Mon Feb 17 11:36:29 PST 2014
On Mo, 2014-02-17 at 11:57 +0530, Yogesh Tyagi wrote:
> 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 - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 949 bytes
Desc: This is a digitally signed message part
More information about the gstreamer-devel