提交 4fabe8c9 authored 作者: blu's avatar blu

new feature entropy filter to ignore gray frame without iframe

上级 263c2693
{
"code":0,
"time":0,
"data":{
"ipc":"172.31.0.51",
"username":"admin",
"password":"FWBWTU",
"services":{
"evmgr":{
"sn":"ILS-1",
"addr":"0.0.0.0",
"port-pub":5556,
"port-rep":5557,
"iid":1
},
"evpuller":{
"sn":"ILS-2",
"addr":"0.0.0.0",
"port-pub":5556,
"port-rep":5557,
"iid":2
},
"evpusher":[
"T6L5N3KN":{
"addr":"127.0.0.1",
"api-cloud":"http://127.0.0.1:8089",
"ipcs":[
{
"sn":"ILS-2",
"addr":"localhost",
"iid":2,
"enabled":1,
"urlDest":"rtsp://40.73.41.176:554/test1"
"addr":"172.31.0.51",
"modules":{
"evml":[
{
"area":300,
"enabled":1,
"iid":1,
"post":30,
"pre":3,
"sn":"T6L5N3KN",
"status":0,
"thresh":80,
"type":"motion"
}
],
"evpuller":[
{
"addr":"127.0.0.1",
"iid":1,
"port-pub":5556,
"sn":"T6L5N3KN",
"status":0
}
],
"evpusher":[
{
"enabled":1,
"iid":1,
"password":"",
"sn":"T6L5N3KN",
"status":0,
"token":"",
"urlDest":"rtsp://40.73.41.176:554/test1",
"user":""
}
],
"evslicer":[
{
"enabled":1,
"iid":1,
"path":"slices",
"sn":"T6L5N3KN",
"status":0
}
]
},
"password":"FWBWTU",
"port":554,
"proto":"rtsp",
"status":0,
"user":"admin"
}
],
"evslicer":[
{
"sn":"ILS-3",
"addr":"192.168.0.25",
"iid":3,
"path": "/var/lib/slices/"
}
],
"evml":[
{
"feature":"motion",
"sn":"ILS-4",
"addr":"192.168.0.26",
"iid":4
}
]
"mqtt-cloud":"<cloud_addr>",
"port-cloud":5556,
"port-router":5550,
"proto":"zmq",
"sn":"T6L5N3KN",
"status":1
}
}
},
"lastupdated":1567669674
}
\ No newline at end of file
......@@ -72,6 +72,8 @@ private:
spdlog::error("failed to get local configuration");
exit(1);
}
// set all module status to 0
ret = LVDB::traverseConfigureModules(config, [](string modname, json &m, void* pUser)->int{
......
......@@ -8,89 +8,15 @@
#include <sstream>
#include "json.hpp"
#include "spdlog/spdlog.h"
#include "httplib.h"
using namespace std;
using namespace nlohmann;
using namespace httplib;
// cloudutils
namespace cloudutils
{
/**
* scn:
* evpuller, evmgr, evmotion, evslicer
*
* */
/*
{
"time":0,
"lastupdated": 0,
"code":0,
"data":{
"ILSEVMGR1":{
"lastupdated": 0,
"sn":"ILSEVMGR1",
"addr":"172.31.0.76",
"addr-cloud":"172.31.0.76",RzMbCp5W6^ZS
"proto":"zmq",
"port-cloud":5556,
"port-router":5550,
"status":1,
"ipcs":[
{
"addr":"172.31.0.51",
"proto":"rtsp",
"user":"admin",
"password":"FWBWTU",
"port": 554,
"status":1,
"modules":{
"evpuller":[
{
"sn":"ILSEVPULLER1",
"addr":"172.31.0.76",
"iid":1,
"port-pub":5556,
"status":1
}
],
"evpusher":[
{
"sn":"ILSEVPUSHER1",
"iid":1,
"urlDest":"rtsp://40.73.41.176:554/test1",
"user":"",
"password":"",
"token":"",
"enabled":1,
"status":1
}
],
"evslicer":[
{
"sn":"ILSEVSLICER1",
"iid":1,
"path":"slices",
"enabled":1,
"status":1
}
],
"evml":[
{
"type":"motion",
"sn":"ILSEVMLMOTION1",
"iid":1,
"enabled":1,
"status":1
}
]
}
}
]
}
}
}
*/
// const char *config = "{\"time\":0,\"code\":0,\"data\":{\"ILSEVMGR1\":{\"sn\":\"ILSEVMGR1\",\"addr\":\"127.0.0.1\",\"addr-cloud\":\"127.0.0.1\",\"proto\":\"zmq\",\"port-cloud\":5556,\"port-router\":5550,\"status\":1,\"ipcs\":[{\"addr\":\"172.31.0.51\",\"proto\":\"rtsp\",\"user\":\"admin\",\"password\":\"iLabService\",\"status\":1,\"modules\":{\"evpuller\":[{\"sn\":\"ILSEVPULLER1\",\"addr\":\"127.0.0.1\",\"iid\":1,\"port-pub\":5556,\"status\":1}],\"evpusher\":[{\"sn\":\"ILSEVPUSHER1\",\"iid\":1,\"urlDest\":\"rtsp://40.73.41.176:554/test1\",\"user\":\"\",\"password\":\"\",\"token\":\"\",\"enabled\":1,\"status\":1}],\"evslicer\":[{\"sn\":\"ILSEVSLICER1\",\"iid\":1,\"path\":\"slices\",\"enabled\":1,\"status\":1}],\"evml\":[{\"type\":\"motion\",\"sn\":\"ILSEVMLMOTION1\",\"iid\":1,\"enabled\":1,\"status\":1}]}}]}}}";
vector<string> split(const std::string& s, char delimiter)
{
......@@ -104,6 +30,22 @@ vector<string> split(const std::string& s, char delimiter)
return tokens;
}
/// ref: ../config.json
json registry(json &conf, string sn, string module) {
json ret;
string api;
try{
api = conf.at(sn).at("api-cloud").get<string>() + "/register";
}catch(exception &e) {
}
// /Client cli;
return ret;
}
} // namespace cloudutils
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论