From dfa10a0616074fd82703516a2d3ef0f44cac64ab Mon Sep 17 00:00:00 2001
From: pans <pans@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期五, 30 十二月 2016 18:20:34 +0800
Subject: [PATCH] 

---
 RtspFace/main.cpp |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/RtspFace/main.cpp b/RtspFace/main.cpp
index bf67254..8b87ae0 100644
--- a/RtspFace/main.cpp
+++ b/RtspFace/main.cpp
@@ -9,11 +9,12 @@
 
 #include "PL_SensetimeFaceDetect.h"
 
-#include <iostream>
-using namespace std;
+#include "logger.h"
 
 int main(int argc, char** argv)
 {
+	initLogger(2);
+
 	PipeLine pipeLine;
 	
 	pipeLine.register_elem_creator("PL_RTSPClient", create_PL_RTSPClient);
@@ -27,7 +28,7 @@
 	
 	{
 		PL_RTSPClient* rtspClient = (PL_RTSPClient*)pipeLine.push_elem("PL_RTSPClient");
-		RTSPConfig rtspConfig;
+		PL_RTSPClient_Config rtspConfig;
 		rtspConfig.progName = argv[0];
 		rtspConfig.rtspURL = argv[1];
 		rtspConfig.aux = true; // ffmpeg need aux, but live555 not
@@ -37,7 +38,7 @@
 		bool ret = rtspClient->init(&rtspConfig);
 		if (!ret)
 		{
-			cout << "rtspClient.init error" << endl;
+			LOG_ERROR << "rtspClient.init error";
 			exit(EXIT_FAILURE);
 		}
 	}
@@ -64,7 +65,7 @@
 	//	bool ret = queue1->init(&config);
 	//	if (!ret)
 	//	{
-	//		cout << "queue1.init error" << endl;
+	//		LOG_ERROR << "queue1.init error";
 	//		exit(EXIT_FAILURE);
 	//	}
 	//}
@@ -75,20 +76,19 @@
 	}
 	
 	{
-		RTSPServerConfig config;
 		PL_RTSPServer* rtspServer = (PL_RTSPServer*)pipeLine.push_elem("PL_RTSPServer");
-		bool ret = rtspServer->init(&config);
+		bool ret = rtspServer->init(nullptr);
 		if (!ret)
 		{
-			cout << "rtspServer.init error" << endl;
+			LOG_ERROR << "rtspServer.init error";
 			exit(EXIT_FAILURE);
 		}
 	}
 	
 	while(true)
 	{
-		//cout << "begin pipe" << endl;
+		//LOG_ERROR << "begin pipe";
 		pipeLine.pipe();
-		//cout << "end pipe" << endl;
+		//LOG_ERROR << "end pipe";
 	}
 }

--
Gitblit v1.8.0