[gst-devel] Manual building of the playbin2.

Stefan Kost ensonic at hora-obscura.de
Tue Apr 13 16:10:31 CEST 2010


wl2776 wrote:
> Stefan Kost consulted me on this question already and recommended to build
> everything from scratch.
>   

And I can only repeat that I don't suggest to hack it into playbin2. I
still propose to have your own toplevel pipeline and use two uridecodebins.

Stefan
> However, I have spent some time on this question already, therefore I wanted
> to come to some logical accomplishment.
>
> So. My task is to play a video and a sound from separate files. Currently I
> have some media files, where DV-video is stored in the AVI container and the
> sound is stored in WAV files with the same name and the .wav extension.
>
> I've built a playbin2 instance with .wav file. This is it: 
> http://n4.nabble.com/file/n1819292/player.png player.png (200kb) ,  
> http://n4.nabble.com/file/n1819292/player.dot player.dot (33kb) .
>
> Then, basing on bus messages, I've detected that video is missing, found and
> added a video stream. This resulted in the following pipeline: 
> http://n4.nabble.com/file/n1819292/0.00.47.167824000-player.png
> 0.00.47.167824000-player.png (480kb) , original dot: 
> http://n4.nabble.com/file/n1819292/0.00.47.167824000-player.dot
> 0.00.47.167824000-player.dot (20kb) .
>
> The algorithm was the following.
> I've created a uridecodebin, set up a new bus, bus watch and no-more-pads
> signal handler.
> Then added this uridecodebin to a playbin2, set it to paused state and
> retrieved all messages until error or EOS occurred, or until no-more-pads
> handler set a special flag, that it has done.
>
> When no-more-pads handler is called, the uridecodebin instance has already
> created an element chain and a proxy pad. The handler finds this pad,
> requests the pad from the playsink (which was created automagically earlier)
> and links them. Then it signals 'reconfigure' to the playsink, and the
> playsink builds a playing chain for this new pad. Then it sets a special
> flag, in order the message loop to finish.
>
> Almost all is complete. Video and audio are playing, and even in sync for
> the first time.
>
> The problem is that this pipeline has a bad reaction to the seek events and
> tries playing, 
> when I pause or stop it. 
> Sound disappears, or plays every time from the beginning.
>
> What else should I set to get sound in place?
>
> I've initially created a playbin2 with the sound file and added a video. I
> didn't experiment with reverse order yet.
>   





More information about the gstreamer-devel mailing list