lqt_codecinfo.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _LQT_CODEC_INFO_H_
00033 #define _LQT_CODEC_INFO_H_
00034
00035 #ifdef __GNUC__
00036 #pragma GCC visibility push(default)
00037 #endif
00038
00039 #include <inttypes.h>
00040
00041
00042
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046
00080 typedef enum
00081 {
00082 LQT_PARAMETER_INT,
00083 LQT_PARAMETER_FLOAT,
00084 LQT_PARAMETER_STRING,
00085 LQT_PARAMETER_STRINGLIST,
00086
00087 LQT_PARAMETER_SECTION,
00088 } lqt_parameter_type_t;
00089
00096 typedef union
00097 {
00098 int val_int;
00099 char * val_string;
00100 float val_float;
00101 } lqt_parameter_value_t;
00102
00110 typedef struct
00111 {
00112 char * name;
00114 char * real_name;
00116 lqt_parameter_type_t type;
00118 lqt_parameter_value_t val_default;
00120
00121
00122
00123
00124
00125 lqt_parameter_value_t val_min;
00126 lqt_parameter_value_t val_max;
00128 int num_digits;
00130
00131
00132
00133
00134 int num_stringlist_options;
00135 char ** stringlist_options;
00136 char ** stringlist_labels;
00138 char * help_string;
00140 } lqt_parameter_info_t;
00141
00146 typedef enum
00147 {
00148 LQT_CODEC_AUDIO,
00149 LQT_CODEC_VIDEO
00150 } lqt_codec_type;
00151
00156 typedef enum
00157 {
00158 LQT_DIRECTION_ENCODE,
00159 LQT_DIRECTION_DECODE,
00160 LQT_DIRECTION_BOTH
00161 } lqt_codec_direction;
00162
00172 typedef struct
00173 {
00174 int width;
00175 int height;
00176 } lqt_image_size_t;
00177
00178
00183 #define LQT_CODEC_OBSOLETE (1<<24)
00184
00189 struct lqt_codec_info_s
00190 {
00191 int compatibility_flags;
00193
00194
00195 char * name;
00196 char * long_name;
00197 char * description;
00199 lqt_codec_type type;
00200 lqt_codec_direction direction;
00202 int num_fourccs;
00203 char ** fourccs;
00205 int num_wav_ids;
00206 int * wav_ids;
00209 int num_encoding_parameters;
00210 lqt_parameter_info_t * encoding_parameters;
00212 int num_decoding_parameters;
00213 lqt_parameter_info_t * decoding_parameters;
00215
00216
00217 char * module_filename;
00218 int module_index;
00220 uint32_t file_time;
00222 char * gettext_domain;
00223 char * gettext_directory;
00225 int num_encoding_colormodels;
00226 int * encoding_colormodels;
00228 int num_image_sizes;
00230 lqt_image_size_t * image_sizes;
00232 lqt_compression_id_t compression_id;
00234 struct lqt_codec_info_s * next;
00235 };
00236
00237
00238
00239
00247 void lqt_registry_init();
00248
00257 void lqt_registry_destroy();
00258
00259
00260
00261
00262
00263
00264
00265 void lqt_registry_write();
00266
00267
00268
00269
00270
00271
00272
00273
00281 int lqt_get_num_audio_codecs();
00282
00290 int lqt_get_num_video_codecs();
00291
00300 const lqt_codec_info_t * lqt_get_audio_codec_info(int index);
00301
00310 const lqt_codec_info_t * lqt_get_video_codec_info(int index);
00311
00312
00313
00314
00315
00316
00317
00318
00331 lqt_codec_info_t ** lqt_query_registry(int audio, int video,
00332 int encode, int decode);
00333
00344 lqt_codec_info_t ** lqt_find_audio_codec(char * fourcc, int encode);
00345
00356 lqt_codec_info_t ** lqt_find_audio_codec_by_wav_id(int wav_id, int encode);
00357
00368 lqt_codec_info_t ** lqt_find_video_codec(char * fourcc, int encode);
00369
00370
00371
00372
00373
00374
00384 lqt_codec_info_t ** lqt_find_audio_codec_by_name(const char * name);
00385
00395 lqt_codec_info_t ** lqt_find_video_codec_by_name(const char * name);
00396
00407 lqt_codec_info_t ** lqt_audio_codec_from_file(quicktime_t * file, int track);
00408
00419 lqt_codec_info_t ** lqt_video_codec_from_file(quicktime_t * file, int track);
00420
00429 void lqt_destroy_codec_info(lqt_codec_info_t ** info);
00430
00442 void lqt_reorder_audio_codecs(lqt_codec_info_t ** codec_info);
00443
00455 void lqt_reorder_video_codecs(lqt_codec_info_t ** codec_info);
00456
00470 void lqt_set_default_parameter(lqt_codec_type type, int encode,
00471 const char * codec_name,
00472 const char * parameter_name,
00473 lqt_parameter_value_t * val);
00474
00485 void lqt_restore_default_parameters(lqt_codec_info_t * codec_info,
00486 int encode, int decode);
00487
00488
00497 void lqt_dump_codec_info(const lqt_codec_info_t * info);
00498
00499 #ifdef __cplusplus
00500 }
00501 #endif
00502
00503 #ifdef __GNUC__
00504 #pragma GCC visibility pop
00505 #endif
00506
00507 #endif