修复msvc下无法正确获取拓展名的问题, 修复视频文件结束后任然解码的问题, 添加CMake Window下编译
This commit is contained in:
@@ -1,25 +1,18 @@
|
||||
#ifndef DECODER_H
|
||||
#define DECODER_H
|
||||
extern "C"{
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libavutil/imgutils.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;
|
||||
struct DecoderParam {
|
||||
AVFormatContext* fmtCtx;
|
||||
AVCodecContext* codecCtx;
|
||||
int width;
|
||||
int height;
|
||||
int videoStreamIndex;
|
||||
};
|
||||
|
||||
extern "C"{
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libavutil/imgutils.h"
|
||||
}
|
||||
|
||||
void InitDecoder(const char* filepath, DecoderParam& param);
|
||||
AVFrame* RequestFrame(DecoderParam& param);
|
||||
#endif
|
||||
Reference in New Issue
Block a user