Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
E
evsuits
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
OpsTeam
evsuits
Commits
1e165174
提交
1e165174
authored
9月 07, 2019
作者:
blu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
new feature entropy filter to ignore gray frame without iframe
上级
61bccc25
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
17 行增加
和
7 行删除
+17
-7
database.cpp
opencv-motion-detect/database.cpp
+8
-4
evcloudsvc.cpp
opencv-motion-detect/evcloudsvc.cpp
+5
-0
evmgr.cpp
opencv-motion-detect/evmgr.cpp
+1
-1
database.h
opencv-motion-detect/inc/database.h
+3
-2
没有找到文件。
opencv-motion-detect/database.cpp
浏览文件 @
1e165174
...
@@ -96,8 +96,9 @@ namespace LVDB {
...
@@ -96,8 +96,9 @@ namespace LVDB {
return
ret
;
return
ret
;
}
}
int
traverseConfigureModules
(
json
&
config
,
cb_traverse_configration_module
cb
,
string
moduleName
){
int
traverseConfigureModules
(
json
&
config
,
cb_traverse_configration_module
cb
,
void
*
pUser
,
string
moduleName
){
int
ret
=
0
;
int
ret
=
0
;
int
cnt
=
0
;
if
(
config
.
count
(
"data"
)
==
0
)
{
if
(
config
.
count
(
"data"
)
==
0
)
{
return
-
1
;
return
-
1
;
}
}
...
@@ -135,7 +136,8 @@ namespace LVDB {
...
@@ -135,7 +136,8 @@ namespace LVDB {
if
(
!
sub
.
empty
())
{
if
(
!
sub
.
empty
())
{
for
(
auto
&
m
:
module
)
{
for
(
auto
&
m
:
module
)
{
if
(
m
.
count
(
"type"
)
!=
0
&&
m
[
"type"
]
==
sub
)
{
if
(
m
.
count
(
"type"
)
!=
0
&&
m
[
"type"
]
==
sub
)
{
ret
=
cb
(
modname
,
m
);
ret
=
cb
(
modname
,
m
,
pUser
);
cnt
++
;
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
spdlog
::
error
(
"failed to traverse and callback config on module: {}"
,
m
.
dump
());
spdlog
::
error
(
"failed to traverse and callback config on module: {}"
,
m
.
dump
());
return
ret
;
return
ret
;
...
@@ -147,7 +149,8 @@ namespace LVDB {
...
@@ -147,7 +149,8 @@ namespace LVDB {
}
else
{
}
else
{
for
(
auto
&
[
mn
,
mod
]
:
modules
.
items
())
{
for
(
auto
&
[
mn
,
mod
]
:
modules
.
items
())
{
for
(
auto
&
m
:
mod
)
{
for
(
auto
&
m
:
mod
)
{
ret
=
cb
(
mn
,
m
);
ret
=
cb
(
mn
,
m
,
pUser
);
cnt
++
;
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
spdlog
::
error
(
"failed to traverse and callback config on module: {}"
,
m
.
dump
());
spdlog
::
error
(
"failed to traverse and callback config on module: {}"
,
m
.
dump
());
return
ret
;
return
ret
;
...
@@ -159,7 +162,8 @@ namespace LVDB {
...
@@ -159,7 +162,8 @@ namespace LVDB {
}
}
}
}
}
}
return
0
;
return
cnt
;
}
}
int
_getDB
(
string
fileName
,
DB
**
pdb
)
{
int
_getDB
(
string
fileName
,
DB
**
pdb
)
{
...
...
opencv-motion-detect/evcloudsvc.cpp
浏览文件 @
1e165174
...
@@ -156,6 +156,7 @@ class HttpSrv{
...
@@ -156,6 +156,7 @@ class HttpSrv{
try
{
try
{
string
sn
=
req
.
get_param_value
(
"sn"
);
string
sn
=
req
.
get_param_value
(
"sn"
);
string
module
=
req
.
get_param_value
(
"module"
);
string
module
=
req
.
get_param_value
(
"module"
);
auto
cfg
=
json
::
parse
(
req
.
body
);
if
(
sn
.
empty
()
||
module
.
empty
()){
if
(
sn
.
empty
()
||
module
.
empty
()){
throw
StrException
(
"no para sn/module"
);
throw
StrException
(
"no para sn/module"
);
}
}
...
@@ -163,9 +164,13 @@ class HttpSrv{
...
@@ -163,9 +164,13 @@ class HttpSrv{
string
key
,
modname
;
string
key
,
modname
;
if
(
module
==
"evmgr"
)
{
if
(
module
==
"evmgr"
)
{
key
=
sn
;
key
=
sn
;
// trigger exception if
(
void
)
cfg
[
"data"
][
key
];
}
else
{
}
else
{
if
(
modname
==
"evml"
)
{
if
(
modname
==
"evml"
)
{
string
modname
=
"evml:"
+
module
.
substr
(
4
,
module
.
size
());
modname
=
"evml:"
+
module
.
substr
(
4
,
module
.
size
());
}
else
{
}
else
{
modname
=
module
;
modname
=
module
;
}
}
...
...
opencv-motion-detect/evmgr.cpp
浏览文件 @
1e165174
...
@@ -74,7 +74,7 @@ private:
...
@@ -74,7 +74,7 @@ private:
}
}
// set all module status to 0
// set all module status to 0
ret
=
LVDB
::
traverseConfigureModules
(
config
,
[](
string
modname
,
json
&
m
)
->
int
{
ret
=
LVDB
::
traverseConfigureModules
(
config
,
[](
string
modname
,
json
&
m
,
void
*
pUser
)
->
int
{
if
(
m
.
count
(
"status"
)
!=
0
)
if
(
m
.
count
(
"status"
)
!=
0
)
{
{
//cout << modname <<" ," << m.dump() << endl;
//cout << modname <<" ," << m.dump() << endl;
...
...
opencv-motion-detect/inc/database.h
浏览文件 @
1e165174
...
@@ -53,8 +53,8 @@ namespace LVDB {
...
@@ -53,8 +53,8 @@ namespace LVDB {
int
getLog
(
json
&
log
,
json
&
writeOptions
,
string
fileName
);
int
getLog
(
json
&
log
,
json
&
writeOptions
,
string
fileName
);
int
setLog
(
json
&
log
,
json
&
readOptions
,
string
fileName
);
int
setLog
(
json
&
log
,
json
&
readOptions
,
string
fileName
);
typedef
int
(
*
cb_traverse_configration_module
)(
string
modname
,
json
&
mod
);
typedef
int
(
*
cb_traverse_configration_module
)(
string
modname
,
json
&
mod
,
void
*
pUser
);
int
traverseConfigureModules
(
json
&
config
,
cb_traverse_configration_module
cb
,
string
moduleName
=
""
);
int
traverseConfigureModules
(
json
&
config
,
cb_traverse_configration_module
cb
,
void
*
pUser
=
NULL
,
string
moduleName
=
""
);
}
// namespace LVDB
}
// namespace LVDB
#endif
#endif
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论