summaryrefslogtreecommitdiff
path: root/decoders/ffmpeg_decoder.h
blob: a77e303366bf26abc10856c715a59daba0dd7f73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef FFMPEG_DECODER_H
#define FFMPEG_DECODER_H

#include "decoder.h"

extern "C" {
	#include <libavformat/avformat.h>
	#include <libavcodec/avcodec.h>
}

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