2012-03-16 23:59:21 -07:00
|
|
|
#ifdef OPENMW_USE_FFMPEG
|
|
|
|
|
|
|
|
#include "ffmpeg_decoder.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
namespace MWSound
|
|
|
|
{
|
|
|
|
|
2012-03-17 02:51:46 -07:00
|
|
|
static void fail(const std::string &msg)
|
|
|
|
{ throw std::runtime_error("FFmpeg exception: "+msg); }
|
|
|
|
|
2012-03-18 11:47:15 -07:00
|
|
|
void FFmpeg_Decoder::open(const std::string &fname)
|
2012-03-16 23:59:21 -07:00
|
|
|
{
|
2012-03-17 02:51:46 -07:00
|
|
|
fail("Not currently working");
|
2012-03-16 23:59:21 -07:00
|
|
|
}
|
|
|
|
|
2012-03-18 11:47:15 -07:00
|
|
|
void FFmpeg_Decoder::close()
|
2012-03-16 23:59:21 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-03-18 11:47:15 -07:00
|
|
|
void FFmpeg_Decoder::getInfo(int *samplerate, ChannelConfig *chans, SampleType *type)
|
2012-03-17 02:51:46 -07:00
|
|
|
{
|
|
|
|
fail("Not currently working");
|
|
|
|
}
|
|
|
|
|
2012-03-18 11:47:15 -07:00
|
|
|
size_t FFmpeg_Decoder::read(char *buffer, size_t bytes)
|
2012-03-17 02:51:46 -07:00
|
|
|
{
|
|
|
|
fail("Not currently working");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-03-16 23:59:21 -07:00
|
|
|
|
|
|
|
FFmpeg_Decoder::FFmpeg_Decoder()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
FFmpeg_Decoder::~FFmpeg_Decoder()
|
|
|
|
{
|
2012-03-18 11:47:15 -07:00
|
|
|
close();
|
2012-03-16 23:59:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|