Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
I
ils-common-video
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
提交
议题看板
打开侧边栏
OpsTeam
ils-common-video
Commits
11c2e68a
提交
11c2e68a
authored
9月 13, 2021
作者:
lc.zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ils-video-merger:修改发送rabbitmq消息内容
ils-video-recorder:修改多海康账号配置问题
上级
61c52c6a
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
5 行删除
+14
-5
mysql.py
ils_common_video/db/mysql.py
+5
-2
merger.py
ils_common_video/isc_video/merger.py
+4
-0
recorder.py
ils_common_video/isc_video/recorder.py
+5
-3
没有找到文件。
ils_common_video/db/mysql.py
浏览文件 @
11c2e68a
...
@@ -110,7 +110,7 @@ def get_camera_info(cursor, conn, camera_code=None, platform='isc', video_plan_t
...
@@ -110,7 +110,7 @@ def get_camera_info(cursor, conn, camera_code=None, platform='isc', video_plan_t
sql
=
'''
sql
=
'''
select
select
id as camera_id,
camera_info.
id as camera_id,
name as camera_name,
name as camera_name,
point_index_code,
point_index_code,
'131331' as event_type,
'131331' as event_type,
...
@@ -121,10 +121,13 @@ def get_camera_info(cursor, conn, camera_code=None, platform='isc', video_plan_t
...
@@ -121,10 +121,13 @@ def get_camera_info(cursor, conn, camera_code=None, platform='isc', video_plan_t
region_path_name,
region_path_name,
video_plan_type,
video_plan_type,
network_quality,
network_quality,
is_valid, platform, treaty, model, brand, cac.video_stream_url
is_valid, platform, treaty, model, brand, cac.video_stream_url,cac.video_stream_url ,account.app_key,account.app_secret,
SUBSTRING_INDEX(account.req_url,':',1) as req_ip,
SUBSTRING_INDEX(account.req_url,':',-1) as req_port
from camera_info
from camera_info
left join camera_ai_config cac
left join camera_ai_config cac
on camera_info.id = cac.camera_info_id
on camera_info.id = cac.camera_info_id
LEFT JOIN camera_account_config account on camera_info.account_id = account.id
{}
{}
order by create_time;
order by create_time;
'''
.
format
(
_filter
)
'''
.
format
(
_filter
)
...
...
ils_common_video/isc_video/merger.py
浏览文件 @
11c2e68a
...
@@ -128,6 +128,10 @@ class EventMergerJob:
...
@@ -128,6 +128,10 @@ class EventMergerJob:
'camera_code'
:
camera
[
'device_code'
],
'camera_code'
:
camera
[
'device_code'
],
'camera_index'
:
camera
[
'point_index_code'
],
'camera_index'
:
camera
[
'point_index_code'
],
'db_table'
:
camera
[
'db_table'
],
'db_table'
:
camera
[
'db_table'
],
'hik_app_key'
:
camera
[
'app_key'
],
'hik_app_secret'
:
camera
[
'app_secret'
],
'hik_req_ip'
:
camera
[
'req_ip'
],
'hik_req_port'
:
camera
[
'req_port'
],
}
}
# 预留三分钟不处理
# 预留三分钟不处理
now
=
datetime
.
utcnow
()
-
timedelta
(
minutes
=
3
)
now
=
datetime
.
utcnow
()
-
timedelta
(
minutes
=
3
)
...
...
ils_common_video/isc_video/recorder.py
浏览文件 @
11c2e68a
...
@@ -27,9 +27,9 @@ tz = pytz.timezone('Asia/Shanghai')
...
@@ -27,9 +27,9 @@ tz = pytz.timezone('Asia/Shanghai')
video_path
=
'/tmp/videos/isc-record'
video_path
=
'/tmp/videos/isc-record'
os
.
makedirs
(
video_path
,
exist_ok
=
True
)
os
.
makedirs
(
video_path
,
exist_ok
=
True
)
hk_config
=
dynaconf
.
settings
.
get
(
'ISC'
)
#
hk_config = dynaconf.settings.get('ISC')
hik_client
=
HikVisionClient
(
str
(
hk_config
.
get
(
'KEY'
)),
hk_config
.
get
(
'SECRET'
),
#
hik_client = HikVisionClient(str(hk_config.get('KEY')), hk_config.get('SECRET'),
hk_config
.
get
(
'HOST'
),
hk_config
.
get
(
'PORT'
))
#
hk_config.get('HOST'), hk_config.get('PORT'))
# api_helper = IntelabApiHelper()
# api_helper = IntelabApiHelper()
...
@@ -375,6 +375,8 @@ class ProcessMessage:
...
@@ -375,6 +375,8 @@ class ProcessMessage:
res
=
{
'file_name'
:
file_name
,
'is_completed'
:
False
,
'recovered_time'
:
start_time
}
res
=
{
'file_name'
:
file_name
,
'is_completed'
:
False
,
'recovered_time'
:
start_time
}
try
:
try
:
hik_client
=
HikVisionClient
(
body
[
'hik_app_key'
],
body
[
'hik_app_secret'
],
body
[
'hik_req_ip'
],
body
[
'hik_req_port'
])
playback_urls
=
hik_client
.
get_cameras_playback_urls
(
playback_urls
=
hik_client
.
get_cameras_playback_urls
(
body
[
'camera_index'
],
body
[
'camera_index'
],
IntelabApiHelper
.
iso_format
(
start_time
),
IntelabApiHelper
.
iso_format
(
start_time
),
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论