summaryrefslogtreecommitdiff
path: root/libavutil/samplefmt.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-05-06 14:10:38 +0200
committerAnton Khirnov <anton@khirnov.net>2012-05-09 17:43:26 +0200
commit142e740d1ecc6059556f2748a18757d399ee061f (patch)
tree556cb9a5adaf71e1dec853849c54615ecfff9328 /libavutil/samplefmt.h
parent9684341346fd5aad436325529cade47966c4731b (diff)
downloadffmpeg-142e740d1ecc6059556f2748a18757d399ee061f.tar.gz
samplefmt: add a function for copying audio samples.
Diffstat (limited to 'libavutil/samplefmt.h')
-rw-r--r--libavutil/samplefmt.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h
index 1cb01a357f..9011889e68 100644
--- a/libavutil/samplefmt.h
+++ b/libavutil/samplefmt.h
@@ -194,4 +194,19 @@ int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
int nb_samples, enum AVSampleFormat sample_fmt, int align);
+/**
+ * Copy samples from src to dst.
+ *
+ * @param dst destination array of pointers to data planes
+ * @param src source array of pointers to data planes
+ * @param dst_offset offset in samples at which the data will be written to dst
+ * @param src_offset offset in samples at which the data will be read from src
+ * @param nb_samples number of samples to be copied
+ * @param nb_channels number of audio channels
+ * @param sample_fmt audio sample format
+ */
+int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset,
+ int src_offset, int nb_samples, int nb_channels,
+ enum AVSampleFormat sample_fmt);
+
#endif /* AVUTIL_SAMPLEFMT_H */