rtp&&rtcp整理的小知识点

来源:互联网 发布:手机到香港网络 编辑:程序博客网 时间:2024/06/03 14:27

1, RTP

1.1

 Thismixer resynchronizes incoming audio packets to

  reconstruct the constant 20 ms spacing generated by the sender, mixes

  these reconstructed audio streams into a single stream, translates

  the audio encoding to a lower-bandwidth one and forwards the lower-

  bandwidth packet stream across the low-speed link.

 

所以,目测,可以使用timestamp(采样个数) *( 1/20ms ) 得到采样率 

 但是仅针对audio

 

2 RTCP

2.1

         每个rtcp包都一定有SDES  因为必须要有CNAME

2.2

SR:   Sender report, for transmission andreception statistics from

        participants that are active senders

 

  RR:   Receiver report, forreception statistics from participants

        that are not active senders and in combination with SR for

        active senders reporting on more than 31 sources

 

  SDES: Source description items, including CNAME

 

  BYE:  Indicates end ofparticipation

 

  APP:  Application-specificfunctions

 

2.3 RTCP中多个source

个人理解,RTCP中的ssrc是和rtp的ssrc是一样的,但是包里面可以有多个source (比如SR包),而且,每个source第一个属性 identify也是rtp ssrc, 又因为rtp中是可以有多个csrc (贡献源,在组合的时候用的),所以个人猜测,rtcp的多个source 对应于rtp的多个csrc,(当然如果只有一个,那就直接是rtp了),identify就是多个csrc的ssrc.

 

 

 

2.4 RTP  RTCP ssrc 图

 

9.99:13628 --------à 9.31:15672   RTP ssrc : 7217

9.31:15672 --------à9.99:13628    RTP ssrc : 6587

 

 

9.99:13629 ------à9.31:15673

SR/RR: ssrc 7217  (和rtp的一样)

         Identifier:6587 (和对面的rtp一样)

SDES : ssrc 7217

 

反过来就反一下

 

所以,rtcp的ssrc 是和rtp的一样,不管是SR, RR, SDES都是一样的,source中的identity 是对面的rtp的ssrc

 

 

 

 

原创粉丝点击