From 822ae13835c2f6443d5b4fface6f3f547bcfcb11 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Thu, 6 Jan 2011 06:13:12 +0100 Subject: Implemented rudimentary ffmpeg-based decoder. --- decoders/ffmpeg_decoder.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 decoders/ffmpeg_decoder.h (limited to 'decoders/ffmpeg_decoder.h') diff --git a/decoders/ffmpeg_decoder.h b/decoders/ffmpeg_decoder.h new file mode 100644 index 0000000..a77e303 --- /dev/null +++ b/decoders/ffmpeg_decoder.h @@ -0,0 +1,24 @@ +#ifndef FFMPEG_DECODER_H +#define FFMPEG_DECODER_H + +#include "decoder.h" + +extern "C" { + #include + #include +} + +class DecoderFFmpeg : public Decoder { + private: + AVFormatContext* lavf_ctx; + AVCodecContext* lavc_ctx; + AVCodec* codec; + + public: + DecoderFFmpeg(const std::string& filename); + ~DecoderFFmpeg(); + + virtual std::size_t read(char* buf, std::size_t buf_size); +}; + +#endif -- cgit v1.2.3