pans
2016-12-30 dfa10a0616074fd82703516a2d3ef0f44cac64ab
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";
   }
}