[FFmpeg-cvslog] r20547 - in trunk: configure libavcodec/avcodec.h libavcodec/utils.c libavdevice/avdevice.c libavdevice/avdevice.h libavfilter/avfilter.c libavfilter/avfilter.h libavformat/avformat.h libavformat/u...

diego subversion
Wed Nov 18 18:15:17 CET 2009


Author: diego
Date: Wed Nov 18 18:15:17 2009
New Revision: 20547

Log:
Add functions to return library license and library configuration.

Modified:
   trunk/configure
   trunk/libavcodec/avcodec.h
   trunk/libavcodec/utils.c
   trunk/libavdevice/avdevice.c
   trunk/libavdevice/avdevice.h
   trunk/libavfilter/avfilter.c
   trunk/libavfilter/avfilter.h
   trunk/libavformat/avformat.h
   trunk/libavformat/utils.c
   trunk/libavutil/avutil.h
   trunk/libavutil/utils.c
   trunk/libpostproc/postprocess.c
   trunk/libpostproc/postprocess.h

Modified: trunk/configure
==============================================================================
--- trunk/configure	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/configure	Wed Nov 18 18:15:17 2009	(r20547)
@@ -2794,6 +2794,7 @@ cat > $TMPH <<EOF
 #ifndef FFMPEG_CONFIG_H
 #define FFMPEG_CONFIG_H
 #define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
+#define FFMPEG_LICENSE "$(c_escape $license)"
 #define FFMPEG_DATADIR "$(eval c_escape $datadir)"
 #define CC_TYPE "$cc_type"
 #define CC_VERSION $cc_version

Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavcodec/avcodec.h	Wed Nov 18 18:15:17 2009	(r20547)
@@ -3067,6 +3067,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.
  *
  * @warning This function must be called before any other libavcodec

Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavcodec/utils.c	Wed Nov 18 18:15:17 2009	(r20547)
@@ -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;

Modified: trunk/libavdevice/avdevice.c
==============================================================================
--- trunk/libavdevice/avdevice.c	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavdevice/avdevice.c	Wed Nov 18 18:15:17 2009	(r20547)
@@ -22,3 +22,14 @@ unsigned avdevice_version(void)
 {
     return LIBAVDEVICE_VERSION_INT;
 }
+
+const char * avdevice_configuration(void)
+{
+    return FFMPEG_CONFIGURATION;
+}
+
+const char * avdevice_license(void)
+{
+#define LICENSE_PREFIX "libavdevice license: "
+    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
+}

Modified: trunk/libavdevice/avdevice.h
==============================================================================
--- trunk/libavdevice/avdevice.h	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavdevice/avdevice.h	Wed Nov 18 18:15:17 2009	(r20547)
@@ -39,6 +39,16 @@
 unsigned avdevice_version(void);
 
 /**
+ * Returns the libavdevice build-time configuration.
+ */
+const char * avdevice_configuration(void);
+
+/**
+ * Returns the libavdevice license.
+ */
+const char * avdevice_license(void);
+
+/**
  * Initialize libavdevice and register all the input and output devices.
  * @warning This function is not thread safe.
  */

Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavfilter/avfilter.c	Wed Nov 18 18:15:17 2009	(r20547)
@@ -28,6 +28,17 @@ unsigned avfilter_version(void) {
     return LIBAVFILTER_VERSION_INT;
 }
 
+const char * avfilter_configuration(void)
+{
+    return FFMPEG_CONFIGURATION;
+}
+
+const char * avfilter_license(void)
+{
+#define LICENSE_PREFIX "libavfilter license: "
+    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
+}
+
 /** helper macros to get the in/out pad on the dst/src filter */
 #define link_dpad(link)     link->dst-> input_pads[link->dstpad]
 #define link_spad(link)     link->src->output_pads[link->srcpad]

Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavfilter/avfilter.h	Wed Nov 18 18:15:17 2009	(r20547)
@@ -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;

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavformat/avformat.h	Wed Nov 18 18:15:17 2009	(r20547)
@@ -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"

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavformat/utils.c	Wed Nov 18 18:15:17 2009	(r20547)
@@ -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 */
 
 /**

Modified: trunk/libavutil/avutil.h
==============================================================================
--- trunk/libavutil/avutil.h	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavutil/avutil.h	Wed Nov 18 18:15:17 2009	(r20547)
@@ -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"

Modified: trunk/libavutil/utils.c
==============================================================================
--- trunk/libavutil/utils.c	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libavutil/utils.c	Wed Nov 18 18:15:17 2009	(r20547)
@@ -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;
+}

Modified: trunk/libpostproc/postprocess.c
==============================================================================
--- trunk/libpostproc/postprocess.c	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libpostproc/postprocess.c	Wed Nov 18 18:15:17 2009	(r20547)
@@ -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 <altivec.h>
 #endif

Modified: trunk/libpostproc/postprocess.h
==============================================================================
--- trunk/libpostproc/postprocess.h	Wed Nov 18 18:01:25 2009	(r20546)
+++ trunk/libpostproc/postprocess.h	Wed Nov 18 18:15:17 2009	(r20547)
@@ -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



More information about the ffmpeg-cvslog mailing list