# HG changeset patch # User diego # Date 1258564517 0 # Node ID 046dcf7aa19ce23ea48b82ec20ccad189b32a58f # Parent 95f3daa991a25e714bef2672cc879d0e2a1cd96d Add functions to return library license and library configuration. diff -r 95f3daa991a2 -r 046dcf7aa19c avcodec.h --- a/avcodec.h Mon Nov 16 17:42:43 2009 +0000 +++ b/avcodec.h Wed Nov 18 17:15:17 2009 +0000 @@ -3067,6 +3067,16 @@ 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. * * @warning This function must be called before any other libavcodec diff -r 95f3daa991a2 -r 046dcf7aa19c utils.c --- a/utils.c Mon Nov 16 17:42:43 2009 +0000 +++ b/utils.c Wed Nov 18 17:15:17 2009 +0000 @@ -905,6 +905,17 @@ 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;