diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-12-31 07:57:59 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-12-12 21:22:49 +0100 |
commit | 2c6811397bdf13d43ca206e48d6d6da9c2cd47c6 (patch) | |
tree | 75909934dcab62130bd60a14e9369ef6b78278a1 /libavcodec/avcodec.h | |
parent | cdc9ce098e8d101b43b8f68dd35ba7226f4a728c (diff) | |
download | ffmpeg-2c6811397bdf13d43ca206e48d6d6da9c2cd47c6.tar.gz |
lavc: add profiles to AVCodecDescriptor
The profiles are a property of the codec, so it makes sense to export
them through AVCodecDescriptors, not just the codec implementations.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 30a8ddb9f7..8083111605 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -503,6 +503,11 @@ typedef struct AVCodecDescriptor { * Codec properties, a combination of AV_CODEC_PROP_* flags. */ int props; + /** + * If non-NULL, an array of profiles recognized for this codec. + * Terminated with FF_PROFILE_UNKNOWN. + */ + const struct AVProfile *profiles; } AVCodecDescriptor; /** @@ -4454,6 +4459,19 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode); */ const char *av_get_profile_name(const AVCodec *codec, int profile); +/** + * Return a name for the specified profile, if available. + * + * @param codec_id the ID of the codec to which the requested profile belongs + * @param profile the profile value for which a name is requested + * @return A name for the profile if found, NULL otherwise. + * + * @note unlike av_get_profile_name(), which searches a list of profiles + * supported by a specific decoder or encoder implementation, this + * function searches the list of profiles from the AVCodecDescriptor + */ +const char *avcodec_profile_name(enum AVCodecID codec_id, int profile); + int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size); int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count); //FIXME func typedef |