Sunday, August 10, 2014

Successful transmission of packets and recovery

Hi,
Good to see you after a break. I was at a Conference last week and after the end of each day, i dedicated some time to figuring out why packets were getting dropped and how to correct that. Finally, i got it working after lot of debugging using simulation, Chipscope pro and Googling. Anyway, i tried a couple of options. Some worked and some didn't. These were:

1) Adding latency (number of milliseconds before a packet is declared dropped) to the Gstreamer command

time gst-launch-1.0 -v udpsrc uri=udp://192.168.1.1:5004  caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)RGB, depth=(string)8, width=(string)1280, height=(string)720" ! rtpbin latency=1 ! rtpvrawdepay  ! videoconvert !  autovideosink

I also tried with latency of 0 and it worked. Now the inter-packet delay is configurable using Atlys Switches sw0 to sw5. The default delay is 3000 clock cycles which corresponds to approximately 30 fps. Here is the configuration.

sw5 sw4 sw3 sw2 sw1 sw0   Delay in clock cycles
0      0       0    0       0     0            3000
0      0       0    0       0     1            2625
0      0       0    0       1     0            2250
0      0       0    0       1     1            1875
0      0       0    1      0     0             1500
0      0       0    1       0     1            1125
0      0       0    1       1     0              750
0      0       0    1       1     1              375

0      0       1    0       0     0            5500
0      1       0    0       0     0            8000
0      1       1    0       0     0           10500
1      0       0    0       0     0           13000
1      0       1    0       0     0           15500
1      1       0    0       0     0           18000
1      1       1    0       0     0           20500

sw6 is reserved for jumbo frame size and sw7 is reserved for 1080p (for future tweaks)

2) By Tcp tuning in Linux and Windows 7

I  tried without tuning and it worked. The tuning was done to see how much of inter-packet delay can be decreased. It turned out that as you approach to 0 inter-packet delay, Tcp tuning does not work

3) Going from Cat 5 to Cat 6 cable and it didn't make a difference.

4) Going from Linux to Windows 7 as my laptop had Windows 7 and i was stuck with this last week. It was not different going from Linux to Windows 7 except that Gstreamer didn't work in Window 7 for some reason.

Here is a quick demo. You will see frame rate going up (faster RGB pattern) and then going down (slow RGB pattern)


Now i shall work on DDR2 integration and documentation this week.

Please give your valuable feedback


No comments:

Post a Comment