[gst-devel] Switching between videos with input-selector

victor héry victor.hery.polytech at gmail.com
Tue Aug 17 09:41:09 CEST 2010


  Hello

I am trying to code an application with gst python, to allow switching 
between different videos.
The final aim is to stream videos and switch between differents 
qualities or bitrate, according to the bandwith.

For the moment, I use a local display for the tests. I use 2 playbin2 
plugin to play the video easily, and I use 2 bins, one for each playbin, 
to make treatments on the video, such as videoscale and x264enc.
After that, I use a third bin where I put the inputselector to switch 
between the two streams, and the output (local display here).

I made some tests with the inputselector, it works well with just some 
usual plugins, but with the playbin, I have a problem.

You can see in the code that I use ghostpads in order to link the 
differents bins.

But, with all these bins, I have some difficulties to set all the bin 
state to play at the same time.

I try to use a pipeline where I store the two playbins, and then a 
general pipeline, where I store the first pipeline plus the 
inputselector bin.
If I understand correctly Gstreamer, it would allow me to set the 
general pipeline state to Play, and so all the pipeline and bins stored 
in it have the state changed to play, right ?

For the moment, I made some test with the get_state functions, and it 
seems that the playbin play, but the inputselector stays in NULL or 
PAUSED state, without displaying something...

If you have any idea how to deal with such a problem ? How to lauch all 
the pipeline in the same time ?
I join all of the python code.

Don't hesitate to ask question if I was not clear :)

Thank you in advance,

Victor Hery


PS : This technic works well when I use the decode plugin (as theoradec 
for example) instead of playbin, but I have to use h264 decoding videos, 
and I failed to find a correct line to decode with ffdec_h264. And 
unfortunately there is a lack of documentation about this plugin on 
Internet. If you have some ideas about that secific point, I trust I 
could abandon playbin2 and use this instead. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 4140 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100817/61676483/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schema.png
Type: image/png
Size: 13732 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100817/61676483/attachment.png>


More information about the gstreamer-devel mailing list