From 5cf652629fb40796cd2e0ab17c3617ed52365473 Mon Sep 17 00:00:00 2001
From: pans <pans@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期五, 18 八月 2017 10:32:05 +0800
Subject: [PATCH] capnp client fix bug

---
 RtspFace/PipeLine.h |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/RtspFace/PipeLine.h b/RtspFace/PipeLine.h
index 4848d69..4bf3c43 100644
--- a/RtspFace/PipeLine.h
+++ b/RtspFace/PipeLine.h
@@ -11,6 +11,10 @@
 #define PLGP_RTSP_WIDTH "RTSP_WIDTH"
 #define PLGP_RTSP_HEIGHT "RTSP_HEIGHT"
 #define PLGP_RTSP_FPS "RTSP_FPS"
+#define PLGP_DEC_SPS_B64 "DEC_SPS_B64"
+#define PLGP_DEC_PPS_B64 "DEC_PPS_B64"
+#define PLGP_ENC_SPS_B64 "ENC_SPS_B64"
+#define PLGP_ENC_PPS_B64 "ENC_PPS_B64"
 
 #define ENABLE_PIPELINE_ELEM_TIMING_DEBUGGER
 
@@ -53,8 +57,8 @@
 		*this = _temp;
 	}
 
-	int breake(PipeMaterialBufferType selectPmType, int _selectMbfType, 
-		pm_breaker_func breaker, void* args = nullptr) const;
+	int breake(PipeMaterialBufferType selectPmType, int _selectMbfType, pm_breaker_func breaker, void* args = nullptr) const;
+	int breake(int _selectMbfUsage, pm_breaker_func breaker, void* args = nullptr) const;
 
 	//#todo assemble pm/mbf into this pm
 	void assemble();
@@ -78,6 +82,7 @@
 };
 
 typedef PipeLineElem* (*elem_create_func_t)();
+typedef void (*elem_destory_func_t)(PipeLineElem* elem);
 
 // 0 (there is no elem). do nothing
 // 1 (there is one elem). gain --> pm.deleter
@@ -96,22 +101,20 @@
 	
 	bool register_elem_creator(const std::string& type, elem_create_func_t func);
 	static bool register_global_elem_creator(const std::string& type, elem_create_func_t func);
-	
+
 	void push_elem(PipeLineElem* elem);
 	PipeLineElem* push_elem(const std::string& type);
 	void push_front_elem(PipeLineElem* elem);
 	bool remove_elem(PipeLineElem* elem);
-	
+    PipeLineElem* at(int idx);
+
+	void finit(elem_destory_func_t elem_destory_func);
+
 	bool check_pipe_complete(PipeLineElem* lastRetElem) const;
 	
 	// do pipe sync. returns the element who returns false, or the last one.
 	// if false return, the element should deal with pm, clean up.
 	PipeLineElem* pipe(PipeMaterial* pm = nullptr);
-	
-	// do pipe async
-	void pipe_start();
-	void pipe_notify(PipeLineElem*);
-	void pipe_stop();
 	
 	void set_param(const std::string& name, const std::string& value);
 	std::string get_param(const std::string& name) const;
@@ -131,7 +134,7 @@
 class PipeLineElemTimingDebugger
 {
 public:
-	PipeLineElemTimingDebugger(const PipeLineElem* _elem);
+	PipeLineElemTimingDebugger(const PipeLineElem* _elem = nullptr);
 	~PipeLineElemTimingDebugger();
 	
 	const PipeLineElem* elem;

--
Gitblit v1.8.0