Commit c1736936 authored by Diego Biurrun's avatar Diego Biurrun

Add functions to return library license and library configuration.

Originally committed as revision 20547 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d7a0e29f
......@@ -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
......
......@@ -3066,6 +3066,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.
*
......
......@@ -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;
......
......@@ -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;
}
......@@ -38,6 +38,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.
......
......@@ -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]
......
......@@ -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;
......
......@@ -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"
......
......@@ -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 */
/**
......
......@@ -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"
......
......@@ -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;
}
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment