Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * audio conversion
  3.  * Copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
  4.  * Copyright (c) 2008 Peter Ross
  5.  *
  6.  * This file is part of FFmpeg.
  7.  *
  8.  * FFmpeg is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Lesser General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2.1 of the License, or (at your option) any later version.
  12.  *
  13.  * FFmpeg is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Lesser General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Lesser General Public
  19.  * License along with FFmpeg; if not, write to the Free Software
  20.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21.  */
  22.  
  23. #ifndef AVCODEC_AUDIOCONVERT_H
  24. #define AVCODEC_AUDIOCONVERT_H
  25.  
  26. #include "version.h"
  27.  
  28. /**
  29.  * @file
  30.  * Audio format conversion routines
  31.  * This interface is deprecated and will be dropped in a future
  32.  * version. You should use the libswresample library instead.
  33.  */
  34.  
  35. #if FF_API_AUDIO_CONVERT
  36.  
  37. #include "libavutil/cpu.h"
  38. #include "avcodec.h"
  39. #include "libavutil/channel_layout.h"
  40.  
  41. struct AVAudioConvert;
  42. typedef struct AVAudioConvert AVAudioConvert;
  43.  
  44. /**
  45.  * Create an audio sample format converter context
  46.  * @param out_fmt Output sample format
  47.  * @param out_channels Number of output channels
  48.  * @param in_fmt Input sample format
  49.  * @param in_channels Number of input channels
  50.  * @param[in] matrix Channel mixing matrix (of dimension in_channel*out_channels). Set to NULL to ignore.
  51.  * @param flags See AV_CPU_FLAG_xx
  52.  * @return NULL on error
  53.  * @deprecated See libswresample
  54.  */
  55.  
  56. attribute_deprecated
  57. AVAudioConvert *av_audio_convert_alloc(enum AVSampleFormat out_fmt, int out_channels,
  58.                                        enum AVSampleFormat in_fmt, int in_channels,
  59.                                        const float *matrix, int flags);
  60.  
  61. /**
  62.  * Free audio sample format converter context
  63.  * @deprecated See libswresample
  64.  */
  65.  
  66. attribute_deprecated
  67. void av_audio_convert_free(AVAudioConvert *ctx);
  68.  
  69. /**
  70.  * Convert between audio sample formats
  71.  * @param[in] out array of output buffers for each channel. set to NULL to ignore processing of the given channel.
  72.  * @param[in] out_stride distance between consecutive output samples (measured in bytes)
  73.  * @param[in] in array of input buffers for each channel
  74.  * @param[in] in_stride distance between consecutive input samples (measured in bytes)
  75.  * @param len length of audio frame size (measured in samples)
  76.  * @deprecated See libswresample
  77.  */
  78.  
  79. attribute_deprecated
  80. int av_audio_convert(AVAudioConvert *ctx,
  81.                            void * const out[6], const int out_stride[6],
  82.                      const void * const  in[6], const int  in_stride[6], int len);
  83.  
  84. #endif /* FF_API_AUDIO_CONVERT */
  85.  
  86. #endif /* AVCODEC_AUDIOCONVERT_H */
  87.