开发者

How do I apply both RTP and UDP protocols to achieve audio streaming?

开发者 https://www.devze.com 2023-02-04 13:26 出处:网络
How do I write a C++/MFC program to make a server as a bridge for clients to stream their audio? I have been told to use UDP and RTP protocol but due to my lack knowledge of media streaming, I could开

How do I write a C++/MFC program to make a server as a bridge for clients to stream their audio? I have been told to use UDP and RTP protocol but due to my lack knowledge of media streaming, I could开发者_如何学JAVAn't make it work. What is relationship between UDP and RTP and steps needed for server to listen, accept and handle packet transfer between client to client.


As unwind said, generally RTP runs on top of UDP. It's called a conectionless protocol.

This is the specification of UDP: http://www.ietf.org/rfc/rfc768.txt

An this is the specification of RTP: http://www.ietf.org/rfc/rfc1889.txt

You can find very useful information about RTP on this site. There are different libraries and docs.

It's possible to write a "RTP forwarder" application.


RTP generally runs on top of UDP, to get away from TCP's streaming behavior, TCP always delivers data in-order, which is not optimal for real-time applications.

It might be possible to do a "dumb" forwarder that is not RTP-aware, but instead is configured to e.g. accept UDP packets to port X, and forward all traffic to host:Y, packet by packet. Not sure if that works in practice, though.

0

精彩评论

暂无评论...
验证码 换一张
取 消