18#ifndef _GAZEBO_AUDIO_DECODER_HH_
19#define _GAZEBO_AUDIO_DECODER_HH_
25struct AVFormatContext;
50 public:
bool SetFile(
const std::string &_filename);
62 public:
bool Decode(uint8_t **_outBuffer,
unsigned int *_outBufferSize);
69 private:
void Cleanup();
72 private: AVFormatContext *formatCtx;
75 private: AVCodecContext *codecCtx;
78 private: AVCodec *codec;
81 private:
int audioStream;
84 private:
static bool initialized;
87 private: std::string filename;
common
Definition FuelModelDatabase.hh:37
An audio decoder based on FFMPEG.
Definition AudioDecoder.hh:40
AudioDecoder()
Constructor.
bool SetFile(const std::string &_filename)
Set the file to decode.
virtual ~AudioDecoder()
Destructor.
bool Decode(uint8_t **_outBuffer, unsigned int *_outBufferSize)
Decode the loaded audio file.
std::string GetFile() const
Get the audio filename that was set.
int GetSampleRate()
Get the sample rate from the latest decoded file.
Forward declarations for the common classes.
Definition Animation.hh:27