2017-12-12 15:12:07 +01:00
|
|
|
#ifndef DECODER_H
|
|
|
|
#define DECODER_H
|
|
|
|
|
2019-03-02 16:43:43 +01:00
|
|
|
#include <libavformat/avformat.h>
|
2017-12-15 17:34:16 +01:00
|
|
|
#include <SDL2/SDL_stdinc.h>
|
2017-12-12 15:12:07 +01:00
|
|
|
|
2019-03-02 15:16:55 +01:00
|
|
|
struct video_buffer;
|
2017-12-12 15:12:07 +01:00
|
|
|
|
|
|
|
struct decoder {
|
2019-03-02 15:16:55 +01:00
|
|
|
struct video_buffer *video_buffer;
|
2019-03-02 16:43:43 +01:00
|
|
|
AVCodecContext *codec_ctx;
|
2017-12-12 15:12:07 +01:00
|
|
|
};
|
|
|
|
|
2019-03-02 16:43:43 +01:00
|
|
|
void decoder_init(struct decoder *decoder, struct video_buffer *vb);
|
|
|
|
|
|
|
|
SDL_bool decoder_open(struct decoder *decoder, AVCodec *codec);
|
|
|
|
void decoder_close(struct decoder *decoder);
|
|
|
|
|
|
|
|
SDL_bool decoder_push(struct decoder *decoder, AVPacket *packet);
|
|
|
|
void decoder_interrupt(struct decoder *decoder);
|
2017-12-12 15:12:07 +01:00
|
|
|
|
|
|
|
#endif
|