pipeline problems - what am I missing?
Federico Zamperini
fzamperini at tiscali.it
Thu Jan 31 00:55:24 PST 2013
I guess that *_pad_added callbacks are never called because the program
fails before.
You cannot connect statically src, decode and sink element; when src
starts playing it creates the appropriate source pads (you usually don't
know in advance how many streams there are in the rtsp session -- for
example there could be just a video stream, a video stream and two audio
streams etc.)
So remove gst.element_link_many(src, decode, sink) and start the pipeline.
And I suggest to read the gstreamer application manual! ;-)
Cheers
Federico
Il 30/01/2013 23:38, Gary Thomas ha scritto:
> I can run this command successfully:
> # gst-launch rtspsrc location=rtsp://some.server/url ! decodebin !
> xvimagesink
>
> However, when I try to code what I think is the equivalent pipeline in
> Python:
> player = gst.Pipeline("player")
> src = gst.element_factory_make("rtspsrc", "rtsp-src")
> src.connect("pad-added", src_pad_added)
> decode = gst.element_factory_make("decodebin", "decoder")
> decode.connect("pad-added", decode_pad_added)
> sink = gst.element_factory_make("xvimagesink", "image-sink")
> sink.connect("pad-added", sink_pad_added)
> player.add(src, decode, sink)
> gst.element_link_many(src, decode, sink)
>
> it will fail like this:
> File "./client_monitor.py", line 71, in __init__
> gst.element_link_many(src, decode, sink)
> gst.LinkError: failed to link rtsp-src with decoder
>
> Note that I added the 'pad-added' callbacks, but they are never called.
>
> What am I missing here? How can I get this pipeline built?
>
> Thanks
>
More information about the gstreamer-devel
mailing list