From b8c5eb8048b566d632b25391a79ccbd6ce33c010 Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期六, 30 三月 2019 16:10:01 +0800 Subject: [PATCH] 1.3 增加nsq消息,解决进程重启 --- QiaoJiaSystem/DataManagerServer/AppPipeController.cpp | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/QiaoJiaSystem/DataManagerServer/AppPipeController.cpp b/QiaoJiaSystem/DataManagerServer/AppPipeController.cpp index 1b7a76a..13df05b 100644 --- a/QiaoJiaSystem/DataManagerServer/AppPipeController.cpp +++ b/QiaoJiaSystem/DataManagerServer/AppPipeController.cpp @@ -1,14 +1,19 @@ #include "AppPipeController.h" #include <basic/util/app/AppPreference.hpp> +#include <basic/util/app/AppConfig.h> #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.getLongData("gpu.index")), + videoCaptureElement(json["rtsp"].asString(), 25,3000,appPref.getIntData("gpu.index")), index(index), videoPublishElement(appPref.getStringData("publish.basepath")+".flv", - cv::Size(appPref.getIntData("pulish.width"),appPref.getIntData("pulish.height")), - "flv", 25, appPref.getLongData("gpu.index")) + 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()); @@ -20,7 +25,7 @@ registerElement(videoCaptureElement); registerElement(videoPublishElement); - videoCaptureElement.setOutPutInterval(3); + //videoCaptureElement.setOutPutInterval(3); } std::string AppPipeController::getRtmp() -- Gitblit v1.8.0