Browse Source

Add functions to return library license and library configuration.

Originally committed as revision 20547 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Diego Biurrun 16 years ago
parent
commit
c173693698
13 changed files with 129 additions and 0 deletions
  1. +1
    -0
      configure
  2. +10
    -0
      libavcodec/avcodec.h
  3. +11
    -0
      libavcodec/utils.c
  4. +11
    -0
      libavdevice/avdevice.c
  5. +10
    -0
      libavdevice/avdevice.h
  6. +11
    -0
      libavfilter/avfilter.c
  7. +11
    -0
      libavfilter/avfilter.h
  8. +10
    -0
      libavformat/avformat.h
  9. +11
    -0
      libavformat/utils.c
  10. +10
    -0
      libavutil/avutil.h
  11. +12
    -0
      libavutil/utils.c
  12. +11
    -0
      libpostproc/postprocess.c
  13. +10
    -0
      libpostproc/postprocess.h

+ 1
- 0
configure View File

@@ -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


+ 10
- 0
libavcodec/avcodec.h View File

@@ -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.
*


+ 11
- 0
libavcodec/utils.c View File

@@ -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;


+ 11
- 0
libavdevice/avdevice.c View File

@@ -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;
}

+ 10
- 0
libavdevice/avdevice.h View File

@@ -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.


+ 11
- 0
libavfilter/avfilter.c View File

@@ -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]


+ 11
- 0
libavfilter/avfilter.h View File

@@ -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;


+ 10
- 0
libavformat/avformat.h View File

@@ -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"


+ 11
- 0
libavformat/utils.c View File

@@ -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 */

/**


+ 10
- 0
libavutil/avutil.h View File

@@ -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"


+ 12
- 0
libavutil/utils.c View File

@@ -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;
}

+ 11
- 0
libpostproc/postprocess.c View File

@@ -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


+ 10
- 0
libpostproc/postprocess.h View File

@@ -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


Loading…
Cancel
Save