Calculate Packet loss for data in android from streaming server in udp

0

I am developing a simple application for android where I need to communicate from server in UDP and I did that with the help of socket programming, now I need to find Packet Loss in my connection, so is there any API or any way to find Packet Loss in socket programming.

The server address is: rtsp://162.213.38.211/bunny.

Basically I want android app that will display the video using videoView class and to calculate the lost packets that occur during streaming process. The packets should be saved in a variable. Please help me by any means! thank you

Programmer

Posted 2016-03-27T06:06:04.143

Reputation: 1

1What you want is not possible. UDP does not factor in packet loss. But packets are packets, so any packet loss, would give you what you want. Connect a PC and an Android device to the same network, then calculate the packet loss by using the PC, to the server itself. – Ramhound – 2016-03-27T06:27:28.080

Answers

1

UDP does not implement any means of segment ordering or response windowing, so at the UDP layer, there is no way to tell whether there is a segment missing or processed out of order. The server has no idea if the client is receiving, and the client has no idea if its getting exactly what the server is sending.

Unlike TCP, Message integrity features are left to the application layer, so if the application cares about ordering or loss, it will include data in its application layer payload, that will allow it to make the kinds of decisions the feature developer wants to provide.

So, I would look for an answer at the RTSP level, to see if it provides a means to access or calculate the segment loss rates.

Frank Thomas

Posted 2016-03-27T06:06:04.143

Reputation: 29 039