diff options
author | Peter Ross <pross@xvid.org> | 2008-11-01 05:03:42 +0000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2008-11-01 05:03:42 +0000 |
commit | 0d72e7d0aebb03db1010d3e3180b287f3d9fc581 (patch) | |
tree | 333b9abf0bfa252a75494295b525ce2d9e4bc7db /libavcodec/audioconvert.h | |
parent | 3a57547e33cb859e0989da2acd553ebdf84e48ef (diff) | |
download | ffmpeg-0d72e7d0aebb03db1010d3e3180b287f3d9fc581.tar.gz |
Add audio channel layout API to libavcodec.
Originally committed as revision 15762 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/audioconvert.h')
-rw-r--r-- | libavcodec/audioconvert.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/audioconvert.h b/libavcodec/audioconvert.h index c391759ebe..4b767101a4 100644 --- a/libavcodec/audioconvert.h +++ b/libavcodec/audioconvert.h @@ -54,6 +54,26 @@ const char *avcodec_get_sample_fmt_name(int sample_fmt); */ enum SampleFormat avcodec_get_sample_fmt(const char* name); +/** + * @return NULL on error + */ +const char *avcodec_get_channel_name(int channel_id); + +/** + * Return description of channel layout + */ +void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout); + +/** + * Guess the channel layout + * @param nb_channels + * @param codec_id Codec identifier, or CODEC_ID_NONE if unknown + * @param fmt_name Format name, or NULL if unknown + * @return Channel layout mask + */ +int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name); + + struct AVAudioConvert; typedef struct AVAudioConvert AVAudioConvert; |