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 #pragma GCC visibility push(default)
00036
00037 #include <inttypes.h>
00038
00039
00040
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
00044
00078 typedef enum
00079 {
00080 LQT_PARAMETER_INT,
00081 LQT_PARAMETER_FLOAT,
00082 LQT_PARAMETER_STRING,
00083 LQT_PARAMETER_STRINGLIST,
00084
00085 LQT_PARAMETER_SECTION,
00086 } lqt_parameter_type_t;
00087
00094 typedef union
00095 {
00096 int val_int;
00097 char * val_string;
00098 float val_float;
00099 } lqt_parameter_value_t;
00100
00108 typedef struct
00109 {
00110 char * name;
00112 char * real_name;
00114 lqt_parameter_type_t type;
00116 lqt_parameter_value_t val_default;
00118
00119
00120
00121
00122
00123 lqt_parameter_value_t val_min;
00124 lqt_parameter_value_t val_max;
00126 int num_digits;
00128
00129
00130
00131
00132 int num_stringlist_options;
00133 char ** stringlist_options;
00134 char ** stringlist_labels;
00136 char * help_string;
00138 } lqt_parameter_info_t;
00139
00144 typedef enum
00145 {
00146 LQT_CODEC_AUDIO,
00147 LQT_CODEC_VIDEO
00148 } lqt_codec_type;
00149
00154 typedef enum
00155 {
00156 LQT_DIRECTION_ENCODE,
00157 LQT_DIRECTION_DECODE,
00158 LQT_DIRECTION_BOTH
00159 } lqt_codec_direction;
00160
00170 typedef struct
00171 {
00172 int width;
00173 int height;
00174 } lqt_image_size_t;
00175
00176
00181 #define LQT_CODEC_OBSOLETE (1<<24)
00182
00187 struct lqt_codec_info_s
00188 {
00189 int compatibility_flags;
00191
00192
00193 char * name;
00194 char * long_name;
00195 char * description;
00197 lqt_codec_type type;
00198 lqt_codec_direction direction;
00200 int num_fourccs;
00201 char ** fourccs;
00203 int num_wav_ids;
00204 int * wav_ids;
00207 int num_encoding_parameters;
00208 lqt_parameter_info_t * encoding_parameters;
00210 int num_decoding_parameters;
00211 lqt_parameter_info_t * decoding_parameters;
00213
00214
00215 char * module_filename;
00216 int module_index;
00218 uint32_t file_time;
00220 char * gettext_domain;
00221 char * gettext_directory;
00223 int num_encoding_colormodels;
00224 int * encoding_colormodels;
00226 int num_image_sizes;
00228 lqt_image_size_t * image_sizes;
00230 lqt_compression_id_t compression_id;
00232 struct lqt_codec_info_s * next;
00233 };
00234
00235
00236
00237
00245 void lqt_registry_init();
00246
00255 void lqt_registry_destroy();
00256
00257
00258
00259
00260
00261
00262
00263 void lqt_registry_write();
00264
00265
00266
00267
00268
00269
00270
00271
00279 int lqt_get_num_audio_codecs();
00280
00288 int lqt_get_num_video_codecs();
00289
00298 const lqt_codec_info_t * lqt_get_audio_codec_info(int index);
00299
00308 const lqt_codec_info_t * lqt_get_video_codec_info(int index);
00309
00310
00311
00312
00313
00314
00315
00316
00329 lqt_codec_info_t ** lqt_query_registry(int audio, int video,
00330 int encode, int decode);
00331
00342 lqt_codec_info_t ** lqt_find_audio_codec(char * fourcc, int encode);
00343
00354 lqt_codec_info_t ** lqt_find_audio_codec_by_wav_id(int wav_id, int encode);
00355
00366 lqt_codec_info_t ** lqt_find_video_codec(char * fourcc, int encode);
00367
00368
00369
00370
00371
00372
00382 lqt_codec_info_t ** lqt_find_audio_codec_by_name(const char * name);
00383
00393 lqt_codec_info_t ** lqt_find_video_codec_by_name(const char * name);
00394
00405 lqt_codec_info_t ** lqt_audio_codec_from_file(quicktime_t * file, int track);
00406
00417 lqt_codec_info_t ** lqt_video_codec_from_file(quicktime_t * file, int track);
00418
00427 void lqt_destroy_codec_info(lqt_codec_info_t ** info);
00428
00440 void lqt_reorder_audio_codecs(lqt_codec_info_t ** codec_info);
00441
00453 void lqt_reorder_video_codecs(lqt_codec_info_t ** codec_info);
00454
00468 void lqt_set_default_parameter(lqt_codec_type type, int encode,
00469 const char * codec_name,
00470 const char * parameter_name,
00471 lqt_parameter_value_t * val);
00472
00483 void lqt_restore_default_parameters(lqt_codec_info_t * codec_info,
00484 int encode, int decode);
00485
00486
00495 void lqt_dump_codec_info(const lqt_codec_info_t * info);
00496
00497 #ifdef __cplusplus
00498 }
00499 #endif
00500
00501 #pragma GCC visibility pop
00502
00503 #endif