From ab3d17cd44625a762fc10f0f1fd8f2c46b980aff Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期二, 26 四月 2022 11:42:19 +0800
Subject: [PATCH] capture use cpu and add arm version

---
 csrc/ffmpeg/format/FormatIn.hpp |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/csrc/ffmpeg/format/FormatIn.hpp b/csrc/ffmpeg/format/FormatIn.hpp
index b441c0b..2bdafd1 100644
--- a/csrc/ffmpeg/format/FormatIn.hpp
+++ b/csrc/ffmpeg/format/FormatIn.hpp
@@ -3,7 +3,9 @@
 
 #include <stdint.h>
 #include <memory>
+#ifdef GB28181
 #include "PsToEs.hpp"
+#endif
 
 struct AVFormatContext;
 struct AVDictionary;
@@ -13,7 +15,6 @@
 struct AVFrame;
 struct AVCodec;
 struct AVIOContext;
-struct AVBSFContext;
 
 typedef int(* read_packet)(void *opaque,uint8_t *buf, int buf_size);
 
@@ -30,7 +31,9 @@
 		
 	public:
 		int openWithCustomIO(void *opaque, read_packet fn, AVDictionary **options=NULL);
+#ifdef GB28181
         int openGb28181(const char *filename, AVDictionary **options);
+#endif
 
 		int open(const char *filename, AVDictionary **options);
 		bool findStreamInfo(AVDictionary **options);
@@ -52,14 +55,13 @@
 		AVFormatContext *getFromatContext(){return ctx_;}
 		const double getFPS()const{return fps_;}
 		const bool IsHEVC()const;
-		const bool isAVC1()const;
+		const bool IsAVC1()const;
 	private:
 	 	AVFormatContext 	*ctx_;
 	 	AVCodecContext 		*dec_ctx_;
 	 	int 				vs_idx_;
 		int 				as_idx_;
 
-        AVBSFContext   		*bsf_h264, *bsf_hevc;
 
 		VideoProp 			*prop_;
 	 	bool 				hw_accl_;
@@ -68,7 +70,9 @@
 		AVIOContext			*io_ctx_;
 		uint8_t 			*read_io_buff_;
 		const int 			read_io_buff_size_;
+#ifdef GB28181
 		GB28181API			*handle_gb28181;
+#endif
 	};
 }
 

--
Gitblit v1.8.0