[FFmpeg-cvslog] r24936 - in trunk/libavcodec: audioconvert.c audioconvert.h avcodec.h
stefano
subversion
Thu Aug 26 02:38:25 CEST 2010
Author: stefano
Date: Thu Aug 26 02:38:25 2010
New Revision: 24936
Log:
Implement avcodec_get_channel_layout().
Patch by S.N. Hemanth Meenakshisundaram smeenaks:ucsd+edu.
Modified:
trunk/libavcodec/audioconvert.c
trunk/libavcodec/audioconvert.h
trunk/libavcodec/avcodec.h
Modified: trunk/libavcodec/audioconvert.c
==============================================================================
--- trunk/libavcodec/audioconvert.c Wed Aug 25 23:07:04 2010 (r24935)
+++ trunk/libavcodec/audioconvert.c Thu Aug 26 02:38:25 2010 (r24936)
@@ -121,6 +121,18 @@ static const struct {
{ 0 }
};
+int64_t avcodec_get_channel_layout(const char *name)
+{
+ int i = 0;
+ do {
+ if (!strcmp(channel_layout_map[i].name, name))
+ return channel_layout_map[i].layout;
+ i++;
+ } while (channel_layout_map[i].name);
+
+ return 0;
+}
+
void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout)
{
int i;
Modified: trunk/libavcodec/audioconvert.h
==============================================================================
--- trunk/libavcodec/audioconvert.h Wed Aug 25 23:07:04 2010 (r24935)
+++ trunk/libavcodec/audioconvert.h Thu Aug 26 02:38:25 2010 (r24936)
@@ -60,6 +60,11 @@ enum SampleFormat avcodec_get_sample_fmt
const char *avcodec_get_channel_name(int channel_id);
/**
+ * @return channel layout that matches name, 0 if no match
+ */
+int64_t avcodec_get_channel_layout(const char *name);
+
+/**
* Return description of channel layout
*/
void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout);
Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h Wed Aug 25 23:07:04 2010 (r24935)
+++ trunk/libavcodec/avcodec.h Thu Aug 26 02:38:25 2010 (r24936)
@@ -30,8 +30,8 @@
#include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 86
-#define LIBAVCODEC_VERSION_MICRO 1
+#define LIBAVCODEC_VERSION_MINOR 87
+#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
More information about the ffmpeg-cvslog
mailing list