18 lines
387 B
C
18 lines
387 B
C
#ifndef DECODER_H
|
|
#define DECODER_H
|
|
extern "C" {
|
|
#include "libavcodec/avcodec.h"
|
|
#include "libavformat/avformat.h"
|
|
#include "libavutil/imgutils.h"
|
|
}
|
|
|
|
struct DecoderParam {
|
|
AVFormatContext* fmtCtx;
|
|
AVCodecContext* codecCtx;
|
|
int width;
|
|
int height;
|
|
int videoStreamIndex;
|
|
};
|
|
void InitDecoder(const char* filepath, DecoderParam& param);
|
|
AVFrame* RequestFrame(DecoderParam& param);
|
|
#endif |