pipeline problems - what am I missing?

Gary Thomas gary at mlbassoc.com
Thu Jan 31 07:30:27 PST 2013


On 2013-01-31 01:39, David Röthlisberger wrote:
> 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).
>

Thanks, this helped me get a bit farther along.  What documentation did
you use to learn the python bindings?  I've been through what I could find
and most of it is very thin with little detail...  Yes, I am using the
older 0.10 gstreamer.

Now I need to figure out how to adjust that pipeline for variable streams,
some have audio, some have video, some have both, but I don't know ahead
of time which...  See my related message about recording RTSP streams.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


More information about the gstreamer-devel mailing list