RTP头结构解析
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头结构解析的更多相关文章
- RTP协议之Header结构解析
实时传输协议 RTP,RTP 提供带有实时特性的端对端数据传输服务,传输的数据如:交互式的音频和视频.那些服务包括有效载荷类型定义,序列号,时间戳和传输监测控制.应用程序在 UDP 上运行 RTP 来 ...
- 【旧文章搬运】Win7可变对象头结构之InfoMask解析
原文发表于百度空间,2010-08-11========================================================================== 对Wind ...
- H.264码流结构解析
from:http://wenku.baidu.com/link?url=hYQHJcAWUIS-8C7nSBbf-8lGagYGXKb5msVwQKWyXFAcPLU5gR4BKOVLrFOw4bX ...
- RTP协议全解析(H264码流和PS流)
转自:http://blog.csdn.net/chen495810242/article/details/39207305 写在前面:RTP的解析,网上找了很多资料,但是都不全,所以我力图整理出一个 ...
- NSObject头文件解析 / 消息机制 / Runtime解读 (一)
NSObject头文件解析 当我们需要自定义类都会创建一个NSObject子类, 比如: #import <Foundation/Foundation.h> @interface Clas ...
- boot.img格式文件拆解实例结构解析
以msm8226为例,讲解android源码编译生成boot.img的结构.boot.img包括boot.img header.kernel以及ramdisk文件系统.下面是对boot.img的结构进 ...
- PE知识复习之PE的各种头属性解析
PE知识复习之PE的各种头属性解析 一丶DOS头结构体 typedef struct _IMAGE_DOS_HEADER { // DOS .EXE header WORD e_magic; // M ...
- H264码流结构分析和rtp打包结构详解
网络抽象层单元类型 (NALU): NALU头由一个字节组成,它的语法如下: +---------------+ |0|1|2|3|4|5|6|7| +-+-+-+-+-+-+-+ ...
- ELF Format 笔记(十一)—— 程序头结构
ilocker:关注 Android 安全(新手) QQ: 2597294287 程序头表 (program header table) 是一个结构体数组,数组中的每个结构体元素是一个程序头 (pro ...
随机推荐
- uva 10160
一开始写的代码加上各种剪枝后还是超时, 然后看了一下状态压缩后过了,两个代码的具体思想是一样的,状态压缩后可以大大提升性能 #include <cstdio> #include <c ...
- uva 10304
最优二叉查找数 看了这位大牛 的博客 http://www.cnblogs.com/lpshou/archive/2012/04/26/2470914.html /****************** ...
- 《head first java 》读书笔记(三)
Updated 2014/04/03 --P518 Thread需要任务,任务是实现过Runnable的实例.Runnalbe这个接口只有一个方法.run()会是新线程所执行的第一项方法.要把Runn ...
- PHPer 为什么会被 Javaer 鄙视?
最近看了知乎上的一个话题 「在工作中,为什么 Java 程序员常常瞧不起 PHP 程序员?」 个人从业多年,用过的后端语言 ASP.ASP.NET.Java.PHP.Node.js.Python,如果 ...
- POJ 3278Catch That Cow
http://poj.org/problem?id=3278 大意是说牛在原地不动,他在某点去抓牛,他有两种方式可以走,第一种走一步,往前往后都可,第二种是走现在所在点的两倍的数目.只要能够刚好到达牛 ...
- 在UWSGI和NGINX配合的情况下,配置个别目录上传及超时
笨办法就是多加一个LOCATION. 然后,自定义以下类似参数 client_max_body_size uwsgi_connect_timeout uwsgi_read_timeout server ...
- Openfire 代码部署报错: Variable references non-existent resource:${workspace_loc:openfire_src}
Variable references non-existent resource:${workspace_loc:openfire_src} -DopenfireHome=“${workspace_ ...
- Java 按字节获得字符串(中文)长度
引自:http://songjianyong.iteye.com/blog/1552973 package cn.com.songjy.test; import java.io.Unsupported ...
- NewPascal(也许只是对FreePascal的一种封装)
NewPascal is a breath of fresh air and long tradition! NewPascal offers a ready-to-be-used and up-to ...
- 无刷新分页 jquery.pagination.js
无刷新分页 jquery.pagination.js 采用Jquery无刷新分页插件jquery.pagination.js实现无刷新分页效果 1.插件参数列表 http://www.dtan.so ...