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

Luciana Fujii Pontello luciana at holoscopio.com
Wed Aug 18 21:55:28 CEST 2010


On Wed, 2010-08-18 at 11:43 +0300, victor héry wrote:
> Thank you for your answer.
> 
> I didn't know about autovideosink working only with raw video. I used 
> h264enc because the final aim is to stream with H264pay and udp staff.
> For the test I have tried to drop h264enc from the pipeline according to 
> your suggestion, but It seems not to change anything...
> 
> I have already tried decodebin before using playbin, but I had a problem 
> with python, it said "failed to link decodebin and inputselector". I 
> have tried with other plugin, like ffmpegcolorspace, videoscale, .... 
> between decodebin and inputselector and I have the same error.
> 
> Today I have tried uridecodebin like you said, but unfortunatelly I have 
> the same problem that with decodebin. Though it works well with the 
> command line : gst-launch-0.10 uridecodebin uri="file://..." ! 
> input-selector ! autovideosink, without any problems.
> So I think there is a thing to do in python (In C as well ?) to link 
> decodebin or uridecodebin with other plugins, but I really don't know 
> what. I found something about the "new-decoded-pad" signal with 
> decodebin2 in a tutorial (example 6.2 here : 
> http://pygstdocs.berlios.de/pygst-tutorial/capabilities.html), but it 
> didn't work for me :s

Both in C or in python you need to connect to "new-decoded-pad" signal
for decodebin. gst-launch works because it does that for you. I think
the reference for decodebin used to have more information, it's really
not that helpful now.

I think the example in pygst is right. What didn't work for you? Try
using this first in only one branch without input-selector to see if you
got this part right.

To use uridecodebin you need to connect to "pad-added" signal instead,
which is documented in GstElement reference. In short, instead of
(decodebin, pad, islast, data) you have (element, pad, data).

Regards,

Luciana Fujii




More information about the gstreamer-devel mailing list