All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
utils.c File Reference
#include "libavutil/common.h"
#include "libavutil/dict.h"
#include "libavutil/frame.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avresample.h"
#include "internal.h"
#include "audio_data.h"
#include "audio_convert.h"
#include "audio_mix.h"
#include "resample.h"

Go to the source code of this file.


#define LICENSE_PREFIX   "libavresample license: "


int avresample_open (AVAudioResampleContext *avr)
 Initialize AVAudioResampleContext.
int avresample_is_open (AVAudioResampleContext *avr)
 Check whether an AVAudioResampleContext is open or closed.
void avresample_close (AVAudioResampleContext *avr)
 Close AVAudioResampleContext.
void avresample_free (AVAudioResampleContext **avr)
 Free AVAudioResampleContext and associated AVOption values.
static int handle_buffered_output (AVAudioResampleContext *avr, AudioData *output, AudioData *converted)
int attribute_align_arg avresample_convert (AVAudioResampleContext *avr, uint8_t **output, int out_plane_size, int out_samples, uint8_t **input, int in_plane_size, int in_samples)
 Convert input samples and write them to the output FIFO.
int avresample_config (AVAudioResampleContext *avr, AVFrame *out, AVFrame *in)
 Configure or reconfigure the AVAudioResampleContext using the information provided by the AVFrames.
static int config_changed (AVAudioResampleContext *avr, AVFrame *out, AVFrame *in)
static int convert_frame (AVAudioResampleContext *avr, AVFrame *out, AVFrame *in)
static int available_samples (AVFrame *out)
int avresample_convert_frame (AVAudioResampleContext *avr, AVFrame *out, AVFrame *in)
 Convert the samples in the input AVFrame and write them to the output AVFrame.
int avresample_get_matrix (AVAudioResampleContext *avr, double *matrix, int stride)
 Get the current channel mixing matrix.
int avresample_set_matrix (AVAudioResampleContext *avr, const double *matrix, int stride)
 Set channel mixing matrix.
int avresample_set_channel_mapping (AVAudioResampleContext *avr, const int *channel_map)
 Set a customized input channel mapping.
int avresample_available (AVAudioResampleContext *avr)
 Return the number of available samples in the output FIFO.
int avresample_get_out_samples (AVAudioResampleContext *avr, int in_nb_samples)
 Provide the upper bound on the number of samples the configured conversion would output.
int avresample_read (AVAudioResampleContext *avr, uint8_t **output, int nb_samples)
 Read samples from the output FIFO.
unsigned avresample_version (void)
const char * avresample_license (void)
 Return the libavresample license.
const char * avresample_configuration (void)
 Return the libavresample build-time configuration.

Macro Definition Documentation

#define LICENSE_PREFIX   "libavresample license: "

Function Documentation

static int handle_buffered_output ( AVAudioResampleContext avr,
AudioData output,
AudioData converted 

Definition at line 287 of file utils.c.

Referenced by avresample_convert().

static int config_changed ( AVAudioResampleContext avr,
AVFrame out,
AVFrame in 

Definition at line 525 of file utils.c.

Referenced by avresample_convert_frame().

static int convert_frame ( AVAudioResampleContext avr,
AVFrame out,
AVFrame in 

Definition at line 549 of file utils.c.

Referenced by avresample_convert_frame().

static int available_samples ( AVFrame out)

Definition at line 586 of file utils.c.

Referenced by avresample_convert_frame(), get_available_samples(), and request_frame().