| | |
| | |
|
| | | #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);
|
| | |
| | |
|
| | | {
|
| | | 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
|
| | |
| | | bool ret = rtspClient->init(&rtspConfig);
|
| | | if (!ret)
|
| | | {
|
| | | cout << "rtspClient.init error" << endl;
|
| | | LOG_ERROR << "rtspClient.init error";
|
| | | exit(EXIT_FAILURE);
|
| | | }
|
| | | }
|
| | |
| | | // bool ret = queue1->init(&config);
|
| | | // if (!ret)
|
| | | // {
|
| | | // cout << "queue1.init error" << endl;
|
| | | // LOG_ERROR << "queue1.init error";
|
| | | // exit(EXIT_FAILURE);
|
| | | // }
|
| | | //}
|
| | |
| | | }
|
| | |
|
| | | {
|
| | | 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";
|
| | | }
|
| | | }
|