Gnash  0.8.11dev
Public Member Functions | List of all members
gnash::media::ffmpeg::AudioResamplerFfmpeg Class Reference

FFMPEG based AudioResampler. More...

#include <AudioResamplerFfmpeg.h>

Public Member Functions

DSOEXPORT AudioResamplerFfmpeg ()
 
DSOEXPORT ~AudioResamplerFfmpeg ()
 
DSOEXPORT bool init (AVCodecContext *ctx)
 Initializes the resampler. More...
 
DSOEXPORT int resample (std::uint8_t **input, int plane_size, int samples, std::uint8_t **output)
 Resamples audio. More...
 

Detailed Description

FFMPEG based AudioResampler.

This class is used to provide an easy interface to libavcodecs audio resampler.

Constructor & Destructor Documentation

§ AudioResamplerFfmpeg()

gnash::media::ffmpeg::AudioResamplerFfmpeg::AudioResamplerFfmpeg ( )

§ ~AudioResamplerFfmpeg()

gnash::media::ffmpeg::AudioResamplerFfmpeg::~AudioResamplerFfmpeg ( )

Member Function Documentation

§ init()

bool gnash::media::ffmpeg::AudioResamplerFfmpeg::init ( AVCodecContext *  ctx)

Initializes the resampler.

Parameters
ctxThe audio format container.
Returns
true if resampling is needed, if not false

Referenced by gnash::media::ffmpeg::AudioDecoderFfmpeg::decode().

§ resample()

int gnash::media::ffmpeg::AudioResamplerFfmpeg::resample ( std::uint8_t **  input,
int  plane_size,
int  samples,
std::uint8_t **  output 
)

Resamples audio.

Parameters
inputA pointer to the audio data that needs resampling
plane_sizeInput plane/line size
samplesNumber of samples in the audio
outputA pointer to where the resampled output should be placed
Returns
the number of samples in the output data.

References MAX_AUDIO_FRAME_SIZE, and UNUSED.

Referenced by gnash::media::ffmpeg::AudioDecoderFfmpeg::decode().


The documentation for this class was generated from the following files: