From 43af8d48ca0d2ec219a7641d5555fe4c2479b047 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 10 一月 2017 09:32:54 +0800
Subject: [PATCH] commit for add new file

---
 RtspFace/PipeLinePool.cpp |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/RtspFace/PipeLinePool.cpp b/RtspFace/PipeLinePool.cpp
index 3b01327..f02eef1 100644
--- a/RtspFace/PipeLinePool.cpp
+++ b/RtspFace/PipeLinePool.cpp
@@ -87,11 +87,7 @@
 
 PipeLine* PipeLinePool::get_free()
 {
-	if (pipelines_free.empty())
-	{
-		PLP_MUTEX_LOCK(pl_mutex, nullptr);
-	}
-	
+
 	PLP_MUTEX_LOCK(tsafe_mutex, nullptr);
 	
 	if (pipelines_free.empty())
@@ -118,6 +114,19 @@
 	pipelines_free.insert(pl);
 
 	PLP_MUTEX_UNLOCK(tsafe_mutex,);
+}
+
+bool PipeLinePool::wait_free()
+{
+	if (pipelines_free.empty())
+	{
+		PLP_MUTEX_LOCK(pl_mutex, false);
+	}
 	
-	PLP_MUTEX_UNLOCK(pl_mutex,);
+	return true;
+}
+
+bool PipeLinePool::notify_free()
+{
+	PLP_MUTEX_UNLOCK(pl_mutex, false);
 }

--
Gitblit v1.8.0