From 12879769af38a00425309e292b2c167afc6612c1 Mon Sep 17 00:00:00 2001 From: pansen <pansen626@sina.com> Date: 星期四, 04 四月 2019 11:27:38 +0800 Subject: [PATCH] 增加点播功能 --- QiaoJiaSystem/DataManagerServer/AppPipeController.cpp | 37 ++++++++++++++++++------------------- 1 files changed, 18 insertions(+), 19 deletions(-) diff --git a/QiaoJiaSystem/DataManagerServer/AppPipeController.cpp b/QiaoJiaSystem/DataManagerServer/AppPipeController.cpp index 13df05b..30e114b 100644 --- a/QiaoJiaSystem/DataManagerServer/AppPipeController.cpp +++ b/QiaoJiaSystem/DataManagerServer/AppPipeController.cpp @@ -4,35 +4,34 @@ #include <basic/util/app/AppUtil.h> //#include <sstream> #include <algorithm> -AppPipeController::AppPipeController(int index, const Json::Value &json): - videoCaptureElement(json["rtsp"].asString(), 25,3000,appPref.getIntData("gpu.index")), - index(index), videoPublishElement(appPref.getStringData("publish.basepath")+".flv", - cv::Size(appConfig.getIntProperty("pulish.width"),appConfig.getIntProperty("pulish.height")), - "flv", 25, appPref.getIntData("gpu.index")) -{ - if(appConfig.getIntProperty("pulish.width") < 0 || appConfig.getIntProperty("pulish.height") < 0) - { - ERR("pulish.width: "<<appConfig.getIntProperty("pulish.width") <<" Height: "<< appConfig.getIntProperty("pulish.height")); - } - videoCaptureElement.registerConnector([&]{ - //if(!videoPublishElement.isBusy()){ - videoPublishElement.setImage(videoCaptureElement.getImage()); - //videoPublishElement.submit(); - //} +AppPipeController::AppPipeController(int index, const Json::Value &json) : + videoCaptureElement(json["rtsp"].asString(), 25, 3000, appPref.getIntData("gpu.index")), + index(index), videoPublishElement(appPref.getStringData("publish.basepath") + ".flv", + cv::Size(appConfig.getIntProperty("pulish.width"), + appConfig.getIntProperty("pulish.height")), + "flv", 25, appPref.getIntData("gpu.index")) { + if (appConfig.getIntProperty("pulish.width") < 0 || appConfig.getIntProperty("pulish.height") < 0) { + ERR("pulish.width: " << appConfig.getIntProperty("pulish.width") << " Height: " + << appConfig.getIntProperty("pulish.height")); + } + videoCaptureElement.registerConnector([&] { + //if(!videoPublishElement.isBusy()){ + videoPublishElement.setImage(videoCaptureElement.getImage()); +// videoPublishElement.submit(); + //} }); registerElement(videoCaptureElement); - registerElement(videoPublishElement); +// registerElement(videoPublishElement); //videoCaptureElement.setOutPutInterval(3); } -std::string AppPipeController::getRtmp() -{ +std::string AppPipeController::getRtmp() { std::string ret = videoPublishElement.getPath(); size_t pos = ret.find(".flv"); - ret = ret.substr(0,pos); + ret = ret.substr(0, pos); INFO(ret); return ret; } -- Gitblit v1.8.0