libquicktime: Multichannel support

- Main Page
- Modules
- Data Structures
- Files
- Directories

# Multichannel support
[Audio]

## Enumerations
enum | lqt_channel_t { LQT_CHANNEL_UNKNOWN, LQT_CHANNEL_FRONT_LEFT, LQT_CHANNEL_FRONT_RIGHT, LQT_CHANNEL_FRONT_CENTER, LQT_CHANNEL_FRONT_CENTER_LEFT, LQT_CHANNEL_FRONT_CENTER_RIGHT, LQT_CHANNEL_BACK_CENTER, LQT_CHANNEL_BACK_LEFT, LQT_CHANNEL_BACK_RIGHT, LQT_CHANNEL_SIDE_LEFT, LQT_CHANNEL_SIDE_RIGHT, LQT_CHANNEL_LFE }
| Channel definitions. More...
## Functions
const char * | lqt_channel_to_string (lqt_channel_t ch)
| Convert a channel identifier to a human readnable string.
void | lqt_set_channel_setup (quicktime_t *file, int track, lqt_channel_t *ch)
| Set a channel setup for an audio track.
const lqt_channel_t * | lqt_get_channel_setup (quicktime_t *file, int track)
| Get a channel setup from a file.

## Detailed Description

This is an optional API extension, which allows multichannel configuration to be saved into a file. The mechanisms used are the quicktime chan atom as well as some codec specific multichannel setups.

When decoding, simply get the channel setup with lqt_get_channel_setup. It can happen, that this function returns NULL when no specific mapping is known.

When encoding, things are more complicated. Some codecs have fixed channel setups. After setting up an audio track, call lqt_get_channel_setup to check, if there is already a prefefined channel setup. If this is the case (i.e. if non NULL is returned), you MUST use this channel setup.

If there is no predefined setup (i.e. lqt_get_channel_setup returns NULL after creation of the audio track), call lqt_set_channel_setup to set your desired setup. It can happen, that libquicktime will reorder the channel setup. Thus you need a final call to lqt_get_channel_setup to know the whole truth.

## Enumeration Type Documentation

enum lqt_channel_t

Channel definitions.

These are the channel types defined in the public API. They should enable to support most channel configurations. Internally, many more channel types exist. They can be added to the public part on demand.

## Function Documentation

const char* lqt_channel_to_string | ( | lqt_channel_t | ch | ) |

Convert a channel identifier to a human readnable string.

Parameters:

  | ch | A channel

Returns:
  A string describing the channel.

void lqt_set_channel_setup | ( | quicktime_t * | file,
|  | int | track,
|  | lqt_channel_t * | ch |
| ) |  |  |

Set a channel setup for an audio track.

Parameters:

  | file | A quicktime handle
  | track | index (starting with 0)
  | ch | Channel array

Set the desired channel setup for a file. Note, that libquicktime may reorder the channels. It is therefore necessary to call lqt_get_channel_setup after to know the final truth.

const lqt_channel_t* lqt_get_channel_setup | ( | quicktime_t * | file,
|  | int | track |
| ) |  |  |

Get a channel setup from a file.

Parameters:

  | file | A quicktime handle
  | track | index (starting with 0)

Returns:
  The channel array

Get the channel setup from a quicktime file. Works for en- and decoding. The return value is owned by libquicktime and must not be freed.