提交 c4cd86f3 authored 作者: blu's avatar blu

video ai

上级 74768f91
...@@ -53,7 +53,7 @@ print("CONFIG: \nMQTT: {}:{}\n".format(MQTT_HOST, MQTT_PORT)) ...@@ -53,7 +53,7 @@ print("CONFIG: \nMQTT: {}:{}\n".format(MQTT_HOST, MQTT_PORT))
def downloadFile(ipcSn, dirName, fileName, destDir): def downloadFile(ipcSn, dirName, fileName, destDir):
file_path=ipcSn + '/'+dirName+'/'+fileName file_path=ipcSn + '/'+dirName+'/'+fileName
destDir = destDir + '/' + fileName destDir = destDir + '/' + fileName
print("downloading: {} {} {}".format(ipcSn, dirName, file_path)) print("downloading {}: {} {} {}".format(destDir, ipcSn, dirName, file_path))
with ShareFileClient.from_connection_string(conn_str=CONNSTR, share_name=SHARENAME, file_path=file_path) as fc: with ShareFileClient.from_connection_string(conn_str=CONNSTR, share_name=SHARENAME, file_path=file_path) as fc:
with open(destDir, "wb") as f: with open(destDir, "wb") as f:
data = fc.download_file() data = fc.download_file()
...@@ -126,7 +126,7 @@ worker.conf.update( ...@@ -126,7 +126,7 @@ worker.conf.update(
def take_task(task): def take_task(task):
ret = {'code': 0,'msg': 'ok'} ret = {'code': 0,'msg': 'ok'}
print("taking task", json.dumps(task)) print("taking task", json.dumps(task))
taskValidator = Validator(VA_SCHEMAS['task']) taskValidator = Validator(VA_SCHEMAS['task'], allow_unknown=True)
if not taskValidator.validate(task): if not taskValidator.validate(task):
ret['code'] = 1 ret['code'] = 1
ret['msg'] = 'invalid request body' ret['msg'] = 'invalid request body'
......
...@@ -240,9 +240,8 @@ public: ...@@ -240,9 +240,8 @@ public:
} }
if(!bInputIsImage) { if(!bInputIsImage) {
if((cameNo == -1 && !cap.open(inVideoUri))|| (cameNo != -1 && !cap.open(cameNo))) if((cameNo == -1 && !cap.open(inVideoUri, CAP_ANY))|| (cameNo != -1 && !cap.open(cameNo)))
{ {
spdlog::error("{} failed to open input video {}", selfId, inVideoUri); spdlog::error("{} failed to open input video {}", selfId, inVideoUri);
exit(1); exit(1);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论