[PATCH] Define enum AVMediaType and make enum CodecType depends on that.
Stefano Sabatini
stefano.sabatini-lala
Sat Mar 13 16:01:06 CET 2010
AVMediaType enum is useful even outside libavcodec (e.g. in
libavfilter), this allows applications/libraries which needs the
AVMediaType definition to compile even without the presence of the
libavcodec headers.
---
libavcodec/avcodec.h | 18 +++++++++---------
libavutil/avutil.h | 12 +++++++++++-
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index bc7c0a0..a827cf6 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -352,15 +352,15 @@ enum CodecID {
* stream (only used by libavformat) */
};
-enum CodecType {
- CODEC_TYPE_UNKNOWN = -1,
- CODEC_TYPE_VIDEO,
- CODEC_TYPE_AUDIO,
- CODEC_TYPE_DATA,
- CODEC_TYPE_SUBTITLE,
- CODEC_TYPE_ATTACHMENT,
- CODEC_TYPE_NB
-};
+#define CodecType AVMediaType
+
+#define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN
+#define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO
+#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
+#define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA
+#define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE
+#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
+#define CODEC_TYPE_NB AVMEDIA_TYPE_NB
/**
* all in native-endian format
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 47630a7..2ba69b0 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -40,7 +40,7 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 50
-#define LIBAVUTIL_VERSION_MINOR 12
+#define LIBAVUTIL_VERSION_MINOR 13
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
@@ -68,6 +68,16 @@ const char *avutil_configuration(void);
*/
const char *avutil_license(void);
+enum AVMediaType {
+ AVMEDIA_TYPE_UNKNOWN = -1,
+ AVMEDIA_TYPE_VIDEO,
+ AVMEDIA_TYPE_AUDIO,
+ AVMEDIA_TYPE_DATA,
+ AVMEDIA_TYPE_SUBTITLE,
+ AVMEDIA_TYPE_ATTACHMENT,
+ AVMEDIA_TYPE_NB
+};
+
#include "common.h"
#include "error.h"
#include "mathematics.h"
--
1.6.6.1
--XsQoSWH+UP9D9v3l--
More information about the ffmpeg-devel
mailing list