aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-02 20:45:46 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-02 20:45:46 +0000
commit262d1c5d2206467809fd81d841d09ad70cc8ba13 (patch)
tree07b02781e1fbf22e5386d45d8f08683c35f9ded2 /libavcodec
parent7e35d8596b4abdf2331c7fb2bf1a73e8be08c4a8 (diff)
downloadffmpeg-262d1c5d2206467809fd81d841d09ad70cc8ba13.tar.gz
Move sample format definitions from libavcodec to libavcore.
Originally committed as revision 25652 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 96d7987bdd..571e8271b7 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -27,12 +27,13 @@
*/
#include <errno.h>
+#include "libavcore/samplefmt.h"
#include "libavutil/avutil.h"
#include "libavutil/cpu.h"
#define LIBAVCODEC_VERSION_MAJOR 52
#define LIBAVCODEC_VERSION_MINOR 94
-#define LIBAVCODEC_VERSION_MICRO 0
+#define LIBAVCODEC_VERSION_MICRO 1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
@@ -75,6 +76,9 @@
#ifndef FF_API_INOFFICIAL
#define FF_API_INOFFICIAL (LIBAVCODEC_VERSION_MAJOR < 53)
#endif
+#ifndef FF_API_OLD_SAMPLE_FMT
+#define FF_API_OLD_SAMPLE_FMT (LIBAVCODEC_VERSION_MAJOR < 53)
+#endif
#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
#define AV_TIME_BASE 1000000
@@ -410,18 +414,17 @@ enum CodecID {
#define CODEC_TYPE_NB AVMEDIA_TYPE_NB
#endif
-/**
- * all in native-endian format
- */
-enum SampleFormat {
- SAMPLE_FMT_NONE = -1,
- SAMPLE_FMT_U8, ///< unsigned 8 bits
- SAMPLE_FMT_S16, ///< signed 16 bits
- SAMPLE_FMT_S32, ///< signed 32 bits
- SAMPLE_FMT_FLT, ///< float
- SAMPLE_FMT_DBL, ///< double
- SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if dynamically linking to libavcodec
-};
+#if FF_API_OLD_SAMPLE_FMT
+#define SampleFormat AVSampleFormat
+
+#define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
+#define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8
+#define SAMPLE_FMT_S16 AV_SAMPLE_FMT_S16
+#define SAMPLE_FMT_S32 AV_SAMPLE_FMT_S32
+#define SAMPLE_FMT_FLT AV_SAMPLE_FMT_FLT
+#define SAMPLE_FMT_DBL AV_SAMPLE_FMT_DBL
+#define SAMPLE_FMT_NB AV_SAMPLE_FMT_NB
+#endif
/* Audio channel masks */
#define CH_FRONT_LEFT 0x00000001