Working of UDP source timeout feature

vk_gst venkateshkuppan26 at gmail.com
Fri Oct 5 11:11:43 UTC 2018


Hello, 


I am trying to simulate the delay in UDP streaming using the linux tool - 
netem.  netem <https://wiki.linuxfoundation.org/networking/netem>   

I use the following command to induce a latency of 1000ms (at iMX6 side) : 
tc qdisc add dev eth0 root netem delay 1000ms 

Now this delay is observed, when I ping between 2 devices, connected via LAN 
cable. My devices are iMX6(server) and Ubuntu PC(client)

I am transmitting video packets from iMX6 to PC, where I have configured 
delay of 1000 ms for the eth0 port of iMX6. 
gst-launch-1.0 -v imxv4l2videosrc device=/dev/video1 ! imxvpuenc_h264 
bitrate=500  ! h264parse ! rtph264pay ! udpsink host=192.168.1.11 port=xxxx 

At Ubuntu PC: 
I have configured a timeout of 10ms for the udp source : 
udpsrc port = xxxx  timeout=10000000 ! rtph264depay ! h264parse ! avdec_h264 
! autovideosink 


I install a message callback on the bus for element "udpsrc", that drives a
callback on detection of the timeout message. Pseudo code(Python-GStreamer)
as follows:

bus = self.pipeline.get_bus()
bus.connect('message::element',self.on_timeout)


def on_timeout(self,bus,msg)
  strct = msg.get_structure()
  if strct.has_name("GstUDPSrcTimeout"):
     print("udp source timeout detected")




However, when I transmit video data over UDP from imx6 to PC, I observe a
delay of 1000ms in the video rendered at PC.  When I completely stop sending
packets from iMX6, I can see the timeout 
occurring and the callback called. So the timeout is called, when there are 
no packets at all, and not when there is a delay in receiving the packets. 
I was expecting to receive a notification every 100ms when the packets are
received with delay, i.e. the imx6 board transmits video packets only every
1000ms. 
I understand right now there is a continous stream of packets at UDP and
hence perhaps the timeout function does not work. 
Is there a way to make UDP source work, for not receiving packets every
100ms?  


To sum up the observations: 
1. the timeout is called when the iMX6 completely stops sending udp packets,
i.e. when I exit the pipeline using ctrl+c on imx6 side. 
2. the timeout is not called when the iMX6 sends delayed udp packets. 


My further tests will include packet losses, delays, jitter combined, and in
such a case when there is no packet received every 100ms or some X ms, I
want a callback to be invoked. 

Does anyone have any pointers on this issue? 

Regards.   




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list