]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/audioconvert.c
tak: demuxer, parser, and decoder
[ffmpeg] / libavcodec / audioconvert.c
index 9cb465ce7cd0d67d5a612a8beb37d7be67db0a75..3714de78f1175568009426a63acfd9b75bf4a161 100644 (file)
  */
 
 #include "libavutil/avstring.h"
+#include "libavutil/common.h"
 #include "libavutil/libm.h"
 #include "libavutil/samplefmt.h"
 #include "avcodec.h"
 #include "audioconvert.h"
 
-uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
-{
-    switch(nb_channels) {
-    case 1: return AV_CH_LAYOUT_MONO;
-    case 2: return AV_CH_LAYOUT_STEREO;
-    case 3: return AV_CH_LAYOUT_SURROUND;
-    case 4: return AV_CH_LAYOUT_QUAD;
-    case 5: return AV_CH_LAYOUT_5POINT0;
-    case 6: return AV_CH_LAYOUT_5POINT1;
-    case 8: return AV_CH_LAYOUT_7POINT1;
-    default: return 0;
-    }
-}
-
-#if FF_API_OLD_AUDIOCONVERT
-int64_t avcodec_get_channel_layout(const char *name)
-{
-    return av_get_channel_layout(name);
-}
-
-void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout)
-{
-    av_get_channel_layout_string(buf, buf_size, nb_channels, channel_layout);
-}
-
-int avcodec_channel_layout_num_channels(int64_t channel_layout)
-{
-    return av_get_channel_layout_nb_channels(channel_layout);
-}
-#endif
-
 struct AVAudioConvert {
     int in_channels, out_channels;
     int fmt_pair;