|
|
#4
xu20002007-02-27 20:20
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page 5 -------------------------------------------------------------------------------- INTERNET-DRAFT RTSP March 13, 1998
max_bit_rate: 32 bits 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).
avg_bit_rate: 32 bits 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).
max_packet_size: 32 bits 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).
avg_packet_size: 32 bits 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).
num_packets: 32 bits The number of packets in the media data. This member is present on all Properties objects with an object_version of 0 (zero).
duration: 32 bits The duration of the file in milliseconds. This member is present on all Properties objects with an object_version of 0 (zero).
preroll: 32 bits The number of milliseconds to pre-buffer before starting playback. This member is present on all Properties objects with an object_version of 0 (zero).
index_offset: 32 bits The offset in bytes from the start of the file to the start of the index header object. This member is present on all Properties objects with an object_version of 0 (zero).
data_offset: 32 bits 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).
num_streams: 16 bits The number of media streams contained in the file. This member is present on all Properties objects with an object_version of 0 (zero).
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page 6 -------------------------------------------------------------------------------- INTERNET-DRAFT RTSP March 13, 1998
flags: 16 bits Flags indicating characteristics of the RealMedia file. The following flags are defined:
o #define PN_SAVE_ENABLED 0x0001
Allows clients to save a copy of the RealMedia file to disk.
o #define PN_PERFECT_PLAY_ENABLED 0x0002
Allows clients to use extra buffering to ensure Perfect Play.
o #define PN_LIVE_BROADCAST 0x0004
The RealMedia file is being generated by a live broadcast.
2.3 Media Properties Header
The Media Properties Header describes the specific media properties of each stream in a RealMedia File. Components of the RealMedia system use this object to configure themselves for handling the media data in each stream. There is one Media Properties Header for each media stream in a RealMedia file. The following pseudo-structure describes the Media Properties header:
Media_Properties { UINT32 object_id; UINT32 size; UINT16 object_version;
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page 7 -------------------------------------------------------------------------------- INTERNET-DRAFT RTSP March 13, 1998
if (object_version == 0) { UINT16 stream_number; UINT32 max_bit_rate; UINT32 avg_bit_rate; UINT32 max_packet_size; UINT32 avg_packet_size; UINT32 start_time; UINT32 preroll; UINT32 duration; UINT8 stream_name_size; UINT8[stream_name_size] stream_name; UINT8 mime_type_size; UINT8[mime_type_size] mime_type; UINT32 type_specific_len; UINT8[type_specific_len] type_specific_data; } }
The Media Properties Header contains the following fields:
object_id: 32 bits The unique object ID for a Media Properties Header ('MDPR').
size: 32 bits The size of the Media Properties Header in bytes.
object_version: 16 bits The version of the Media Properties Header object.
stream_number: 32 bits The stream_number (synchronization source identifier) is a unique value that identifies a media stream. Every data packet that belongs to a media stream contains the same STREAM_NUMBER. The STREAM_NUMBER enables a receiver of multiple media streams to distinguish which packets belong to each media stream. This member is present on all MediaProperties objects with an object_version of 0 (zero).
max_bit_rate: 32 bits The maximum bit rate required to deliver this stream over a network. This member is present on all MediaProperties objects with an object_version of 0 (zero).
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page 8 -------------------------------------------------------------------------------- INTERNET-DRAFT RTSP March 13, 1998
avg_bit_rate: 32 bits The average bit rate required to deliver this stream over a network. This member is present on all MediaProperties objects with an object_version of 0 (zero).
max_packet_size: 32 bits The largest packet size (in bytes) in the stream of media data. This member is present on all MediaProperties objects with an object_version of 0 (zero).
avg_packet_size: 32 bits The average packet size (in bytes) in the stream of media data. This member is present on all MediaProperties objects with an object_version of 0 (zero).
start_time: 32 bits The time offset in milliseconds to add to the timestamp of each packet in a media stream. This member is present on all MediaProperties objects with an object_version of 0 (zero).
preroll: 32 bits The time offset in milliseconds to subtract to the timestamp of each packet in a media stream. This member is present on all MediaProperties objects with an object_version of 0 (zero).
duration: 32 bits The duration of the stream in milliseconds. This member is present on all MediaProperties objects with an object_version of 0 (zero).
stream_name_size: 8 bits The length of the following stream_name field in bytes. This member is present on all MediaProperties objects with an object_version of 0 (zero).
stream_name: variable length A non-unique alias or name for the stream. This member is present on all MediaProperties objects with an object_version of 0 (zero).
mime_type_size: 8 bits The length of the following mime_type field in bytes. This member is present on all MediaProperties objects with an object_version of 0 (zero).
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page 9 -------------------------------------------------------------------------------- INTERNET-DRAFT RTSP March 13, 1998
mime_type: variable length A non-unique MIME style type/subtype string for data associated with the stream. This member is present on all MediaProperties objects with an object_version of 0 (zero).
type_specific_len: 32 bits The length of the following type_specific_data in bytes. The type_specific_data is typically used by the data-type renderer to initialize itself in order to process the media stream. This member is present on all MediaProperties objects with an object_version of 0 (zero).
type_specific_data: variable length The type_specific_data is typically used by the data-type renderer to initialize itself in order to process the media stream. This member is present on all MediaProperties objects with an object_version of 0 (zero).
2.4 Content Description Header
The Content Description Header contains the title, author, copyright, and comments information for the RealMedia File. All text data is in ASCII format. The following pseudo-structure describes the Content Description Header:
Content_Description { UINT32 object_id; UINT32 size; UINT16 object_version;
if (object_version == 0) { UINT16 title_len; UINT8[title_len] title; UINT16 author_len; UINT8[author_len] author; UINT16 copyright_len; UINT8[copyright_len] copyright; UINT16 comment_len; UINT8[comment_len] comment; } }
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page 10 -------------------------------------------------------------------------------- INTERNET-DRAFT RTSP March 13, 1998
The Content Description Header contains the following fields:
object_id: 32 bits The unique object ID for the Content Description Header ('CONT').
size: 32 bits The size of the Content Description Header in bytes.
object_version: 16 bits The version of the Content Description Header object.
title_len: 16 bits The length of the title data in bytes. Note that the title data is not null terminated. This member is present on all Content Description Header objects with an object_version of 0 (zero).
title: variable length An array of ASCII characters that represents the title information for the RealMedia file. This member is present on all Content Description Header objects with an object_version of 0 (zero).
author_len: 16 bits The length of the author data in bytes. Note that the author data is not null terminated. This member is present on all Content Description Header objects with an object_version of 0 (zero).
author: variable length An array of ASCII characters that represents the author information for the RealMedia file. This member is present on all Content Description Header objects with an object_version of 0 (zero).
copyright_len: 16 bits The length of the copyright data in bytes. Note that the copyright data is not null terminated. This member is present on all Content Description Header objects with an object_version of 0 (zero).
copyright: variable length An array of ASCII characters that represents the copyright information for the RealMedia file. This member is present on all Content Description Header objects with an object_version of 0 (zero).
comment_len: 16 bits The length of the comment data in bytes. Note that the comment data is not null terminated. This member is present on all Content Description Header objects with an object_version of 0 (zero).
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page 11 -------------------------------------------------------------------------------- INTERNET-DRAFT RTSP March 13, 1998
comment: variable length An array of ASCII characters that represents the comment information for the RealMedia file. This member is present on all Content Description Header objects with an object_version of 0 (zero).
3. Data Section
The data section of the RealMedia file consists of a Data Section Header that describes the contents of the data section, followed by a series of interleaved media data packets. Note that the size field of the Data Chunk Header is the size of the entire data chunk, including the media data packets.
3.1 Data Chunk Header
The Data Chunk Header marks the start of the data chunk. There is usually only one data chunk in a RealMedia file, however for extremely large files there may be multiple data chunks. The following pseudo-structure describes the Data chunk header:
Data_Chunk_Header { UINT32 object_id; UINT32 size; UINT16 object_version;
if (object_version == 0) { UINT32 num_packets; UINT32 next_data_header; } }
The Data Chunk Header contains the following fields:
object_id: 32 bits The unique object ID for the Data Chunk Header ('DATA').
size: 32 bits The size of the Data Chunk in bytes.
object_version: 16 bits The version of the Data Chunk Header object.
|