basic pad duplication/splitter question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

basic pad duplication/splitter question

Christopher Harvey-3
I've got this bit of code:
  assert(gst_bin_add(GST_BIN(thisPipe), v4lSrc));
  assert(gst_bin_add(GST_BIN(thisPipe), appSink));
  assert(gst_bin_add(GST_BIN(thisPipe), udpSink));

  assert(gst_element_link(v4lSrc, appSink));
  assert(gst_element_link(v4lSrc, udpSink));  //fails

I see why this is failing, the output pad of the v4lSrc is used by
appSink. What do I do if I want to link to both the app and udpSink?

Is sending raw video like that over udp a good idea? If there are lost
packets will I still get a reasonable image on the other end?

Thanks,
Chris

--
My GnuPGP key at:
www.basementcode.com/public_key.txt

------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: basic pad duplication/splitter question

Edward Hervey
Administrator
On Fri, 2010-04-23 at 17:14 -0400, Christopher Harvey wrote:
> I've got this bit of code:
>   assert(gst_bin_add(GST_BIN(thisPipe), v4lSrc));
>   assert(gst_bin_add(GST_BIN(thisPipe), appSink));
>   assert(gst_bin_add(GST_BIN(thisPipe), udpSink));
>
>   assert(gst_element_link(v4lSrc, appSink));
>   assert(gst_element_link(v4lSrc, udpSink));  //fails

  Link v4lsrc to a 'tee' element, and then link tee to appsink and
udpsink.
  Note that you will need to insert a queue before both appsink and
udpsink.

    Edward

>
> I see why this is failing, the output pad of the v4lSrc is used by
> appSink. What do I do if I want to link to both the app and udpSink?
>
> Is sending raw video like that over udp a good idea? If there are lost
> packets will I still get a reasonable image on the other end?

  Sending anything via raw udp is a bad idea, since it's a lossy
transport. In order to cope with this, use RTP/RTSP (which also handles
out-of-band information transmission, synchronization, error recovery,
etc...). RTP/RTSP is the standard protocol for live
streaming/voip/videoconferencing and is pretty well supported in
GStreamer.

  We have raw video RTP payloaders and depayloaders in GStreamer,

  You might also be interested by the gst-rtsp-server which will take
care of properly setting up the rtp part of your pipeline, allocate udp
ports AND provide a rtsp server (so you can then use any rtsp compatible
client to connect to it):
http://people.freedesktop.org/~wtay/

>
> Thanks,
> Chris
>



------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel