mirror of https://git.ffmpeg.org/ffmpeg.git
Implement avcodec_get_channel_layout().
Patch by S.N. Hemanth Meenakshisundaram smeenaks:ucsd+edu. Originally committed as revision 24936 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f06d6c751f
commit
5da19b53c6
|
@ -121,6 +121,18 @@ static const struct {
|
||||||
{ 0 }
|
{ 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)
|
void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -59,6 +59,11 @@ enum SampleFormat avcodec_get_sample_fmt(const char* name);
|
||||||
*/
|
*/
|
||||||
const char *avcodec_get_channel_name(int channel_id);
|
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
|
* Return description of channel layout
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
#include "libavutil/avutil.h"
|
#include "libavutil/avutil.h"
|
||||||
|
|
||||||
#define LIBAVCODEC_VERSION_MAJOR 52
|
#define LIBAVCODEC_VERSION_MAJOR 52
|
||||||
#define LIBAVCODEC_VERSION_MINOR 86
|
#define LIBAVCODEC_VERSION_MINOR 87
|
||||||
#define LIBAVCODEC_VERSION_MICRO 1
|
#define LIBAVCODEC_VERSION_MICRO 0
|
||||||
|
|
||||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||||
LIBAVCODEC_VERSION_MINOR, \
|
LIBAVCODEC_VERSION_MINOR, \
|
||||||
|
|
Loading…
Reference in New Issue