changeset 5370:238bda5af58e libavformat

Add functions to return library license and library configuration.
author diego
date Wed, 18 Nov 2009 17:15:17 +0000
parents 347123a18feb
children a0846aa55f5e
files avformat.h utils.c
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/avformat.h	Sun Nov 15 03:26:47 2009 +0000
+++ b/avformat.h	Wed Nov 18 17:15:17 2009 +0000
@@ -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 <time.h>
 #include <stdio.h>  /* FILE */
 #include "libavcodec/avcodec.h"
--- a/utils.c	Sun Nov 15 03:26:47 2009 +0000
+++ b/utils.c	Wed Nov 18 17:15:17 2009 +0000
@@ -41,6 +41,17 @@
     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 */
 
 /**