libswresample/audioconvert.h File Reference

Audio format conversion routines. More...

#include "swresample_internal.h"
#include "libavutil/cpu.h"
Include dependency graph for libswresample/audioconvert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AudioConvert
 

Typedefs

typedef voidconv_func_type) (uint8_t *po, const uint8_t *pi, int is, int os, uint8_t *end)
 
typedef voidsimd_func_type) (uint8_t **dst, const uint8_t **src, int len)
 
typedef struct AudioConvert AudioConvert
 

Functions

AudioConvertswri_audio_convert_alloc (enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, const int *ch_map, int flags)
 Create an audio sample format converter context. More...
 
void swri_audio_convert_free (AudioConvert **ctx)
 Free audio sample format converter context. More...
 
int swri_audio_convert (AudioConvert *ctx, AudioData *out, AudioData *in, int len)
 Convert between audio sample formats. More...
 

Detailed Description

Audio format conversion routines.

Definition in file libswresample/audioconvert.h.

Typedef Documentation

typedef struct AudioConvert AudioConvert
typedef void( conv_func_type) (uint8_t *po, const uint8_t *pi, int is, int os, uint8_t *end)

Definition at line 36 of file libswresample/audioconvert.h.

typedef void( simd_func_type) (uint8_t **dst, const uint8_t **src, int len)

Definition at line 37 of file libswresample/audioconvert.h.

Function Documentation

int swri_audio_convert ( AudioConvert ctx,
AudioData out,
AudioData in,
int  len 
)

Convert between audio sample formats.

Parameters
[in]outarray of output buffers for each channel. set to NULL to ignore processing of the given channel.
[in]inarray of input buffers for each channel
lenlength of audio frame size (measured in samples)

Referenced by swr_convert_internal().

AudioConvert* swri_audio_convert_alloc ( enum AVSampleFormat  out_fmt,
enum AVSampleFormat  in_fmt,
int  channels,
const int *  ch_map,
int  flags 
)

Create an audio sample format converter context.

Parameters
out_fmtOutput sample format
in_fmtInput sample format
channelsNumber of channels
flagsSee AV_CPU_FLAG_xx
ch_maplist of the channels id to pick from the source stream, NULL if all channels must be selected
Returns
NULL on error

Referenced by swr_init().

void swri_audio_convert_free ( AudioConvert **  ctx)

Free audio sample format converter context.

and set the pointer to NULL

Referenced by swr_free(), and swr_init().