summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-11-18 17:15:17 +0000
committerDiego Biurrun <diego@biurrun.de>2009-11-18 17:15:17 +0000
commitc1736936982e9b0d3400462eda2b0bf410f6e003 (patch)
treef147fdb968bd17ed937618c3362fc668cdffb0ef
parentd7a0e29f3156271e4ff7c551199ba42d28e7934d (diff)
Add functions to return library license and library configuration.
Originally committed as revision 20547 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure1
-rw-r--r--libavcodec/avcodec.h10
-rw-r--r--libavcodec/utils.c11
-rw-r--r--libavdevice/avdevice.c11
-rw-r--r--libavdevice/avdevice.h10
-rw-r--r--libavfilter/avfilter.c11
-rw-r--r--libavfilter/avfilter.h11
-rw-r--r--libavformat/avformat.h10
-rw-r--r--libavformat/utils.c11
-rw-r--r--libavutil/avutil.h10
-rw-r--r--libavutil/utils.c12
-rw-r--r--libpostproc/postprocess.c11
-rw-r--r--libpostproc/postprocess.h10
13 files changed, 129 insertions, 0 deletions
diff --git a/configure b/configure
index 49d7baa0db..844133b9ac 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index fbe138a7ca..7ffbd95955 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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
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;
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index ec379b9d42..3d67b4b8be 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -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;
+}
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index 2635423481..124cfa28a0 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -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.
*/
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index b7d4cd038a..450a6328c7 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -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]
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index a2654bb1ae..52d942c42a 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -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;
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 19914b6d66..21aad52f95 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -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"
diff --git a/libavformat/utils.c b/libavformat/utils.c
index a9d07fa645..c76ea69081 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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 */
/**
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index da282bfb72..2a3db1ce84 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -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"
diff --git a/libavutil/utils.c b/libavutil/utils.c
index 2521d3401e..26499b8389 100644
--- a/libavutil/utils.c
+++ b/libavutil/utils.c
@@ -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;
+}
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 179fd7ec98..9bb9468311 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -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
diff --git a/libpostproc/postprocess.h b/libpostproc/postprocess.h
index 2789cdf074..5f23bb240f 100644
--- a/libpostproc/postprocess.h
+++ b/libpostproc/postprocess.h
@@ -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