25 lines
		
	
	
		
			538 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			538 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;
 | 
						|
};
 | 
						|
 | 
						|
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 |