mirror of https://git.ffmpeg.org/ffmpeg.git
lavc: add codec descriptors.
They describe properties that are inherent to a codec (as described by an AVCodecID) without referring to a specific implementation.
This commit is contained in:
parent
2ff67c909c
commit
c223d79945
|
@ -16,6 +16,7 @@ OBJS = allcodecs.o \
|
||||||
avpacket.o \
|
avpacket.o \
|
||||||
bitstream.o \
|
bitstream.o \
|
||||||
bitstream_filter.o \
|
bitstream_filter.o \
|
||||||
|
codec_desc.o \
|
||||||
dsputil.o \
|
dsputil.o \
|
||||||
faanidct.o \
|
faanidct.o \
|
||||||
fmtconvert.o \
|
fmtconvert.o \
|
||||||
|
|
|
@ -435,6 +435,26 @@ enum AVCodecID {
|
||||||
#define CodecID AVCodecID
|
#define CodecID AVCodecID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This struct describes the properties of a single codec described by an
|
||||||
|
* AVCodecID.
|
||||||
|
* @see avcodec_get_descriptor()
|
||||||
|
*/
|
||||||
|
typedef struct AVCodecDescriptor {
|
||||||
|
enum AVCodecID id;
|
||||||
|
enum AVMediaType type;
|
||||||
|
/**
|
||||||
|
* Name of the codec described by this descriptor. It is non-empty and
|
||||||
|
* unique for each codec descriptor. It should contain alphanumeric
|
||||||
|
* characters and '_' only.
|
||||||
|
*/
|
||||||
|
const char *name;
|
||||||
|
/**
|
||||||
|
* A more descriptive name for this codec. May be NULL.
|
||||||
|
*/
|
||||||
|
const char *long_name;
|
||||||
|
} AVCodecDescriptor;
|
||||||
|
|
||||||
#if FF_API_OLD_DECODE_AUDIO
|
#if FF_API_OLD_DECODE_AUDIO
|
||||||
/* in bytes */
|
/* in bytes */
|
||||||
#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
|
#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
|
||||||
|
@ -4504,6 +4524,20 @@ int av_codec_is_encoder(AVCodec *codec);
|
||||||
*/
|
*/
|
||||||
int av_codec_is_decoder(AVCodec *codec);
|
int av_codec_is_decoder(AVCodec *codec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return descriptor for given codec ID or NULL if no descriptor exists.
|
||||||
|
*/
|
||||||
|
const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterate over all codec descriptors known to libavcodec.
|
||||||
|
*
|
||||||
|
* @param prev previous descriptor. NULL to get the first descriptor.
|
||||||
|
*
|
||||||
|
* @return next descriptor or NULL after the last descriptor
|
||||||
|
*/
|
||||||
|
const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue