wiki:Specs/STREAM_PARA_USAGE

This page contains a draft for the ROAR_STREAM_PARA_USAGE subcommand of ROAR_CMD_GET_STREAM_PARA/ROAR_CMD_SET_STREAM_PARA.

Draft for Description

The ROAR_CMD_SET_STREAM_PARA command with the ROAR_STREAM_PARA_USAGE subtype is used within RAUM? to signalize the usage of a stream within the container. This is mostly useful for allowing the decoder to decide which streams to play back in oder to select the language of the listener.

Draft for Data structure

Offset Size/Type? Meaning
0 uint16 Flags
2 uint16 Usage Type
4 uint16 option Relative Stream ID
6 uint16 option SubUsage
8 uint16 option SubSubUsage

Parts marked with 'option' are optional. If they are not in the message they are assumed to be zero except for the Relative Stream ID which is assumed to be -1 (0xFFFF). The Relative Stream ID is the ID of the stream this deceleration is relative to. For example in case of an overlay stream this is the ID of the stream below this stream.

Defined Usages

The following usages are defined:

ID Usage Used Options Meaning
0 Parallel none This stream is played in parallel with all other played streams (The default).
1 Alternative RelStreamID, SubUsage, SubSubUsage Only one stream of this type and usage is played. Which one is selected based on SubUsage and SubSubUsage. If Relative Stream ID is set (not set to -1, 0xFFFF) it is also considered an overlay stream to the one given. See Usage Overlay.
2 Overlay RelStreamID This is an overlay to the given stream. It is for example used to tell the decoder this stream is the spoken part of some work while the one it overlays is the background music.
3 Combine RelStreamID This stream is to be combined with the stream given in Relative Stream ID. This for example is used for stereographic 3D data. Relative Stream ID must not be -1 (0xFFFF).
4 Preset none This stream is a preset (e.g. for the light control subsystem)

SubUsages used by Usage type Alternative

The following SubUsages are defined for the Usage type Alternative:

ID SubUsage Used Options Meaning
0 Metadata SubSubUsage The stream to play back is selected by the user using the meta data of the streams as key. Which meta data is used is given in SubSubUsage. A common value for SubSubUsage is META_TYPE_LANGUAGE (40, 0x0028) to select the stream based on the language.
1 StreamInfo none The stream is selected based on the Stream Infos (including channel setup). This can be used so the decoder can select a stream matching the output device best. For example an encoder can provide audio streams with 5.1 and 2(.0) channels. The decoder should now use the stereo one if used with a stereo output device (e.g. headphones) and the multichannel one with hardware supporting 5.1 natively. How this process of selecting is done is in application domain.
Last modified 10 years ago Last modified on 10/31/13 19:01:18