|
@@ -254,7 +254,8 @@ class oa2RtspStartView(TemplateView):
|
|
|
'audioCodecs': ['G711'],
|
|
|
'protocols': ['RTSP'],
|
|
|
'authorizationTypes': ['NONE'],
|
|
|
- 'uri': rtsp_uri
|
|
|
+ 'uri': rtsp_uri,
|
|
|
+ 'msg':send_flag
|
|
|
}
|
|
|
# if send_flag:
|
|
|
# redisObj.set_data(key=key, val=str(res_json), expire=15)
|
|
@@ -269,8 +270,10 @@ class oa2RtspStartView(TemplateView):
|
|
|
back = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).\
|
|
|
communicate(timeout=10)
|
|
|
except Exception as e:
|
|
|
+ return repr(e)
|
|
|
return False
|
|
|
else:
|
|
|
+ return back[0].decode()
|
|
|
print("back0----", back[0].decode()) # 注意需要进行解码操作,默认输出的是字节
|
|
|
print("back1----", back[1].decode()) # back是一个元祖,可以通过元祖取值的方式获取结果
|
|
|
return True
|