title: Playing RTSP with python-gstreamer
body: <p>I use gstreamer for playing RTSP stream from IP cameras (like Axis.)
  I use a command line like this: </p>
  
  <pre><code>gst-launch-0.10 rtspsrc location=rtsp://192.168.0.127/axis-media/media.amp latency=0 ! decodebin ! autovideosink
  </code></pre>
  
  <p>and it work fine.</p>
  
  <p>I want to control it with a gui in pygtk so I use the gstreamer python bindings.
  I've wrote this piece of code:</p>
  
  <pre><code>[...]
  self.player = gst.Pipeline("player")
  source = gst.element_factory_make("rtspsrc", "source")
  source.set_property("location", "rtsp://192.168.0.127/axis-media/media.amp")
  decoder = gst.element_factory_make("decodebin", "decoder")
  sink = gst.element_factory_make("autovideosink", "sink")
  
  self.player.add(source, decoder, sink)
  gst.element_link_many(source, decoder, sink)
  
  bus = self.player.get_bus()
  bus.add_signal_watch()
  bus.enable_sync_message_emission()
  bus.connect("message", self.on_message)
  bus.connect("sync-message::element", self.on_sync_message)
  [...]
  </code></pre>
  
  <p>But it doesn't work and quit with this message: </p>
  
  <pre><code>gst.element_link_many(source, decoder,sink)
  gst.LinkError: failed to link source with decoder
  </code></pre>
  
  <p>I've also try to improve my CLI with this as I only use h264:</p>
  
  <pre><code>gst-launch-0.10 -v rtspsrc location=rtsp://192.168.0.127/axis-media/media.amp ! rtph264depay !  ffdec_h264 ! xvimagesink
  </code></pre>
  
  <p>And implement it in my python code like that:</p>
  
  <pre><code>[...]
  self.player = gst.Pipeline("player")
  source = gst.element_factory_make("rtspsrc", "source")
  depay = gst.element_factory_make("rtph264depay", "depay")
  decoder = gst.element_factory_make("ffdec_h264", "decoder")
  sink = gst.element_factory_make("xvimagesink", "output")
  
  self.player.add(source, depay, decoder, sink)
  gst.element_link_many(source, depay, decoder, sink)
  [...]
  </code></pre>
  
  <p>But I got the same error :(</p>
  
  <pre><code>gst.LinkError: failed to link source with depay
  </code></pre>
  
  <p>There is something wrong between my source (rtspsrc), as it work with decodebin with a filesrc (don't work of course with rtph264depay)</p>
  
  <p>I don't understand why it doesn't work because it work in cli.
  Any experts of gstreamer who can help me ?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Regards,</p>