From 86ab7b0f2fc1e32924603731be9fdee0854f9e7e Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 1 Jul 2012 11:51:30 +0200 Subject: Create version.h headers for libraries that lack them --- libavdevice/Makefile | 3 ++- libavdevice/avdevice.h | 16 ++-------------- libavdevice/version.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 libavdevice/version.h (limited to 'libavdevice') diff --git a/libavdevice/Makefile b/libavdevice/Makefile index bc55405470..7f142176e6 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -1,7 +1,8 @@ NAME = avdevice FFLIBS = avformat avcodec avutil -HEADERS = avdevice.h +HEADERS = avdevice.h \ + version.h \ OBJS = alldevices.o \ avdevice.o \ diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index c010af2fb9..0efe2a7c38 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -19,6 +19,8 @@ #ifndef AVDEVICE_AVDEVICE_H #define AVDEVICE_AVDEVICE_H +#include "version.h" + /** * @file * @ingroup lavd @@ -41,20 +43,6 @@ * @} */ -#include "libavutil/avutil.h" - -#define LIBAVDEVICE_VERSION_MAJOR 53 -#define LIBAVDEVICE_VERSION_MINOR 2 -#define LIBAVDEVICE_VERSION_MICRO 0 - -#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ - LIBAVDEVICE_VERSION_MINOR, \ - LIBAVDEVICE_VERSION_MICRO) -#define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \ - LIBAVDEVICE_VERSION_MINOR, \ - LIBAVDEVICE_VERSION_MICRO) -#define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT - /** * Return the LIBAVDEVICE_VERSION_INT constant. */ diff --git a/libavdevice/version.h b/libavdevice/version.h new file mode 100644 index 0000000000..6ed3817cf5 --- /dev/null +++ b/libavdevice/version.h @@ -0,0 +1,42 @@ +/* + * This file is part of Libav. + * + * Libav 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. + * + * Libav 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 Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_VERSION_H +#define AVDEVICE_VERSION_H + +/** + * @file + * @ingroup lavd + * Libavdevice version macros + */ + +#include "libavutil/avutil.h" + +#define LIBAVDEVICE_VERSION_MAJOR 53 +#define LIBAVDEVICE_VERSION_MINOR 2 +#define LIBAVDEVICE_VERSION_MICRO 0 + +#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ + LIBAVDEVICE_VERSION_MINOR, \ + LIBAVDEVICE_VERSION_MICRO) +#define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \ + LIBAVDEVICE_VERSION_MINOR, \ + LIBAVDEVICE_VERSION_MICRO) +#define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT + +#endif /* AVDEVICE_VERSION_H */ -- cgit v1.2.3 From 2047e40e6e3e1e887085b92f4f3d8cadc048f030 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 3 Jul 2012 22:42:42 +0200 Subject: Clarify Doxygen comment for FF_API_* #defines. --- libavcodec/version.h | 6 ++++-- libavdevice/version.h | 6 ++++++ libavfilter/version.h | 6 ++++-- libavformat/version.h | 6 ++++-- libavresample/version.h | 5 +++-- libavutil/version.h | 9 ++++----- libswscale/version.h | 6 ++++-- 7 files changed, 29 insertions(+), 15 deletions(-) (limited to 'libavdevice') diff --git a/libavcodec/version.h b/libavcodec/version.h index 1e189f6390..cb2373848e 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -41,9 +41,11 @@ #define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION) /** - * These FF_API_* defines are not part of the public API. - * They may change, break or disappear at any time. + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. */ + #ifndef FF_API_REQUEST_CHANNELS #define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 55) #endif diff --git a/libavdevice/version.h b/libavdevice/version.h index 6ed3817cf5..52b47db546 100644 --- a/libavdevice/version.h +++ b/libavdevice/version.h @@ -39,4 +39,10 @@ LIBAVDEVICE_VERSION_MICRO) #define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + */ + #endif /* AVDEVICE_VERSION_H */ diff --git a/libavfilter/version.h b/libavfilter/version.h index 88bdd4a821..c1292bb70d 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -41,9 +41,11 @@ #define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT /** - * These FF_API_* defines are not part of the public API. - * They may change, break or disappear at any time. + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. */ + #ifndef FF_API_AVFILTERPAD_PUBLIC #define FF_API_AVFILTERPAD_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 4) #endif diff --git a/libavformat/version.h b/libavformat/version.h index 26bb2c596e..0017698cce 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -44,9 +44,11 @@ #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) /** - * These FF_API_* defines are not part of the public API. - * They may change, break or disappear at any time. + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. */ + #ifndef FF_API_CLOSE_INPUT_FILE #define FF_API_CLOSE_INPUT_FILE (LIBAVFORMAT_VERSION_MAJOR < 55) #endif diff --git a/libavresample/version.h b/libavresample/version.h index 63f07f5e84..c4741e420e 100644 --- a/libavresample/version.h +++ b/libavresample/version.h @@ -34,8 +34,9 @@ #define LIBAVRESAMPLE_IDENT "Lavr" AV_STRINGIFY(LIBAVRESAMPLE_VERSION) /** - * These FF_API_* defines are not part of public API. - * They may change, break or disappear at any time. + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. */ #endif /* AVRESAMPLE_VERSION_H */ diff --git a/libavutil/version.h b/libavutil/version.h index 426146562e..c42c6b0bc4 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -54,14 +54,13 @@ * @} * * @defgroup depr_guards Deprecation guards - * These FF_API_* defines are not part of the public API. - * They may change, break or disappear at any time. - * - * They are used mostly internally to mark code that will be removed - * on the next major version. + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. * * @{ */ + #ifndef FF_API_GET_BITS_PER_SAMPLE_FMT #define FF_API_GET_BITS_PER_SAMPLE_FMT (LIBAVUTIL_VERSION_MAJOR < 52) #endif diff --git a/libswscale/version.h b/libswscale/version.h index f1d95bc691..32bb2f5887 100644 --- a/libswscale/version.h +++ b/libswscale/version.h @@ -41,9 +41,11 @@ #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION) /** - * Those FF_API_* defines are not part of public API. - * They may change, break or disappear at any time. + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. */ + #ifndef FF_API_SWS_GETCONTEXT #define FF_API_SWS_GETCONTEXT (LIBSWSCALE_VERSION_MAJOR < 3) #endif -- cgit v1.2.3