欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

DSS 代码分析【RTSP announce推流报文分析】

程序员文章站 2022-07-14 18:47:23
...

Darwin流媒体服务器支持客户端推流到服务器端,服务器端再将推流转发到请求该流的客户端列表里。


一,客户端推流过程ANNOUNCE->SETUP->PLAY->RTP/RTCP->TEARDOWN

转载: http://blog.csdn.net/xiejiashu/article/details/51166196


DSS 代码分析【RTSP announce推流报文分析】

交互报文:

#C->S:
#time: ms=475350259 date=Sat, 16 Apr 2016 01:09:58 GMT
#server: ip=192.168.1.101 port=554
#client: ip=192.168.1.107 port=58757
ANNOUNCE rtsp://192.168.1.101:554/live.sdp RTSP/1.0\r\n
CSeq: 1\r\n
User-Agent: EasyPusher v1.16.0325\r\n
Content-Type: application/sdp\r\n
Content-Length: 557\r\n
\r\n


#S->C:
#time: ms=475350275 date=Sat, 16 Apr 2016 01:09:58 GMT
RTSP/1.0 200 OK\r\n
Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )\r\n
Cseq: 1\r\n
\r\n


#C->S:
#time: ms=475350290 date=Sat, 16 Apr 2016 01:09:58 GMT
#server: ip=192.168.1.101 port=554
#client: ip=192.168.1.107 port=58757
SETUP rtsp://192.168.1.101:554/live.sdp/trackID=1 RTSP/1.0\r\n
CSeq: 2\r\n
User-Agent: EasyPusher v1.16.0325\r\n
Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=0-1\r\n
\r\n

#S->C:
#time: ms=475350306 date=Sat, 16 Apr 2016 01:09:58 GMT
RTSP/1.0 200 OK\r\n
Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )\r\n
Cseq: 2\r\n
Cache-Control: no-cache\r\n
Session: 127315715557739\r\n
Date: Sat, 16 Apr 2016 01:09:58 GMT\r\n
Expires: Sat, 16 Apr 2016 01:09:58 GMT\r\n
Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=0-1\r\n
\r\n


#C->S:
#time: ms=475350337 date=Sat, 16 Apr 2016 01:09:58 GMT
#server: ip=192.168.1.101 port=554
#client: ip=192.168.1.107 port=58757
SETUP rtsp://192.168.1.101:554/live.sdp/trackID=2 RTSP/1.0\r\n
CSeq: 3\r\n
User-Agent: EasyPusher v1.16.0325\r\n
Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3\r\n
Session: 127315715557739\r\n
\r\n

#S->C:
#time: ms=475350368 date=Sat, 16 Apr 2016 01:09:58 GMT
RTSP/1.0 200 OK\r\n
Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )\r\n
Cseq: 3\r\n
Session: 127315715557739\r\n
Cache-Control: no-cache\r\n
Date: Sat, 16 Apr 2016 01:09:58 GMT\r\n
Expires: Sat, 16 Apr 2016 01:09:58 GMT\r\n
Transport: RTP/AVP/TCP;unicast;mode=record;interleaved=2-3\r\n
\r\n

#C->S:
#time: ms=475350384 date=Sat, 16 Apr 2016 01:09:58 GMT
#server: ip=192.168.1.101 port=554
#client: ip=192.168.1.107 port=58757
PLAY rtsp://192.168.1.101:554/live.sdp RTSP/1.0\r\n
CSeq: 4\r\n
User-Agent: EasyPusher v1.16.0325\r\n
Session: 127315715557739\r\n
Range: npt=0.000-\r\n
\r\n

#S->C:
#time: ms=475350415 date=Sat, 16 Apr 2016 01:09:58 GMT
RTSP/1.0 200 OK\r\n
Server: EasyDarwin/7.0.4 (Build/16.0108; Platform/Win32; Release/EasyDarwin; State/Development; )\r\n
Cseq: 4\r\n
Session: 127315715557739\r\n
RTP-Info: url=rtsp://192.168.1.101:554/live.sdp/trackID=1,url=rtsp://192.168.1.101:554/live.sdp/trackID=2\r\n
\r\n

………………
……RTP……
………………