RTP包头前12个固定字节机构图:

0                   1                   2                   3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|V=2|P|X| CC   |M|     PT      |       sequence number         |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|                           timestamp                           |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|           synchronization source (SSRC) identifier            |

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

|            contributing source (CSRC) identifiers             |

|                             ….                              |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  • V – Version. Identifies the RTP version.
  • RTP版本号
  • P – Padding. When set, the packet contains one or more additional padding octets at the end which are not part of the payload.
  • 是否填充,如果设置为允许填充的话,在包的末尾填充一个或多个字节,这些填充的字节不是有效负载的一部分。
  • X – Extension bit. When set, the fixed header is followed by exactly one header extension, with a defined format.
  • 扩充位,如果设置为允许的话,固定头结构后面(即包的12个字节后面,有效负载的前面)紧跟着一个扩展头结构,该结构是已定义的一种格式
  • CSRC count (CC) -Contains the number of CSRC identifiers that follow the fixed header.
  • 数据源的个数(即源的个数),如果只有一个源那么此时的值为0。
  • M – Marker. The interpretation of the marker is defined by a profile. It is intended to allow significant events such as frame boundaries to be marked in the packet stream.
  • 标识,在文档中是这样定义的,它有意标识重要的事物比如:在流媒体中标识一帧数据的边界(结束或开始)。
  • Payload type – Identifies the format of the RTP payload and determines its interpretation by the application. A profile specifies a default static mapping of payload type codes to payload formats. Additional payload type codes may be defined dynamically through non-RTP means.
  • 有效负载,RTP数据的有效负载(不包括头12个字节),由具体的应用程序来确定负载的格式和意义。官方文档里有表格说明,该表格显示了格式代码和具体格式的对应关系,附加的格式代码可能不在RTP协议里定义。
  • Sequence number – Increments by one for each RTP data packet sent, and may be used by the receiver to detect packet loss and to restore packet sequence.
  • 数据包序号,发送的RTP数据包序号,接收端可用它来检查丢失的数据包和确定保存数据包次序。
  • Timestamp – Reflects the sampling instant of the first octet in the RTP data packet. The sampling instant must be derived from a clock that increments monotonically and linearly in time to allow synchronization and jitter calculations.
  • 时间戳, 纪录了RTP数据包中第一个字节的采样时间,采样时间必须源自一个时间增量且允许同步和计算。
  • SSRC – Synchronization source. This identifier is chosen randomly, with the intent that no two synchronization sources within the same RTP session will have the same SSRC identifier.
  • 同步标识, 是一个随机数,在同一个RTP会话中只有一个同步标识。
  • CSRC – Contributing source identifiers list. Identifies the contributing sources for the payload contained in this packet.

RTP头结构解析的更多相关文章

  1. RTP协议之Header结构解析

    实时传输协议 RTP,RTP 提供带有实时特性的端对端数据传输服务,传输的数据如:交互式的音频和视频.那些服务包括有效载荷类型定义,序列号,时间戳和传输监测控制.应用程序在 UDP 上运行 RTP 来 ...

  2. 【旧文章搬运】Win7可变对象头结构之InfoMask解析

    原文发表于百度空间,2010-08-11========================================================================== 对Wind ...

  3. H.264码流结构解析

    from:http://wenku.baidu.com/link?url=hYQHJcAWUIS-8C7nSBbf-8lGagYGXKb5msVwQKWyXFAcPLU5gR4BKOVLrFOw4bX ...

  4. RTP协议全解析(H264码流和PS流)

    转自:http://blog.csdn.net/chen495810242/article/details/39207305 写在前面:RTP的解析,网上找了很多资料,但是都不全,所以我力图整理出一个 ...

  5. NSObject头文件解析 / 消息机制 / Runtime解读 (一)

    NSObject头文件解析 当我们需要自定义类都会创建一个NSObject子类, 比如: #import <Foundation/Foundation.h> @interface Clas ...

  6. boot.img格式文件拆解实例结构解析

    以msm8226为例,讲解android源码编译生成boot.img的结构.boot.img包括boot.img header.kernel以及ramdisk文件系统.下面是对boot.img的结构进 ...

  7. PE知识复习之PE的各种头属性解析

    PE知识复习之PE的各种头属性解析 一丶DOS头结构体 typedef struct _IMAGE_DOS_HEADER { // DOS .EXE header WORD e_magic; // M ...

  8. H264码流结构分析和rtp打包结构详解

    网络抽象层单元类型 (NALU): NALU头由一个字节组成,它的语法如下: +---------------+      |0|1|2|3|4|5|6|7|      +-+-+-+-+-+-+-+ ...

  9. ELF Format 笔记(十一)—— 程序头结构

    ilocker:关注 Android 安全(新手) QQ: 2597294287 程序头表 (program header table) 是一个结构体数组,数组中的每个结构体元素是一个程序头 (pro ...

随机推荐

  1. [转载]DirectoryEntry配置IIS7出现ADSI Error:未知错误(0x80005000)

    一.错误情况 环境:win7+iis7.0 DirectoryEntry配置IIS7出现如下错误 或者是 下面一段代码在IIS6.0下运转正常,但IIS7.0下运转会出错: System.Direct ...

  2. check environment var

    田+R cmd set XXX check environment var

  3. matlab中读取txt数据文件(txt文本文档)

    matlab中读取txt数据文件(txt文本文档) 根据txt文档不同种类介绍不同的读取数据方法 一.纯数据文件(没有字母和中文,纯数字) 对于这种txt文档,从matalb中读取就简单多了 例如te ...

  4. Unity3D脚本中文系列教程(二)

    原地址:http://dong2008hong.blog.163.com/blog/static/469688272014030347910/ Unity3D脚本中文系列教程(一) .根据名称或标签定 ...

  5. POJ 1363 Rails(栈)

    思路:将出车站的顺序存入数组train,由于入车站的顺序是固定的,为1~N,所以用P表示进站的车,初始为1. 接下来举例说明吧: 原来入站顺序:    1 2 3 4 5 读入的出战顺序: 3 4 2 ...

  6. java001-Helloworld

    public class test05 { public static void main(String[] args) { System.out.println("Hello World! ...

  7. PhotoSwipe简介(PhotoSwipe是一个适合在触摸屏手机上使用的相册展示包)

    官方介绍PhotoSwipe 是专为移动触摸设备设计的相册/画廊.兼容所有iPhone.iPad.黑莓6+,以及桌面浏览器.底层实现基于HTML/CSS/JavaScript,是一款免费开源的相册产品 ...

  8. DIV+CSS列表式布局(同意图片的应用)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  9. 在win7之后安装Ubuntu14.04系统后,丢失对win7的引导

    安装完ubuntu 14.04后,开机直接进入ubuntu.但是win7下的分区还在,只是未显示引导菜单. 恢复步骤: (前提是机器上确实存在win7的引导) $ sudo update-grub G ...

  10. switch… case 语句的用法

    switch… case 语句的用法   public class Test7 { public static void main(String[] args) { int i=5; switch(i ...