changeset 10536:046dcf7aa19c libavcodec

Add functions to return library license and library configuration.
author diego
date Wed, 18 Nov 2009 17:15:17 +0000
parents 95f3daa991a2
children d9cadef1412d
files avcodec.h utils.c
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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;