aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-22 03:08:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-22 03:08:47 +0100
commit4468ad827a4ed70bb7061162b2f2e883989ee1db (patch)
tree85df30aaf2a91c3de4cbe43d2cfe06c1ca525bd0
parent0f91a577321e063dfeb626c2d74945b271a888e3 (diff)
downloadffmpeg-4468ad827a4ed70bb7061162b2f2e883989ee1db.tar.gz
swr: add swresample_version swresample_configuration and swresample_license
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswresample/swresample.c16
-rw-r--r--libswresample/swresample.h15
2 files changed, 31 insertions, 0 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index f97a2c1b19..4443a97106 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -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);
diff --git a/libswresample/swresample.h b/libswresample/swresample.h
index fad09358d5..c2bbea5c15 100644
--- a/libswresample/swresample.h
+++ b/libswresample/swresample.h
@@ -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