Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
E
evsuits
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
OpsTeam
evsuits
Commits
91e87568
提交
91e87568
authored
9月 02, 2019
作者:
blu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
init
上级
02100e65
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
36 行增加
和
16 行删除
+36
-16
c_cpp_properties.json
.vscode/c_cpp_properties.json
+4
-2
database.cpp
opencv-motion-detect/database.cpp
+13
-7
evmlmotion.cpp
opencv-motion-detect/evmlmotion.cpp
+1
-1
evpuller.cpp
opencv-motion-detect/evpuller.cpp
+2
-1
common.hpp
opencv-motion-detect/inc/common.hpp
+3
-0
database.h
opencv-motion-detect/inc/database.h
+10
-2
zmqhelper.hpp
opencv-motion-detect/inc/zmqhelper.hpp
+3
-3
没有找到文件。
.vscode/c_cpp_properties.json
浏览文件 @
91e87568
...
@@ -3,9 +3,11 @@
...
@@ -3,9 +3,11 @@
{
{
"name"
:
"Mac"
,
"name"
:
"Mac"
,
"includePath"
:
[
"includePath"
:
[
"${workspaceFolder}/**"
,
"${workspaceFolder}/opencv-motion-detect/inc/**"
,
"${workspaceFolder}/opencv-motion-detect/vendor/include/**"
,
"/usr/local/Cellar/opencv/4.1.0_2/include/opencv4"
,
"/usr/local/Cellar/opencv/4.1.0_2/include/opencv4"
,
"/usr/local/Cellar/ffmpeg/4.1.4_1/include"
"/usr/local/Cellar/ffmpeg/4.1.4_1/include"
,
"${workspaceFolder}/opencv-motion-detect/vendor/leveldb/include"
],
],
"defines"
:
[],
"defines"
:
[],
"macFrameworkPath"
:
[
"macFrameworkPath"
:
[
...
...
opencv-motion-detect/database.cpp
浏览文件 @
91e87568
...
@@ -199,9 +199,6 @@ namespace LVDB {
...
@@ -199,9 +199,6 @@ namespace LVDB {
int
clearDB
(
string
fileName
)
{
int
clearDB
(
string
fileName
)
{
return
0
;
return
0
;
}
}
typedef
int
(
*
cb_verify_str
)(
const
string
&
);
typedef
int
(
*
cb_verify_json
)(
const
json
&
);
int
getValue
(
string
&
value
,
string
key
,
string
fileName
,
cb_verify_str
cb
)
{
int
getValue
(
string
&
value
,
string
key
,
string
fileName
,
cb_verify_str
cb
)
{
int
ret
=
0
;
int
ret
=
0
;
...
@@ -404,12 +401,21 @@ togo_end:
...
@@ -404,12 +401,21 @@ togo_end:
return
0
;
return
0
;
}
}
int
getLocalConfig
(
json
&
config
,
string
fileName
){
int
getLocalConfig
(
json
&
config
,
string
key
,
string
fileName
){
return
getValue
(
config
,
LVDB_KEY_CONFIG
,
fileName
,
_validateConfig
);
if
(
key
.
empty
())
{
return
getValue
(
config
,
LVDB_KEY_CONFIG
,
fileName
,
_validateConfig
);
}
else
{
return
getValue
(
config
,
key
,
fileName
,
_validateConfig
);
}
};
};
int
setLocalConfig
(
json
&
config
,
string
fileName
){
int
setLocalConfig
(
json
&
config
,
string
key
,
string
fileName
){
return
setValue
(
config
,
LVDB_KEY_CONFIG
,
fileName
,
_validateConfig
);
if
(
key
.
empty
())
{
return
setValue
(
config
,
LVDB_KEY_CONFIG
,
fileName
,
_validateConfig
);
}
else
{
return
setValue
(
config
,
key
,
fileName
,
_validateConfig
);
}
};
};
// slices
// slices
...
...
opencv-motion-detect/evmlmotion.cpp
浏览文件 @
91e87568
...
@@ -560,7 +560,7 @@ protected:
...
@@ -560,7 +560,7 @@ protected:
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
spdlog
::
error
(
"evmlmotion {} failed to send event {} to {}: {}"
,
this
->
selfId
,
evt
,
this
->
slicerGid
,
zmq_strerror
(
zmq_errno
()));
spdlog
::
error
(
"evmlmotion {} failed to send event {} to {}: {}"
,
this
->
selfId
,
evt
,
this
->
slicerGid
,
zmq_strerror
(
zmq_errno
()));
}
else
{
}
else
{
spdlog
::
info
(
"evmlmotion {} send event: {}"
,
this
->
selfId
,
evt
);
spdlog
::
info
(
"evmlmotion {} send event: {}"
,
this
->
selfId
,
evt
);
}
}
}
}
...
...
opencv-motion-detect/evpuller.cpp
浏览文件 @
91e87568
...
@@ -228,7 +228,7 @@ private:
...
@@ -228,7 +228,7 @@ private:
if
(
ipc
.
count
(
"port"
)
==
0
)
{
if
(
ipc
.
count
(
"port"
)
==
0
)
{
ipcPort
=
"554"
;
ipcPort
=
"554"
;
}
else
{
}
else
{
ipcPort
=
ipc
[
"port"
]
;
ipcPort
=
to_string
(
ipc
[
"port"
])
;
}
}
...
@@ -330,6 +330,7 @@ protected:
...
@@ -330,6 +330,7 @@ protected:
bool
bStopSig
=
false
;
bool
bStopSig
=
false
;
uint64_t
pktCnt
=
0
;
uint64_t
pktCnt
=
0
;
spdlog
::
info
(
"evpulelr {} reading packets from {}"
,
selfId
,
urlIn
);
while
(
true
)
{
while
(
true
)
{
if
(
checkStop
()
==
true
)
{
if
(
checkStop
()
==
true
)
{
bStopSig
=
true
;
bStopSig
=
true
;
...
...
opencv-motion-detect/inc/common.hpp
浏览文件 @
91e87568
...
@@ -301,9 +301,11 @@ namespace cloudutils
...
@@ -301,9 +301,11 @@ namespace cloudutils
/*
/*
{
{
"time":0,
"time":0,
"lastupdated": 0,
"code":0,
"code":0,
"data":{
"data":{
"ILSEVMGR1":{
"ILSEVMGR1":{
"lastupdated": 0,
"sn":"ILSEVMGR1",
"sn":"ILSEVMGR1",
"addr":"172.31.0.76",
"addr":"172.31.0.76",
"addr-cloud":"172.31.0.76",
"addr-cloud":"172.31.0.76",
...
@@ -317,6 +319,7 @@ namespace cloudutils
...
@@ -317,6 +319,7 @@ namespace cloudutils
"proto":"rtsp",
"proto":"rtsp",
"user":"admin",
"user":"admin",
"password":"FWBWTU",
"password":"FWBWTU",
"port": 554,
"status":1,
"status":1,
"modules":{
"modules":{
"evpuller":[
"evpuller":[
...
...
opencv-motion-detect/inc/database.h
浏览文件 @
91e87568
...
@@ -21,6 +21,14 @@ namespace LVDB {
...
@@ -21,6 +21,14 @@ namespace LVDB {
#define LVDB_KEY_SUFFIX_BACK "_bak"
#define LVDB_KEY_SUFFIX_BACK "_bak"
#define LVDB_KEY_SN "SN"
#define LVDB_KEY_SN "SN"
#define LVDB_KEY_CONFIG "CONFIG"
#define LVDB_KEY_CONFIG "CONFIG"
typedef
int
(
*
cb_verify_str
)(
const
string
&
);
typedef
int
(
*
cb_verify_json
)(
const
json
&
);
int
setValue
(
const
string
&
value
,
string
key
,
string
fileName
,
cb_verify_str
cb
);
int
getValue
(
string
&
value
,
string
key
,
string
fileName
,
cb_verify_str
cb
);
int
setValue
(
const
string
&
value
,
string
key
,
string
fileName
,
cb_verify_json
cb
);
int
getValue
(
string
&
value
,
string
key
,
string
fileName
,
cb_verify_json
cb
);
//
//
json
*
findConfigModule
(
json
&
config
,
string
sn
,
string
moduleName
,
int
iid
);
json
*
findConfigModule
(
json
&
config
,
string
sn
,
string
moduleName
,
int
iid
);
...
@@ -32,8 +40,8 @@ namespace LVDB {
...
@@ -32,8 +40,8 @@ namespace LVDB {
int
getSn
(
json
&
info
,
string
fileName
=
LVDB_FILE_GENERAL
);
int
getSn
(
json
&
info
,
string
fileName
=
LVDB_FILE_GENERAL
);
// cloudutils::config
// cloudutils::config
int
getLocalConfig
(
json
&
config
,
string
fileName
=
LVDB_FILE_GENERAL
);
int
getLocalConfig
(
json
&
config
,
string
key
=
""
,
string
fileName
=
LVDB_FILE_GENERAL
);
int
setLocalConfig
(
json
&
config
,
string
fileName
=
LVDB_FILE_GENERAL
);
int
setLocalConfig
(
json
&
config
,
string
key
=
""
,
string
fileName
=
LVDB_FILE_GENERAL
);
// slices
// slices
int
getSlices
(
json
&
slices
,
string
fileName
);
int
getSlices
(
json
&
slices
,
string
fileName
);
...
...
opencv-motion-detect/inc/zmqhelper.hpp
浏览文件 @
91e87568
...
@@ -22,15 +22,15 @@ namespace zmqhelper {
...
@@ -22,15 +22,15 @@ namespace zmqhelper {
#define MSG_HELLO "hello"
#define MSG_HELLO "hello"
#define EV_MSG_META_PING "ping"
#define EV_MSG_META_PING "ping"
#define EV_MSG_META_PONG "pong"
#define EV_MSG_META_PONG "pong"
#define EV_MSG_META_PEEROFFLINE "offline"
#define EV_MSG_META_RESTART "restart"
#define EV_MSG_META_UPDATE "update"
#define EV_MSG_META_EVENT "event"
#define EV_MSG_META_EVENT "event"
#define EV_MSG_META_CMD "cmd"
#define EV_MSG_META_AVFORMATCTX "afctx"
#define EV_MSG_META_AVFORMATCTX "afctx"
#define EV_MSG_TYPE_AI_MOTION "ai_motion"
#define EV_MSG_TYPE_AI_MOTION "ai_motion"
#define EV_MSG_TYPE_CONN_STAT "connstat"
#define EV_MSG_TYPE_CONN_STAT "connstat"
#define EV_MSG_TYPE_SYS_STAT "sysstat"
#define EV_MSG_TYPE_SYS_STAT "sysstat"
// #define EV_MSG_CMD_RESTART "restart"
// #define EV_MSG_CMD_UPDATE "update"
#define EV_MSG_EVENT_MOTION_START "start"
#define EV_MSG_EVENT_MOTION_START "start"
#define EV_MSG_EVENT_MOTION_END "end"
#define EV_MSG_EVENT_MOTION_END "end"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论