Need urgent for RTP

Need urgent for RTP

Post by russou » Thu, 07 Oct 2004 15:15:19


I am trying to implement RTP in Red Hat Linux 9.0 using C. What I
can't understand is that if I send an RTP packet in a UDP payload, who
is going to ensure its timely delivery and whether there is anyone to
look into UDP's payload?

Please, help me clarifying the matter.
 
 
 

Need urgent for RTP

Post by elitr » Sat, 23 Oct 2004 06:54:16

Hi Farhan,
Not the exact answer you're after but my understanding of the RTP
concept is that the code on your local machine is the party
responsible for playing the received stream at the same sampling rate.
1. Basically, you fork a thread to keep listening to the port and
receive the incoming packet stream.
2. You create a timer that triggers a function called (say)
PlayNextSample(). The timer period should be equal to the sampling
rate at the sender PC.
3. Upon reception of each incoming packet, you append it at the end of
a FIFO queue.
4. The PlayNextSample() function basically pulls out the first packet
from the FIFO queue and plays it (audio and/or video).
5. Your listner thread and the play function are expected to handle
worst case scenarios like queue overflow or under-run.
Finally Farhan, I did not get yet into coding RTP though nevertheless
that was my understanding, hopefully it helps.
Good luck,

Eli