[FFmpeg-devel] [PATCH 3/5] swresample: Create version.h header
Stefano Sabatini
stefasab at gmail.com
Thu Sep 27 10:29:51 CEST 2012
On date Thursday 2012-09-27 04:35:31 -0300, jamal encoded:
> ---
> configure | 2 +-
> libswresample/Makefile | 3 ++-
> libswresample/swresample.h | 8 +-------
> libswresample/version.h | 39 +++++++++++++++++++++++++++++++++++++++
> 4 files changed, 43 insertions(+), 9 deletions(-)
> create mode 100644 libswresample/version.h
>
> diff --git a/configure b/configure
> index 1737532..8b6969c 100755
> --- a/configure
> +++ b/configure
> @@ -4234,7 +4234,6 @@ fi
> }
>
> get_version_old LIBPOSTPROC libpostproc/version.h
> -get_version_old LIBSWRESAMPLE libswresample/swresample.h
>
> get_version libavcodec
> get_version libavdevice
> @@ -4242,6 +4241,7 @@ get_version libavfilter
> get_version libavformat
> get_version libavresample
> get_version libavutil
> +get_version libswresample
> get_version libswscale
>
> cat > $TMPH <<EOF
> diff --git a/libswresample/Makefile b/libswresample/Makefile
> index 0a5c5d2..d85ed8b 100644
> --- a/libswresample/Makefile
> +++ b/libswresample/Makefile
> @@ -3,7 +3,8 @@ include $(SUBDIR)../config.mak
> NAME = swresample
> FFLIBS = avutil
>
> -HEADERS = swresample.h
> +HEADERS = swresample.h \
> + version.h \
>
> OBJS = audioconvert.o \
> dither.o \
> diff --git a/libswresample/swresample.h b/libswresample/swresample.h
> index ac87207..ac43cd2 100644
> --- a/libswresample/swresample.h
> +++ b/libswresample/swresample.h
> @@ -29,13 +29,7 @@
> #include <inttypes.h>
> #include "libavutil/samplefmt.h"
>
> -#define LIBSWRESAMPLE_VERSION_MAJOR 0
> -#define LIBSWRESAMPLE_VERSION_MINOR 15
> -#define LIBSWRESAMPLE_VERSION_MICRO 100
> -
> -#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
> - LIBSWRESAMPLE_VERSION_MINOR, \
> - LIBSWRESAMPLE_VERSION_MICRO)
> +#include "libswresample/version.h"
>
> #if LIBSWRESAMPLE_VERSION_MAJOR < 1
> #define SWR_CH_MAX 32 ///< Maximum number of channels
> diff --git a/libswresample/version.h b/libswresample/version.h
> new file mode 100644
> index 0000000..0f610bc
> --- /dev/null
> +++ b/libswresample/version.h
> @@ -0,0 +1,39 @@
> +/*
> + * Version macros.
> + *
> + * This file is part of libswresample
> + *
> + * libswresample 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.
> + *
> + * libswresample 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 libswresample; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +
> +#ifndef SWR_VERSION_H
> +#define SWR_VERSION_H
> +
> +/**
> + * @file
> + * Libswresample version macros
> + */
> +
> +#include "libavutil/avutil.h"
> +
> +#define LIBSWRESAMPLE_VERSION_MAJOR 0
> +#define LIBSWRESAMPLE_VERSION_MINOR 15
> +#define LIBSWRESAMPLE_VERSION_MICRO 100
> +
> +#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
> + LIBSWRESAMPLE_VERSION_MINOR, \
> + LIBSWRESAMPLE_VERSION_MICRO)
> +
> +#endif /* SWR_VERSION_H */
> --
> 1.7.8.6
LGTM.
Bonus: bump minor since you're adding a public header.
--
FFmpeg = Furious and Friendly Muttering Pacific Eager Guru
More information about the ffmpeg-devel
mailing list