Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-11 16:50:54 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-08-11 17:01:45 +0400
commitf5f3684fb8d3881a6f90913417b2b5272df76e49 (patch)
tree2cd82a73afe553baeed57683b861e6775ccebb6b /libavcodec/avcodec.h
parent48d20b918c80a68e61f8bdedbf335ed4a00d6a32 (diff)
parent885da7b08289321b88919e86d1574c8683a95a22 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavf: simplify is_intra_only() by using codec descriptors. lavc: add an intra-only codec property. lavc: add codec descriptors. lavc: fix mixing CODEC_ID/AV_CODEC_ID in C++ code. dict: move struct AVDictionary definition to dict.c dict: add av_dict_count() Conflicts: doc/APIchanges libavcodec/old_codec_ids.h libavformat/utils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h55
1 files changed, 52 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 263ed0e6c2..351e3720f5 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -77,9 +77,6 @@
* @{
*/
-#if FF_API_CODEC_ID
-#include "old_codec_ids.h"
-#endif
/**
* Identify the syntax and semantics of the bitstream.
@@ -459,8 +456,46 @@ enum AVCodecID {
AV_CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems
* stream (only used by libavformat) */
AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
+
+#if FF_API_CODEC_ID
+#include "old_codec_ids.h"
+#endif
};
+#if FF_API_CODEC_ID
+#define CodecID AVCodecID
+#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;
+ /**
+ * Codec properties, a combination of AV_CODEC_PROP_* flags.
+ */
+ int props;
+} AVCodecDescriptor;
+
+/**
+ * Codec uses only intra compression.
+ * Video codecs only.
+ */
+#define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
+
#if FF_API_OLD_DECODE_AUDIO
/* in bytes */
#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
@@ -4794,6 +4829,20 @@ int av_codec_is_encoder(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);
+
+/**
* @}
*/