init
This commit is contained in:
		
							
								
								
									
										25
									
								
								include/decoder.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								include/decoder.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
#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
 | 
			
		||||
		Reference in New Issue
	
	Block a user