How to check from server side if RTP stream is coming in on UDP port?

skryabin alex at vovan.ca
Mon Nov 14 11:20:55 UTC 2016


Hi Sebastian,

Which watchdog element (or pad probe) would you suggest, that would 
induce the least latency (or none, ideally)?

Here are my working pipelines...

Sending side:

gst-launch-1.0 -v videotestsrc ! jpegenc ! rtpjpegpay ! udpsink 
host=192.168.1.100 port=5005

Receiving end (in my application):

GstElement* pipeline = gst_pipeline_new ("pipeline");

     GstElement* videosrc  = gst_element_factory_make ("udpsrc", NULL);
     GstCaps *udp_caps = gst_caps_from_string ("application/x-rtp, 
media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG, 
payload=(int)26");
     g_object_set (videosrc, "port", 5005, "caps", udp_caps, NULL);

     GstElement* rtpjpegdepay = gst_element_factory_make("rtpjpegdepay", 
NULL);
     GstElement* decodebin = gst_element_factory_make("jpegdec", NULL);
     GstElement* videosink = gst_element_factory_make 
("caopengllayersink", NULL);

     gst_bin_add_many (GST_BIN (pipeline), videosrc, rtpjpegdepay, 
decodebin, videosink, NULL);

     gboolean phase1_ok = gst_element_link_filtered(videosrc, 
rtpjpegdepay, udp_caps);
     gst_caps_unref(udp_caps);
     gboolean phase2_ok = gst_element_link(rtpjpegdepay,decodebin);
     gboolean phase3_ok = gst_element_link(decodebin,videosink);

Many thanks!

Alexandre

Le 2016-11-14 04:58, Sebastian Dröge-3 [via GStreamer-devel] a écrit :
> On Sun, 2016-11-13 at 16:59 -0800, skryabin wrote:
> 
>> Hello,
>> 
>> I have an RTP stream UDP client/server setup, and the server side
> (receiving
>> end of the stream) is a Cocoa Mac OS X application.
>> 
>> I would like to check, using gstreamer, if the camera is currently
> sending
>> data.
>> 
>> Using:
>> 
>> ret = gst_element_set_state(pipeline, GST_STATE_PLAYING);
>> 
>> I always get GST_STATE_CHANGE_ASYNC, whether or not the client is
> sending
>> the RTP stream or not.
>> 
>> Is there any way to perform this kind of validation, using
> gstreamer? It depends on your exact pipeline. But you could always do
> something
> like adding a watchdog element somewhere in the pipeline, or a pad
> probe, to check if data is flowing regularly there.
> 
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com [1]
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email] [2]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel [3]
> 
>  SIGNATURE.ASC (981 bytes) Download Attachment [4]
> 
> -------------------------
> 
> If you reply to this email, your message will be added to the
> discussion below:
> http://gstreamer-devel.966125.n4.nabble.com/How-to-check-from-server-side-if-RTP-stream-is-coming-in-on-UDP-port-tp4680662p4680672.html
> [5]
>  To unsubscribe from How to check from server side if RTP stream is
> coming in on UDP port?, click here [6].
> NAML [7]
> 
> Links:
> ------
> [1] http://www.centricular.com
> [2] 
> http://webmail.vovan.ca/user/SendEmail.jtp?type=node&node=4680672&i=0
> [3] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> [4]
> http://gstreamer-devel.966125.n4.nabble.com/attachment/4680672/0/signature.asc
> [5]
> http://gstreamer-devel.966125.n4.nabble.com/How-to-check-from-server-side-if-RTP-stream-is-coming-in-on-UDP-port-tp4680662p4680672.html
> [6]
> http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4680662&code=YWxleEB2b3Zhbi5jYXw0NjgwNjYyfDI4MDQ1NjY2NA==
> [7]
> http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-check-from-server-side-if-RTP-stream-is-coming-in-on-UDP-port-tp4680662p4680676.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161114/f79ee657/attachment.html>


More information about the gstreamer-devel mailing list