没有合适的资源?快使用搜索试试~ 我知道了~
StageFright下的RM视频文件解析帮助文档。
2星 需积分: 6 16 下载量 69 浏览量
2011-08-10
10:39:38
上传
评论
收藏 190KB DOC 举报
温馨提示
试读
25页
RM视频文件最具体的分析。RMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVBRMVB
资源详情
资源评论
资源推荐
RealMedia File Format (RMFF)
Reference
The Helix architecture supports RealMedia File Format (RMFF), which
enables Helix to deliver high- quality multimedia content over a variety of
network bandwidths. Third-party developers can convert their media formats
into RMFF, enabling Helix Universal Server to deliver the &les to RealPlayer
or other applications built with the Helix Client and Server Software
Development Kit. Third-party developers can thereby use Helix to transport
content over the Internet to their own applications.
RealMedia File Format is a standard tagged &le format that uses four-
character codes to identify &le elements. These codes are 32-bit, represented
by a sequence of one to four ASCII alphanumeric characters, padded on the
right with space characters. The data type for four-character codes is
FOURCC. Use the HX_FOURCC macro to convert four characters into a four-
character code.
The basic building block of a RealMedia File is a chunk , which is a logical
unit of data, such as a stream header or a packet of data. Each chunk
contains the following &elds:
Four-character code specifying the chunk identi&er
32-bit value specifying the size of the data member in the chunk
Blob of opaque chunk data
Depending on its type, a top-level chunk can contain subobjects. This
document describes the tagged chunks contained in RMFF, as well as the
format of the data stored in each type of tagged chunk.
Tagged File Formats
RealMedia
File Format
organizes
tagged
chunks into a
header
section, a
data section, and an index section. The organization of these tagged chunks
is shown in the following &gure.
Sections of a RealMedia File
Header
Section
Because RMFF is a
tagged &le format,
the order of the
chunks is not
explicit, except
that the RealMedia
File Header must
be the &rst chunk
in the &le.
However, most
applications write
the standard headers into the &le's header section. The following chunks are
typically found in the header section of RMFF:
RealMedia File Header (this must be the &rst chunk of the &le)
Properties Header
Media Properties Header
Content Description Header
After the RealMedia File Header object, the other headers may appear in any
order. All headers are required except the Index Header. The following
sections describe the individual header objects.
RealMedia File Header
Each RealMedia &le begins with the RealMedia File Header, which identi&es
the &le as RMFF. There is only one RealMedia File Header in a RealMedia
&le. Because the contents of the RealMedia File Header may change with
di8erent versions of RMFF, the header structure supports an object version
&eld for determining what additional &elds exists. The following pseudo-
structure describes the RealMedia File Header:
RealMedia_File_Header
{
UINT32 object_id;
UINT32 size;
UINT16 object_version
;
if ((object_version == 0) ||
(object_version == 1))
{
UINT32 file_version;
UINT32 num_headers;
}
}
The RealMedia File Header contains the following &elds:
object_id
The unique object ID for a RealMedia File (.RMF ). All RealMedia files begin with this
identifier. The size of this member is 32 bits.
size
The size of the RealMedia header section in bytes. The size of this member is 32 bits.
object_version
The version of the RealMedia File Header object. All files created according to this
specification have an object_version number of 0 (zero) or 1. The size of this member is 16
bits.
le_version
The version of the RealMedia file. The Helix Client and Server SDK only covers files with a
file version of either 0 (zero) or 1. This member is present on all RealMedia_File_Header
objects with an object_version of 0 (zero) or 1. The size of this member is 32 bits.
num_headers
The number of headers in the header section that follow the RealMedia File Header. This
member is present on all RealMedia_File_Header objects with an object_version of 0 (zero)
or 1. The size of this member is 32 bits.
Properties Header
The Properties Header describes the general media properties of the
RealMedia File. Components of the RealMedia system use this object to
con&gure themselves for handling the data in the RealMedia &le or stream.
There is only one Properties Header in a RealMedia &le. The following
pseudo-structure describes the Properties header:
Properties
{
UINT32
object_id;
UINT32 size;
UINT16
object_version;
if
(object_version ==
0)
{
UINT32
max_bit_rate;
UINT32
avg_bit_rate;
UINT32
max_packet_size;
UINT32
avg_packet_size;
UINT32
num_packets;
UINT32
duration;
UINT32
preroll;
UINT32
index_offset;
UINT32
data_offset;
UINT16
num_streams;
UINT16 flags;
}
}
The Properties Header contains the following &elds:
object_id
The unique object ID for a Properties Header ('PROP'). The size of this member is 32 bits.
size
The 32-bit size of the Properties Header in bytes. The size of this member is 32 bits.
object_version
The version of the RealMedia File Header object. All files created according to this
specification have an object_version number of 0 (zero). The size of this member is 16 bits.
max_bit_rate
The maximum bit rate required to deliver this file over a network. This member is present on
all Properties objects with an object_version of 0 (zero). The size of this member is 32 bits.
avg_bit_rate
The average bit rate required to deliver this file over a network. This member is present on all
Properties objects with an object_version of 0 (zero). The size of this member is 32 bits.
max_packet_size
The largest packet size (in bytes) in the media data. This member is present on all Properties
objects with an object_version of 0 (zero). The size of this member is 32 bits.
avg_packet_size
The average packet size (in bytes) in the media data. This member is present on all Properties
objects with an object_version of 0 (zero). The size of this member is 32 bits.
num_packets
The number of packets in the media data. This member is present on all Properties objects
with an object_version of 0 (zero). The size of this member is 32 bits.
duration
The duration of the file in milliseconds. This member is present on all Properties objects with
an object_version of 0 (zero). The size of this member is 32 bits.
preroll
The number of milliseconds to prebuffer before starting playback. This member is present on
all Properties objects with an object_version of 0 (zero). The size of this member is 32 bits.
index_o$set
The offset in bytes from the start of the file to the start of the index header object. This value
can be 0 (zero), which indicates that no index chunks are present in this file. This member is
present on all Properties objects with an object_version of 0 (zero). The size of this member is
32 bits.
data_o$set
The offset in bytes from the start of the file to the start of the Data Section. This member is
present on all Properties objects with an object_version of 0 (zero). The size of this member is
32 bits.
Note:There can be a number of Data_Chunk_Headers in a RealMedia
&le. The data_o8set value speci&es the o8set in bytes to the &rst
Data_Chunk_Header. The o8sets to the other Data_Chunk_Headers can
be derived from the next_data_header &eld in a Data_Chunk_Header.
剩余24页未读,继续阅读
浅雨夏梦
- 粉丝: 25
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1