📄 lqt_codecinfo.h
字号:
/******************************************************************************* lqt_codecinfo.h libquicktime - A library for reading and writing quicktime/avi/mp4 files. http://libquicktime.sourceforge.net Copyright (C) 2002 Heroine Virtual Ltd. Copyright (C) 2002-2007 Members of the libquicktime project. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA*******************************************************************************//* * Codec info structure for libquicktime * (first approximation) *//* Type of a codec parameter */#ifndef _LQT_CODEC_INFO_H_#define _LQT_CODEC_INFO_H_#pragma GCC visibility push(default)#include <inttypes.h>#ifdef __cplusplusextern "C" {#endif /* __cplusplus *//** \defgroup codec_registry Codec registry \brief Informations about installed codecs 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.*//** \defgroup codec_parameters Structures describing codec parameters \ingroup codec_registry \brief Informations about supported codec parameters*/ /** \ingroup codec_parameters \brief Parameter types These describe the datatypes of a parameter. */typedef enum { LQT_PARAMETER_INT, /*!< Integer */ LQT_PARAMETER_FLOAT, /*!< Float */ LQT_PARAMETER_STRING, /*!< String */ LQT_PARAMETER_STRINGLIST, /*!< String with fixed set of options */ /* This dummy type is used to separate sections (real_name will be on tab-label) */ LQT_PARAMETER_SECTION, /*!< Dummy type to group parameters into sections. */ } lqt_parameter_type_t;/** \ingroup codec_parameters \brief Union for holding parameter values */typedef union { int val_int; /*!< For integer parameters */ char * val_string; /*!< For string parameters */ float val_float; /*!< For floating point parameters */ } lqt_parameter_value_t;/** \ingroup codec_parameters * \brief Structure describing a parameter * * This completely describes a parameter. Bool parameters will have the type * \ref LQT_PARAMETER_INT , val_min = 0 and val_max = 1. */typedef struct { char * name; /*!< Parameter name to be passed to on of the parameter setting functions */ char * real_name; /*!< More human readable name for configuration dialogs */ lqt_parameter_type_t type; /*!< Datatype */ lqt_parameter_value_t val_default; /*!< Default value */ /* * Minimum and maximum values: * These are only valid for numeric types and if val_min < val_max */ lqt_parameter_value_t val_min; /*!< Minimum value for integer or float parameter */ lqt_parameter_value_t val_max; /*!< Maximum value for integer or float parameter */ int num_digits; /*!< Number of digits for floating point parameters */ /* * Possible options (only valid for LQT_STRINGLIST) */ int num_stringlist_options; /*!< Number of options for \ref LQT_PARAMETER_STRINGLIST */ char ** stringlist_options; /*!< Options for \ref LQT_PARAMETER_STRINGLIST */ char ** stringlist_labels; /*!< Labels for \ref LQT_PARAMETER_STRINGLIST */ char * help_string; /*!< Detailed help about the parameter */ } lqt_parameter_info_t;/** \ingroup codec_registry \brief Type of a codec (Audio or video)*/typedef enum { LQT_CODEC_AUDIO, LQT_CODEC_VIDEO } lqt_codec_type;/** \ingroup codec_registry \brief Direction of the codec*/ typedef enum { LQT_DIRECTION_ENCODE, LQT_DIRECTION_DECODE, LQT_DIRECTION_BOTH } lqt_codec_direction;/** \ingroup codec_registry \brief Structure describing a codec*/ typedef struct lqt_codec_info_s { int compatibility_flags; /*!< Compatibility flags (not used right now) */ /* These are set by the plugins */ char * name; /*!< Name of the codec (used internally) */ char * long_name; /*!< More human readable name of the codec */ char * description; /*!< Description */ lqt_codec_type type; /*!< Type (audio or video) */ lqt_codec_direction direction; /*!< Direction (encode, decode or both) */ int num_fourccs; /*!< Number of fourccs (Four character codes), this codec can handle */ char ** fourccs; /*!< Fourccs this codec can handle */ int num_wav_ids; /*!< Number of M$ wav ids, this codec can handle */ int * wav_ids; /*!< Wav ids, this codec can handle (for AVI only) */ int num_encoding_parameters; /*!< Number of encoding parameters */ lqt_parameter_info_t * encoding_parameters; /*!< Encoding parameters */ int num_decoding_parameters; /*!< Number of decoding parameters */ lqt_parameter_info_t * decoding_parameters; /*!< Decoding parameters */ /* The following members are set by libquicktime */ char * module_filename; /*!< Filename of the module */ int module_index; /*!< Index inside the module */ uint32_t file_time; /*!< File modification time of the module */ char * gettext_domain; /*!< First argument to bindtextdomain(). Must be set only for externally packaged codecs */ char * gettext_directory; /*!< Second argument to bindtextdomain(). Must be set only for externally packaged codecs */ struct lqt_codec_info_s * next; /*!< For chaining (used internally only) */ } lqt_codec_info_t;/* Global Entry points *//** \ingroup codec_registry \brief 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_init();/** \ingroup codec_registry * \brief 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 */void lqt_registry_destroy();/* \ingroup codec_registry * * Save the registry file $HOME/.libquicktime_codecs. * Under normal circumstances, you never need to call this function */void lqt_registry_write();/****************************************************** * Non thread save functions for querying the * codec registry. Suitable for single threaded
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -