[FFmpeg-cvslog] r25652 - in trunk: doc/APIchanges libavcodec/avcodec.h libavcore/Makefile libavcore/avcore.h libavcore/samplefmt.h
stefano
subversion
Tue Nov 2 21:45:46 CET 2010
Author: stefano
Date: Tue Nov 2 21:45:46 2010
New Revision: 25652
Log:
Move sample format definitions from libavcodec to libavcore.
Added:
trunk/libavcore/samplefmt.h
Modified:
trunk/doc/APIchanges
trunk/libavcodec/avcodec.h
trunk/libavcore/Makefile
trunk/libavcore/avcore.h
Modified: trunk/doc/APIchanges
==============================================================================
--- trunk/doc/APIchanges Tue Nov 2 21:37:01 2010 (r25651)
+++ trunk/doc/APIchanges Tue Nov 2 21:45:46 2010 (r25652)
@@ -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.
Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h Tue Nov 2 21:37:01 2010 (r25651)
+++ trunk/libavcodec/avcodec.h Tue Nov 2 21:45:46 2010 (r25652)
@@ -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
Modified: trunk/libavcore/Makefile
==============================================================================
--- trunk/libavcore/Makefile Tue Nov 2 21:37:01 2010 (r25651)
+++ trunk/libavcore/Makefile Tue Nov 2 21:45:46 2010 (r25652)
@@ -6,6 +6,7 @@ FFLIBS = avutil
HEADERS = avcore.h \
imgutils.h \
parseutils.h \
+ samplefmt.h \
OBJS = imgutils.o \
parseutils.o \
Modified: trunk/libavcore/avcore.h
==============================================================================
--- trunk/libavcore/avcore.h Tue Nov 2 21:37:01 2010 (r25651)
+++ trunk/libavcore/avcore.h Tue Nov 2 21:45:46 2010 (r25652)
@@ -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, \
Added: trunk/libavcore/samplefmt.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/libavcore/samplefmt.h Tue Nov 2 21:45:46 2010 (r25652)
@@ -0,0 +1,35 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCORE_SAMPLEFMT_H
+#define AVCORE_SAMPLEFMT_H
+
+/**
+ * all in native-endian format
+ */
+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 */
More information about the ffmpeg-cvslog
mailing list