瀏覽代碼

stream port fix

chanjunkai 5 年之前
父節點
當前提交
ca829e7d90
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 4 2
      controller/index.py
  2. 1 1
      object/ResObject.py

+ 4 - 2
controller/index.py

@@ -27,6 +27,8 @@ from object.RedisObject import RedisObject
 from azoauth.config import *
 
 SERVER_PREFIX = 'http://www.dvema.com'
+# PORT_PREFIX = '8554'
+PORT_PREFIX = '443'
 
 
 class authView(TemplateView):
@@ -211,8 +213,8 @@ class oa2RtspStartView(TemplateView):
             # ur_qs = UidRtspModel.objects.filter(usermodel__userID=userID,uid=)
             UID = ur_qs[0]['uid']
             PWD = ur_qs[0]['password']
-            MSG = 'rtsp://{RESP_SERVER_DOMAIN}:8554/{stream_name}'. \
-                format(RESP_SERVER_DOMAIN=RESP_SERVER_DOMAIN, stream_name=ur_qs[0]['rtsp_url'])
+            MSG = 'rtsp://{RESP_SERVER_DOMAIN}:{PORT_PREFIX}/{stream_name}'. \
+                format(RESP_SERVER_DOMAIN=RESP_SERVER_DOMAIN, stream_name=ur_qs[0]['rtsp_url'],PORT_PREFIX=PORT_PREFIX)
             # po = Pool(10)
             # po.apply_async(self.runSendRtspMsg, (UID, PWD, MSG))
             print(UID)

+ 1 - 1
object/ResObject.py

@@ -7,7 +7,7 @@ class ResObject(object):
     def __init__(self, lang='cn'):
         self.lang = lang
 
-    def json(self, code, res={}, extra={'msg':''}):
+    def json(self, code, res={}, extra={'msg': ''}):
         msg_data = {
             0: 'Success',
             10: extra['msg']