Go to the documentation of this file.
18 #ifndef _GAZEBO_AUDIO_DECODER_HH_
19 #define _GAZEBO_AUDIO_DECODER_HH_
25 struct AVFormatContext;
26 struct AVCodecContext;
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;
Forward declarations for the common classes.
Definition: Animation.hh:27
common
Definition: FuelModelDatabase.hh:37
An audio decoder based on FFMPEG.
Definition: AudioDecoder.hh:40
int GetSampleRate()
Get the sample rate from the latest decoded file.
bool Decode(uint8_t **_outBuffer, unsigned int *_outBufferSize)
Decode the loaded audio file.
AudioDecoder()
Constructor.
std::string GetFile() const
Get the audio filename that was set.
bool SetFile(const std::string &_filename)
Set the file to decode.
virtual ~AudioDecoder()
Destructor.