Complex Metadata

In this section some complex metadata parameters are described in detail. The non-complex parameters are usually single values described in a string, e.g. "17" for the integer 17. The complex parameters, however, contain more than a single value and must be described in some well known, parsable way, usually XML.

Audio Stream Info

Audio stream info should be provided by some element when a media stream with audio is played. This information is presented to the application by the Streamer core.

The parameter name must be _AudioStreamInfo.*, where the * is the identification number of the audio stream.

XML Format

The parameter is XML formatted according to this DTD:

<!ELEMENT AudioStreamInfo (Encoding, Language, Pid, SampleRate,
                           ChannelCount, Output)>
<!ELEMENT Encoding (#PCDATA)>
<!ELEMENT Language (#PCDATA)>
<!ELEMENT Pid (#PCDATA)>
<!ELEMENT SampleRate (#PCDATA)>
<!ELEMENT ChannelCount (#PCDATA)>
<!ELEMENT Output (#PCDATA)>

Example:

<?xml version="1.0"?>
<AudioStreamInfo>
  <Encoding>2</Encoding>
  <Language>eng</Language>
  <Pid>102</Pid>
  <SampleRate>2</SampleRate>
  <ChannelCount>2</ChannelCount>
  <Output>0</Output>
</AudioStreamInfo>

Description of each XML field:

FieldDescription
Encoding IStreamerTypes::TAudioEncoding casted to integer, e.g. 2 for MPEG-2.
Language ISO 639 language code. Use empty string if unknown.
Pid The unique identification number of the audio stream.
SampleRate IStreamerTypes::TAudioSampleRate casted to integer, e.g. 2 for 44.1 kHz.
ChannelCount The number of channels in the audio track. Use -1 if the number of channels are unknown.
Output IStreamerTypes::TAudioOutput casted to integer, e.g. 0 for Stereo.

Catalog Info

Catalog info should be provided by some element when MPEG Transport Streams are played. It should contain the binary representation of the PAT and the PMTs of the transport stream.

XML Format

The XML format is structured in as a tree with the PAT as root and the PMTs as leafs.

The parameter is XML formatted according to this DTD:

<!ELEMENT CatalogNode (Id, Code, Data, CatalogNode*)>
<!ELEMENT Id (#PCDATA)>
<!ELEMENT Code (#PCDATA)>
<!ELEMENT Data (#PCDATA)>

Example:

<?xml version="1.0"?>
<CatalogNode>
  <Id>1</Id>
  <Code>1</Code>
  <Data>ALANAADBAAAAAfA5h+tF5w==</Data>
  <CatalogNode>
    <Id>2</Id>
    <Code>2</Code>
    <Data>cjowLjA3AuIA8AUCAxhIXwPigPAJAwEnCgRzcGEAn54dFg==</Data>
  </CatalogNode>
</CatalogNode>

Description of each XML field:

FieldDescription
Id Unique identification number for each node in the tree.
Code IStreamerTypes::TCatalogNodeCoding casted to integer, e.g. 1 for PAT and 2 for PMT.
Data Base64 encoding of the binary representation of the PAT/PMT as described in ISO/IEC 13818-1.

Decoder Audio Stream Info

Decoder audio stream info should be provided by some element when a media stream with audio is played (usually by the sink since this information is provided by HAL). This information is presented to the application by the Streamer core.

The parameter name must be _DecoderAudioStreamInfo.*, where the * is the identification number of the audio stream.

The information in _AudioStreamInfo and _DecoderAudioStreamInfo is overlapping. If some information field is not available in _AudioStreamInfo the information in _DecoderAudioStreamInfo will be used by the Streamer core.

XML Format

The parameter is XML formatted according to this DTD:

<!ELEMENT DecoderAudioStreamInfo (SampleRate, ChannelCount)>
<!ELEMENT SampleRate (#PCDATA)>
<!ELEMENT ChannelCount (#PCDATA)>

Example:

<?xml version="1.0"?>
<DecoderAudioStreamInfo>
  <SampleRate>2</SampleRate>
  <ChannelCount>2</ChannelCount>
</DecoderAudioStreamInfo>

Description of each XML field:

FieldDescription
SampleRate IStreamerTypes::TAudioSampleRate casted to integer, e.g. 2 for 44.1 kHz.
ChannelCount The number of channels in the audio track. Use -1 if the number of channels are unknown.

Decoder Video Stream Info

Decoder video stream info should be provided by some element when a media stream with video is played (usually by the sink since this information is provided by HAL). This information is presented to the application by the Streamer core.

The parameter name must be _DecoderVideoStreamInfo.*, where the * is the identification number of the audio stream.

XML Format

The parameter is XML formatted according to this DTD:

<!ELEMENT DecoderVideoStreamInfo (Width, Height, AspectRatio, FrameRate)>
<!ELEMENT Width (#PCDATA)>
<!ELEMENT Height (#PCDATA)>
<!ELEMENT AspectRatio (#PCDATA)>
<!ELEMENT FrameRate (#PCDATA)>

Example:

<?xml version="1.0"?>
<DecoderVideoStreamInfo>
  <Width>720</Width>
  <Height>576</Height>
  <AspectRatio>1</AspectRatio>
  <FrameRate>1</FrameRate>
</DecoderVideoStreamInfo>

Description of each XML field:

FieldDescription
Width The pixel width of the video stream.
Height The pixel width of the video stream.
AspectRatio IStreamerTypes::TAspectRatio casted to integer, e.g. 1 for 4:3.
FrameRate IStreamerTypes::TVideoFrameRate casted to integer, e.g. 1 for 25 fps.

Stream Lists

Lists of stream identification numbers should be provided by some element of available audio, video, subtitle and teltext streams (if any stream of that type is available). This information is presented to the application by the Streamer core.

The parameter names must be _AudioStreamList, _VideoStreamList, _SubtitleStreamList and _TeletextStreamList respectively.

XML Format

The parameter is XML formatted according to this DTD:

<!ELEMENT StreamList (StreamId*)>
<!ELEMENT StreamId (#PCDATA)>

Example:

<?xml version="1.0"?>
<StreamList>
  <StreamId>102</StreamId>
  <StreamId>103</StreamId>
  <StreamId>117</StreamId>
</StreamList>

Description of each XML field:

FieldDescription
StreamId Unique identification number of a stream.

Subtitle Stream Info

Subtitle stream info should be provided by some element when a media stream with subtitles available is played. This information is presented to the application by the Streamer core.

The parameter name must be _SubtitleStreamInfo.*, where the * is the identification number of the subtitle stream.

XML Format

The parameter is XML formatted according to this DTD:

<!ELEMENT SubtitleStreamInfo (Language, Type, Format, AspectRatio,
                              PageId, AncillaryPageId, Pid)>
<!ELEMENT Language (#PCDATA)>
<!ELEMENT Type (#PCDATA)>
<!ELEMENT Format (#PCDATA)>
<!ELEMENT AspectRatio (#PCDATA)>
<!ELEMENT PageId (#PCDATA)>
<!ELEMENT AncillaryPageId (#PCDATA)>
<!ELEMENT Pid (#PCDATA)>

Example:

<?xml version="1.0"?>
<SubtitleStreamInfo>
  <Language>eng</Language>
  <Type>2</Type>
  <Format>0</Format>
  <AspectRatio>1</AspectRatio>
  <PageId>1</PageId>
  <AncillaryPageId>2</AncillaryPageId>
  <Pid>105</Pid>
</SubtitleStreamInfo>

Description of each XML field:

FieldDescription
Language ISO 639 language code. Use empty string if unknown.
Type IStreamerTypes::TSubtitleType casted to integer, e.g. 2 for "hearing impaired".
Format IStreamerTypes::TSubtitleFormat casted to integer, e.g. 0 for DVB subtitles.
AspectRatio IStreamerTypes::TAspectRatio casted to integer, e.g. 1 for 4:3
PageId Identification number of the subtitle track in the subtitle stream. See ETSI EN 300 743 for more information.
AncillaryPageId Identification number of an associated subtitle track, e.g. a logotype. See ETSI EN 300 743 for more information.
Pid The unique identification number of the subtitle stream.

Teletext Stream Info

Teletext stream info should be provided by some element when a media stream with teletext available is played. This information is presented to the application by the Streamer core.

The parameter name must be _TeletextStreamInfo.*, where the * is the identification number of the teltext stream.

XML Format

The parameter is XML formatted according to this DTD:

<!ELEMENT TeletextStreamInfo (Language, Pid)>
<!ELEMENT Language (#PCDATA)>
<!ELEMENT Pid (#PCDATA)>

Example:

<?xml version="1.0"?>
<TeletextStreamInfo>
  <Language>eng</Language>
  <Pid>114</Pid>
</TeletextStreamInfo>

Description of each XML field:

FieldDescription
Language ISO 639 language code. Use empty string if unknown.
Pid The unique identification number of the teletext stream.

Video Stream Info

Video stream info should be provided by some element when a media stream with video is played.

The parameter name must be _VideoStreamInfo.*, where the * is the identification number of the video stream.

XML Format

The parameter is XML formatted according to this DTD:

<!ELEMENT VideoStreamInfo (Encoding)>
<!ELEMENT Encoding (#PCDATA)>

Example:

<?xml version="1.0"?>
<VideoStreamInfo>
  <Encoding>2</Encoding>
</VideoStreamInfo>

Description of each XML field:

FieldDescription
Encoding IStreamerTypes::TVideoEncoding casted to integer, e.g. 2 for MPEG-2.