Making a simple pipeline

matt matheist76 at westnet.com.au
Tue Aug 6 02:03:40 PDT 2013


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


More information about the gstreamer-devel mailing list