Modules | |
Structures describing codec parameters | |
Informations about supported codec parameters. | |
Data Structures | |
struct | lqt_codec_info_s |
Structure describing a codec. More... | |
Typedefs | |
typedef lqt_codec_info_s | lqt_codec_info_t |
Structure describing a codec. | |
Enumerations | |
enum | lqt_codec_type { LQT_CODEC_AUDIO, LQT_CODEC_VIDEO } |
Type of a codec (Audio or video). More... | |
enum | lqt_codec_direction { LQT_DIRECTION_ENCODE, LQT_DIRECTION_DECODE, LQT_DIRECTION_BOTH } |
Direction of the codec. More... | |
Functions | |
void | lqt_registry_init () |
Initialize the codec registry. | |
void | lqt_registry_destroy () |
Destroy the codec registry. | |
int | lqt_get_num_audio_codecs () |
Return the number of installed audio codecs. | |
int | lqt_get_num_video_codecs () |
Return the number of installed video codecs. | |
const lqt_codec_info_t * | lqt_get_audio_codec_info (int index) |
Return an audio codec. | |
const lqt_codec_info_t * | lqt_get_video_codec_info (int index) |
Return a video codec. | |
lqt_codec_info_t ** | lqt_query_registry (int audio, int video, int encode, int decode) |
Return an array of any combination of audio/video en/decoders. | |
lqt_codec_info_t ** | lqt_find_audio_codec (char *fourcc, int encode) |
Find an audio codec for a given fourcc. | |
lqt_codec_info_t ** | lqt_find_audio_codec_by_wav_id (int wav_id, int encode) |
Find an audio codec for a given WAV ID. | |
lqt_codec_info_t ** | lqt_find_video_codec (char *fourcc, int encode) |
Find a video codec for a given fourcc. | |
lqt_codec_info_t ** | lqt_find_audio_codec_by_name (const char *name) |
Find an audio codec by its name. | |
lqt_codec_info_t ** | lqt_find_video_codec_by_name (const char *name) |
Find a video codec by its name. | |
lqt_codec_info_t ** | lqt_audio_codec_from_file (quicktime_t *file, int track) |
Get an audio codec from an open file. | |
lqt_codec_info_t ** | lqt_video_codec_from_file (quicktime_t *file, int track) |
Get a video codec from an open file. | |
void | lqt_destroy_codec_info (lqt_codec_info_t **info) |
Destroy a codec info array. | |
void | lqt_reorder_audio_codecs (lqt_codec_info_t **codec_info) |
Reorder audio codecs. | |
void | lqt_reorder_video_codecs (lqt_codec_info_t **codec_info) |
Reorder video codecs. | |
void | lqt_set_default_parameter (lqt_codec_type type, int encode, const char *codec_name, const char *parameter_name, lqt_parameter_value_t *val) |
Change a default value for a codec parameter. | |
void | lqt_restore_default_parameters (lqt_codec_info_t *codec_info, int encode, int decode) |
Restore a default parameter from the codec module. | |
void | lqt_dump_codec_info (const lqt_codec_info_t *info) |
Dump a codec info to stderr. |
One of the goals when forking libquicktime was to have a modular structure. Codecs were moved to plugins and were compiled according to the dependencies found by the configure script. As a result, a mechanism became necessary for finding informations about available codecs at runtime, their properties, supported parameters etc.
The codec parameters are defined in a way that GUI configuration dialogs can be built at runtime. An example for this is the libquicktime_config utility.
Libquicktime saves data of the codecs in the file .libquicktime_codecs in your home directory. This saves the long time needed for opening each codec module to see what's inside. The codec registry can be configured with the libquicktime_config program.
typedef struct lqt_codec_info_s lqt_codec_info_t |
Structure describing a codec.
enum lqt_codec_type |
Type of a codec (Audio or video).
enum lqt_codec_direction |
Direction of the codec.
void lqt_registry_init | ( | ) |
Initialize the codec registry.
Under normal circumstances, you never need to call this function, since the registry is always initialized on demand.
void lqt_registry_destroy | ( | ) |
Destroy the codec registry.
This frees memory for the whole codec database. It is normally called automatically, but you will need to call it exclicitely, if you want to reinitialize the codec registry at runtime
int lqt_get_num_audio_codecs | ( | ) |
Return the number of installed audio codecs.
int lqt_get_num_video_codecs | ( | ) |
Return the number of installed video codecs.
const lqt_codec_info_t* lqt_get_audio_codec_info | ( | int | index | ) |
Return an audio codec.
index | Index of the codec |
const lqt_codec_info_t* lqt_get_video_codec_info | ( | int | index | ) |
Return a video codec.
index | Index of the codec |
lqt_codec_info_t** lqt_query_registry | ( | int | audio, | |
int | video, | |||
int | encode, | |||
int | decode | |||
) |
Return an array of any combination of audio/video en/decoders.
audio | Set this to 1 if you want audio codecs to be returned | |
video | Set this to 1 if you want video codecs to be returned | |
encode | Set this to 1 if you want encoders to be returned | |
decode | Set this to 1 if you want decoders to be returned |
lqt_codec_info_t** lqt_find_audio_codec | ( | char * | fourcc, | |
int | encode | |||
) |
Find an audio codec for a given fourcc.
fourcc | A four character code | |
encode | Set to 1 to return encoders, 0 to return decoders |
lqt_codec_info_t** lqt_find_audio_codec_by_wav_id | ( | int | wav_id, | |
int | encode | |||
) |
Find an audio codec for a given WAV ID.
wav_id | A 16 bit audio codec ID as found in WAV and AVI files | |
encode | Set to 1 to return encoders, 0 to return decoders |
lqt_codec_info_t** lqt_find_video_codec | ( | char * | fourcc, | |
int | encode | |||
) |
Find a video codec for a given fourcc.
fourcc | A four character code | |
encode | Set to 1 to return encoders, 0 to return decoders |
lqt_codec_info_t** lqt_find_audio_codec_by_name | ( | const char * | name | ) |
Find an audio codec by its name.
name | Short name of the codec (see lqt_codec_info_s) |
lqt_codec_info_t** lqt_find_video_codec_by_name | ( | const char * | name | ) |
Find a video codec by its name.
name | Short name of the codec (see lqt_codec_info_s) |
lqt_codec_info_t** lqt_audio_codec_from_file | ( | quicktime_t * | file, | |
int | track | |||
) |
Get an audio codec from an open file.
file | A quicktime handle | |
track | Index if the track (starting with 0) |
lqt_codec_info_t** lqt_video_codec_from_file | ( | quicktime_t * | file, | |
int | track | |||
) |
Get a video codec from an open file.
file | A quicktime handle | |
track | Index if the track (starting with 0) |
void lqt_destroy_codec_info | ( | lqt_codec_info_t ** | info | ) |
Destroy a codec info array.
info | A NULL terminated array of codec infos returned by one of the query functions. |
void lqt_reorder_audio_codecs | ( | lqt_codec_info_t ** | codec_info | ) |
Reorder audio codecs.
codec_info | A NULL terminated array of codec infos |
void lqt_reorder_video_codecs | ( | lqt_codec_info_t ** | codec_info | ) |
Reorder video codecs.
codec_info | A NULL terminated array of codec infos |
void lqt_set_default_parameter | ( | lqt_codec_type | type, | |
int | encode, | |||
const char * | codec_name, | |||
const char * | parameter_name, | |||
lqt_parameter_value_t * | val | |||
) |
Change a default value for a codec parameter.
type | The type of the codec (audio or video) | |
encode | 1 for encode parameter, 0 for decode parameter | |
codec_name | The short name of the codec | |
parameter_name | The short name of the parameter to change | |
val | The new value for the parameter |
void lqt_restore_default_parameters | ( | lqt_codec_info_t * | codec_info, | |
int | encode, | |||
int | decode | |||
) |
Restore a default parameter from the codec module.
codec_info | A codec info referring to the codec | |
encode | Set this to 1 to restore encoding parameters, 0 else | |
decode | Set this to 1 to restore decoding parameters, 0 else |
void lqt_dump_codec_info | ( | const lqt_codec_info_t * | info | ) |
Dump a codec info to stderr.
info | A codec info |