Browse Source

swr: add swresample_version swresample_configuration and swresample_license

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Michael Niedermayer 13 years ago
parent
commit
4468ad827a
2 changed files with 31 additions and 0 deletions
  1. +16
    -0
      libswresample/swresample.c
  2. +15
    -0
      libswresample/swresample.h

+ 16
- 0
libswresample/swresample.c View File

@@ -70,6 +70,22 @@ static const AVClass av_class = {
.parent_log_context_offset = OFFSET(log_ctx),
};

unsigned swresample_version(void)
{
return LIBSWRESAMPLE_VERSION_MICRO;
}

const char *swresample_configuration(void)
{
return FFMPEG_CONFIGURATION;
}

const char *swresample_license(void)
{
#define LICENSE_PREFIX "libswresample license: "
return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
}

int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map){
if(!s || s->in_convert) // s needs to be allocated but not initialized
return AVERROR(EINVAL);


+ 15
- 0
libswresample/swresample.h View File

@@ -122,4 +122,19 @@ void swr_compensate(struct SwrContext *s, int sample_delta, int compensation_dis
*/
int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map);

/**
* Return the LIBSWRESAMPLE_VERSION_INT constant.
*/
unsigned swresample_version(void);

/**
* Return the swr build-time configuration.
*/
const char *swresample_configuration(void);

/**
* Return the swr license.
*/
const char *swresample_license(void);

#endif

Loading…
Cancel
Save