Making a simple pipeline
Adam Goodwin
adam.goodwin.nz at gmail.com
Tue Aug 6 02:39:22 PDT 2013
I don't use Python so excuse me if I'm wrong, but I think the problem is
that you're linking the elements twice.
First you're doing "gst.element_link_many(vsrc, s2)" and then you're doing
"videosrc.link(sinkpad)". It looks like the error you're getting is
complaining that the pads you're trying to link are already linked.
If you get rid of one of those lines I think it will work. (It's probably
easiest to remove all of the pad linking lines, and just keep the simple
"link_many"line).
On Tue, Aug 6, 2013 at 9:03 PM, matt <matheist76 at westnet.com.au> wrote:
> Hi,
>
> This is what I want to do:
>
> videotestsrc --> xvimagesink
>
> I know it's very simple but I appear to be making a mistake somewhere in
> my code. Can someone please help? The code is below
>
> ****************************************************************
> ***************************************
> #!/usr/bin/python
>
> import gobject;
> gobject.threads_init()
> import gst
>
> # Above setup the imports
>
> if __name__ == "__main__":
> # First create our pipeline
> pipe2 = gst.Pipeline("mypipe")
>
> s2 = gst.element_factory_make("**xvimagesink", "screen")
> print s2
> vsrc = gst.element_factory_make("**videotestsrc", "videosrc")
> q1 = gst.element_factory_make("**queue", "qu1")
>
> pipe2.add(vsrc, s2)
> gst.element_link_many(vsrc, s2)
>
> videosrc=vsrc.get_pad('src')
> print videosrc
> sinkpad=s2.get_pad("sink")
> print sinkpad
> videosrc.link(sinkpad)
>
> pipe2.set_state(gst.STATE_**PLAYING)
>
> ****************************************************************
> *************************************
> The error I get is gst.LinkError: <enum GST_PAD_LINK_WAS_LINKED of type
> GstPadLinkReturn>
> now I have used gst-launch-0.10 videotestsrc ! xvimagesink and it works no
> worries. I someone could help me that would be great.
>
> Many thanks Matt
> ______________________________**_________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.**freedesktop.org<gstreamer-devel at lists.freedesktop.org>
> http://lists.freedesktop.org/**mailman/listinfo/gstreamer-**devel<http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130806/4b5f51c6/attachment-0001.html>
More information about the gstreamer-devel
mailing list