From c1736936982e9b0d3400462eda2b0bf410f6e003 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 18 Nov 2009 17:15:17 +0000 Subject: Add functions to return library license and library configuration. Originally committed as revision 20547 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/avcodec.h | 10 ++++++++++ libavcodec/utils.c | 11 +++++++++++ 2 files changed, 21 insertions(+) (limited to 'libavcodec') diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index fbe138a7ca..7ffbd95955 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3066,6 +3066,16 @@ AVCodec *av_codec_next(AVCodec *c); */ unsigned avcodec_version(void); +/** + * Returns the libavcodec build-time configuration. + */ +const char * avcodec_configuration(void); + +/** + * Returns the libavcodec license. + */ +const char * avcodec_license(void); + /** * Initializes libavcodec. * diff --git a/libavcodec/utils.c b/libavcodec/utils.c index ddd11606dc..6be9d724ae 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -905,6 +905,17 @@ unsigned avcodec_version( void ) return LIBAVCODEC_VERSION_INT; } +const char * avcodec_configuration(void) +{ + return FFMPEG_CONFIGURATION; +} + +const char * avcodec_license(void) +{ +#define LICENSE_PREFIX "libavcodec license: " + return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1; +} + void avcodec_init(void) { static int initialized = 0; -- cgit v1.2.3