summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-30 10:26:40 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-07-30 11:38:38 +0200
commitf893904469946cc86e28f329a47603b14d580c76 (patch)
tree15eeb708399f6be114d1ad246246337a6239cfeb
parent33449b1776169f18c96f485e37ab6ae42769621b (diff)
downloadffmpeg-streaming-f893904469946cc86e28f329a47603b14d580c76.zip
ffmpeg-streaming-f893904469946cc86e28f329a47603b14d580c76.tar.gz
audioconvert: add av_get_standard_channel_layout().
Also bump minor version and add APIchanges entry.
-rw-r--r--doc/APIchanges4
-rw-r--r--libavutil/audioconvert.c10
-rw-r--r--libavutil/audioconvert.h12
-rw-r--r--libavutil/version.h2
4 files changed, 27 insertions, 1 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index 4d8404c..359ac32 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil: 2011-04-18
API changes, most recent first:
+2012-07-30 - xxxxxxx - lavu 51.66.100
+ Add av_get_channel_description()
+ and av_get_standard_channel_layout() functions.
+
2012-07-20 - xxxxxxx - lavc 54.43.100
Add decode_error_flags field to AVFrame.
diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c
index 224db86..0164171 100644
--- a/libavutil/audioconvert.c
+++ b/libavutil/audioconvert.c
@@ -243,3 +243,13 @@ uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index)
}
return 0;
}
+
+int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
+ const char **name)
+{
+ if (index >= FF_ARRAY_ELEMS(channel_layout_map))
+ return AVERROR_EOF;
+ if (layout) *layout = channel_layout_map[index].layout;
+ if (name) *name = channel_layout_map[index].name;
+ return 0;
+}
diff --git a/libavutil/audioconvert.h b/libavutil/audioconvert.h
index f1399b9..5ddda0c 100644
--- a/libavutil/audioconvert.h
+++ b/libavutil/audioconvert.h
@@ -189,6 +189,18 @@ const char *av_get_channel_name(uint64_t channel);
const char *av_get_channel_description(uint64_t channel);
/**
+ * Get the value and name of a standard channel layout.
+ *
+ * @param[in] index index in an internal list, starting at 0
+ * @param[out] layout channel layout mask
+ * @param[out] name name of the layout
+ * @return 0 if the layout exists,
+ * <0 if index is beyond the limits
+ */
+int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
+ const char **name);
+
+/**
* @}
*/
diff --git a/libavutil/version.h b/libavutil/version.h
index a06fbc7..04d111b 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -39,7 +39,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 51
-#define LIBAVUTIL_VERSION_MINOR 65
+#define LIBAVUTIL_VERSION_MINOR 66
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
OpenPOWER on IntegriCloud