From c1736936982e9b0d3400462eda2b0bf410f6e003 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 18 Nov 2009 17:15:17 +0000 Subject: [PATCH] Add functions to return library license and library configuration. Originally committed as revision 20547 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 1 + libavcodec/avcodec.h | 10 ++++++++++ libavcodec/utils.c | 11 +++++++++++ libavdevice/avdevice.c | 11 +++++++++++ libavdevice/avdevice.h | 10 ++++++++++ libavfilter/avfilter.c | 11 +++++++++++ libavfilter/avfilter.h | 11 +++++++++++ libavformat/avformat.h | 10 ++++++++++ libavformat/utils.c | 11 +++++++++++ libavutil/avutil.h | 10 ++++++++++ libavutil/utils.c | 12 ++++++++++++ libpostproc/postprocess.c | 11 +++++++++++ libpostproc/postprocess.h | 10 ++++++++++ 13 files changed, 129 insertions(+) diff --git a/configure b/configure index 49d7baa0db..844133b9ac 100755 --- a/configure +++ b/configure @@ -2794,6 +2794,7 @@ cat > $TMPH <dst-> input_pads[link->dstpad] #define link_spad(link) link->src->output_pads[link->srcpad] diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index a2654bb1ae..52d942c42a 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -44,6 +44,17 @@ */ unsigned avfilter_version(void); +/** + * Returns the libavfilter build-time configuration. + */ +const char * avfilter_configuration(void); + +/** + * Returns the libavfilter license. + */ +const char * avfilter_license(void); + + typedef struct AVFilterContext AVFilterContext; typedef struct AVFilterLink AVFilterLink; typedef struct AVFilterPad AVFilterPad; diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 19914b6d66..21aad52f95 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -40,6 +40,16 @@ */ unsigned avformat_version(void); +/** + * Returns the libavformat build-time configuration. + */ +const char * avformat_configuration(void); + +/** + * Returns the libavformat license. + */ +const char * avformat_license(void); + #include #include /* FILE */ #include "libavcodec/avcodec.h" diff --git a/libavformat/utils.c b/libavformat/utils.c index a9d07fa645..c76ea69081 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -41,6 +41,17 @@ unsigned avformat_version(void) return LIBAVFORMAT_VERSION_INT; } +const char * avformat_configuration(void) +{ + return FFMPEG_CONFIGURATION; +} + +const char * avformat_license(void) +{ +#define LICENSE_PREFIX "libavformat license: " + return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; +} + /* fraction handling */ /** diff --git a/libavutil/avutil.h b/libavutil/avutil.h index da282bfb72..2a3db1ce84 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -53,6 +53,16 @@ */ unsigned avutil_version(void); +/** + * Returns the libavutil build-time configuration. + */ +const char * avutil_configuration(void); + +/** + * Returns the libavutil license. + */ +const char * avutil_license(void); + #include "common.h" #include "mathematics.h" #include "rational.h" diff --git a/libavutil/utils.c b/libavutil/utils.c index 2521d3401e..26499b8389 100644 --- a/libavutil/utils.c +++ b/libavutil/utils.c @@ -16,6 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "avutil.h" /** @@ -27,3 +28,14 @@ unsigned avutil_version(void) { return LIBAVUTIL_VERSION_INT; } + +const char * avutil_configuration(void) +{ + return FFMPEG_CONFIGURATION; +} + +const char * avutil_license(void) +{ +#define LICENSE_PREFIX "libavutil license: " + return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; +} diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index 179fd7ec98..9bb9468311 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -92,6 +92,17 @@ unsigned postproc_version(void) return LIBPOSTPROC_VERSION_INT; } +const char * postproc_configuration(void) +{ + return FFMPEG_CONFIGURATION; +} + +const char * postproc_license(void) +{ +#define LICENSE_PREFIX "libpostproc license: " + return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; +} + #if HAVE_ALTIVEC_H #include #endif diff --git a/libpostproc/postprocess.h b/libpostproc/postprocess.h index 2789cdf074..5f23bb240f 100644 --- a/libpostproc/postprocess.h +++ b/libpostproc/postprocess.h @@ -48,6 +48,16 @@ */ unsigned postproc_version(void); +/** + * Returns the libpostproc build-time configuration. + */ +const char * postproc_configuration(void); + +/** + * Returns the libpostproc license. + */ +const char * postproc_license(void); + #define PP_QUALITY_MAX 6 #define QP_STORE_T int8_t