<div dir="ltr"><div><div>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.<br><br></div>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.<br>
</div><div><br></div><div>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).<br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 9:03 PM, matt <span dir="ltr"><<a href="mailto:matheist76@westnet.com.au" target="_blank">matheist76@westnet.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
This is what I want to do:<br>
<br>
videotestsrc --> xvimagesink<br>
<br>
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<br>
<br>
******************************<u></u>******************************<u></u>******************************<u></u>*******<br>
#!/usr/bin/python<br>
<br>
import gobject;<br>
gobject.threads_init()<br>
import gst<br>
<br>
# Above setup the imports<br>
<br>
if __name__ == "__main__":<br>
  # First create our pipeline<br>
  pipe2 = gst.Pipeline("mypipe")<br>
<br>
  s2 = gst.element_factory_make("<u></u>xvimagesink", "screen")<br>
  print s2<br>
  vsrc = gst.element_factory_make("<u></u>videotestsrc", "videosrc")<br>
  q1 = gst.element_factory_make("<u></u>queue", "qu1")<br>
<br>
  pipe2.add(vsrc, s2)<br>
  gst.element_link_many(vsrc, s2)<br>
<br>
  videosrc=vsrc.get_pad('src')<br>
  print videosrc<br>
  sinkpad=s2.get_pad("sink")<br>
  print sinkpad<br>
  videosrc.link(sinkpad)<br>
<br>
  pipe2.set_state(gst.STATE_<u></u>PLAYING)<br>
<br>
******************************<u></u>******************************<u></u>******************************<u></u>*****<br>
The error I get is gst.LinkError: <enum GST_PAD_LINK_WAS_LINKED of type GstPadLinkReturn><br>
now I have used gst-launch-0.10 videotestsrc ! xvimagesink and it works no worries. I someone could help me that would be great.<br>
<br>
Many thanks Matt<br>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
</blockquote></div><br></div>