summaryrefslogtreecommitdiff
path: root/libavutil/samplefmt.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-04-05 17:00:53 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-04-08 15:13:28 -0400
commit4d693b023c885f6821e2347137943d751469bd0b (patch)
tree51ccb78156f411b1a8df45f03e886584f49c09b8 /libavutil/samplefmt.h
parent9294f538e924dcb8f3938e4e3476340f1e5b552f (diff)
downloadffmpeg-4d693b023c885f6821e2347137943d751469bd0b.tar.gz
avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()
Based on a patch by Clément Bœsch <ubitux@gmail.com>
Diffstat (limited to 'libavutil/samplefmt.h')
-rw-r--r--libavutil/samplefmt.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h
index b6715561d4..4bd5da4471 100644
--- a/libavutil/samplefmt.h
+++ b/libavutil/samplefmt.h
@@ -54,6 +54,28 @@ const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);
enum AVSampleFormat av_get_sample_fmt(const char *name);
/**
+ * Get the packed alternative form of the given sample format.
+ *
+ * If the passed sample_fmt is already in packed format, the format returned is
+ * the same as the input.
+ *
+ * @return the packed alternative form of the given sample format or
+ AV_SAMPLE_FMT_NONE on error.
+ */
+enum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt);
+
+/**
+ * Get the planar alternative form of the given sample format.
+ *
+ * If the passed sample_fmt is already in planar format, the format returned is
+ * the same as the input.
+ *
+ * @return the planar alternative form of the given sample format or
+ AV_SAMPLE_FMT_NONE on error.
+ */
+enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
+
+/**
* Generate a string corresponding to the sample format with
* sample_fmt, or a header if sample_fmt is negative.
*