pipeline problems - what am I missing?

David Röthlisberger david at rothlis.net
Thu Jan 31 00:39:37 PST 2013


On 30 Jan 2013, at 22:38, Gary Thomas wrote:
> 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)


Do you really need all that? What about:

    pipeline = gst.parse_launch(
        "rtspsrc name=src location=rtsp://some.server/url ! "
        "decodebin ! "
        "xvimagesink")

Then if you need to manipulate any of the elements:

    pipeline.get_by_name("src")

etc.

(This is with the 0.10 python bindings; I don't know the python api for
1.0).



More information about the gstreamer-devel mailing list