summaryrefslogtreecommitdiff
path: root/libswresample/swresample.h
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2011-11-17 15:06:35 +0100
committerClément Bœsch <ubitux@gmail.com>2011-11-17 18:30:03 +0100
commiteafa2b600502f5e8b36b99a2737d6b3d3a58441f (patch)
tree092268c2591a8cfd3c53fd8253bbe8e0d1c0c8d4 /libswresample/swresample.h
parentd3baced24fcf602f2bceff1f73871303d4011c15 (diff)
swr: introduce a public function to customize the channel mapping.
Diffstat (limited to 'libswresample/swresample.h')
-rw-r--r--libswresample/swresample.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/libswresample/swresample.h b/libswresample/swresample.h
index 67845940ac..d7b55a0f70 100644
--- a/libswresample/swresample.h
+++ b/libswresample/swresample.h
@@ -30,7 +30,7 @@
#include "libavutil/samplefmt.h"
#define LIBSWRESAMPLE_VERSION_MAJOR 0
-#define LIBSWRESAMPLE_VERSION_MINOR 3
+#define LIBSWRESAMPLE_VERSION_MINOR 4
#define LIBSWRESAMPLE_VERSION_MICRO 0
#define SWR_CH_MAX 16 ///< Maximum number of channels
@@ -74,8 +74,6 @@ int swr_init(struct SwrContext *s);
* @param in_ch_layout input channel layout (AV_CH_LAYOUT_*)
* @param in_sample_fmt input sample format (AV_SAMPLE_FMT_*). Use +0x100 for planar audio
* @param in_sample_rate input sample rate (frequency in Hz)
- * @param channel_map customized input channel mapping (array of channel
- * indexes, -1 for a muted channel), can be NULL
* @param log_offset logging level offset
* @param log_ctx parent logging context, can be NULL
*
@@ -85,7 +83,7 @@ int swr_init(struct SwrContext *s);
struct SwrContext *swr_alloc_set_opts(struct SwrContext *s,
int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,
int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate,
- const int *channel_map, int log_offset, void *log_ctx);
+ int log_offset, void *log_ctx);
/**
* Free the given SwrContext and set the pointer to NULL.
@@ -114,4 +112,14 @@ int swr_convert(struct SwrContext *s, uint8_t *out[SWR_CH_MAX], int out_count,
*/
void swr_compensate(struct SwrContext *s, int sample_delta, int compensation_distance);
+/**
+ * Set a customized input channel mapping.
+ *
+ * @param s allocated Swr context, not yet initialized
+ * @param channel_map customized input channel mapping (array of channel
+ * indexes, -1 for a muted channel)
+ * @return AVERROR error code in case of failure.
+ */
+int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map);
+
#endif