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.