[gst-devel] Why auido and video can not play at the same time?

gtxia xia_guangtai at visualon.com
Wed May 23 08:42:57 CEST 2007

On Wed, 2007-05-23 at 07:44 +0200, René Stadler wrote:
> Am Mittwoch, den 23.05.2007, 13:09 +0800 schrieb gtxia:
> > Hello all.
> > 
> > I developed a application to play avi (video is xvid and audio is
> > mp3)file. Use the define to only play video or audio or all. When play
> > only video or audio, this application is OK. But when I want to use it
> > to play all. It seems deadlock. I don't know how to solve this problem.
> > Thanks for any help.
> > 
> > The application codes:
> > 
> <snip code>
> Add queue elements after your demuxer, one for audio and one for the
> video part.  The problem you face is that when the first sink has enough
> data, it blocks while waiting for the pipeline to go from PAUSED to the
> PLAYING state.  This makes the demuxer block while trying to push more
> data into the first sink, which keeps it from pushing any more data --
> in particular to the second sink.  Therefore, the second sink never gets
> enough data to reach the PAUSED state (finish "preroll"), which is why
> playing can never start.
> Adding a queue solves this problem because it adds an additional thread,
> which decouples the data flow.

Thanks your help. It indeed solve my facing problems.



More information about the gstreamer-devel mailing list