[SCM] libav/experimental: Move sample format definitions from libavcodec to libavcore.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:18:31 UTC 2013
The following commit has been merged in the experimental branch:
commit 262d1c5d2206467809fd81d841d09ad70cc8ba13
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date: Tue Nov 2 20:45:46 2010 +0000
Move sample format definitions from libavcodec to libavcore.
Originally committed as revision 25652 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/doc/APIchanges b/doc/APIchanges
index b92e5dc..eaa112f 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,10 @@ libavutil: 2009-03-08
API changes, most recent first:
+2010-11-02 - r25652 - lavcore 0.10.0 - samplefmt.h
+ Define enum AVSampleFormat in libavcore/samplefmt.h, deprecate enum
+ SampleFormat.
+
2010-10-16 - r25502 - lavfi 1.52.0 - avfilter_graph_config()
Add the function avfilter_graph_config() in avfiltergraph.h.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 96d7987..571e827 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
diff --git a/libavcore/Makefile b/libavcore/Makefile
index 5e16c34..97d973f 100644
--- a/libavcore/Makefile
+++ b/libavcore/Makefile
@@ -6,6 +6,7 @@ FFLIBS = avutil
HEADERS = avcore.h \
imgutils.h \
parseutils.h \
+ samplefmt.h \
OBJS = imgutils.o \
parseutils.o \
diff --git a/libavcore/avcore.h b/libavcore/avcore.h
index a77bab8..5870817 100644
--- a/libavcore/avcore.h
+++ b/libavcore/avcore.h
@@ -27,8 +27,8 @@
#include "libavutil/avutil.h"
#define LIBAVCORE_VERSION_MAJOR 0
-#define LIBAVCORE_VERSION_MINOR 9
-#define LIBAVCORE_VERSION_MICRO 1
+#define LIBAVCORE_VERSION_MINOR 10
+#define LIBAVCORE_VERSION_MICRO 0
#define LIBAVCORE_VERSION_INT AV_VERSION_INT(LIBAVCORE_VERSION_MAJOR, \
LIBAVCORE_VERSION_MINOR, \
diff --git a/libavcodec/targa.h b/libavcore/samplefmt.h
similarity index 60%
copy from libavcodec/targa.h
copy to libavcore/samplefmt.h
index 5bc2a44..163246b 100644
--- a/libavcodec/targa.h
+++ b/libavcore/samplefmt.h
@@ -16,21 +16,20 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifndef AVCORE_SAMPLEFMT_H
+#define AVCORE_SAMPLEFMT_H
+
/**
- * @file
- * targa file common definitions
- *
- * Based on:
- * http://www.gamers.org/dEngine/quake3/TGA.txt
- *
- * and other specs you can find referenced for example in:
- * http://en.wikipedia.org/wiki/Truevision_TGA
+ * all in native-endian format
*/
-
-enum TargaCompr {
- TGA_NODATA = 0, // no image data
- TGA_PAL = 1, // palettized
- TGA_RGB = 2, // true-color
- TGA_BW = 3, // black & white or grayscale
- TGA_RLE = 8, // flag pointing that data is RLE-coded
+enum AVSampleFormat {
+ AV_SAMPLE_FMT_NONE = -1,
+ AV_SAMPLE_FMT_U8, ///< unsigned 8 bits
+ AV_SAMPLE_FMT_S16, ///< signed 16 bits
+ AV_SAMPLE_FMT_S32, ///< signed 32 bits
+ AV_SAMPLE_FMT_FLT, ///< float
+ AV_SAMPLE_FMT_DBL, ///< double
+ AV_SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if dynamically linking to libavcore
};
+
+#endif /* AVCORE_SAMPLEFMT_H */
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list