瀏覽代碼

机场推流服务

develop
chenyukun 1 年之前
父節點
當前提交
8d7cf644b5
共有 68 個檔案被更改,包括 47 行新增25 行删除
  1. 二進制
      bean/__pycache__/Feedback.cpython-38.pyc
  2. 二進制
      bean/__pycache__/File.cpython-38.pyc
  3. 二進制
      bean/__pycache__/Result.cpython-38.pyc
  4. 二進制
      bean/__pycache__/__init__.cpython-38.pyc
  5. 二進制
      common/__pycache__/Constant.cpython-38.pyc
  6. 二進制
      common/__pycache__/__init__.cpython-38.pyc
  7. 二進制
      concurrency/__pycache__/__init__.cpython-38.pyc
  8. +16
    -8
      concurrency/http/HttpUploadFileProcess.py
  9. 二進制
      concurrency/http/__pycache__/HttpFeedbackThread.cpython-38.pyc
  10. 二進制
      concurrency/http/__pycache__/HttpServiceImpl.cpython-38.pyc
  11. 二進制
      concurrency/http/__pycache__/HttpUploadFileProcess.cpython-38.pyc
  12. 二進制
      concurrency/http/__pycache__/__init__.cpython-38.pyc
  13. +16
    -8
      concurrency/mqtt/MqttUploadFileProcess.py
  14. 二進制
      concurrency/mqtt/__pycache__/MqttFeedbackThread.cpython-38.pyc
  15. 二進制
      concurrency/mqtt/__pycache__/MqttUploadFileProcess.cpython-38.pyc
  16. 二進制
      concurrency/mqtt/__pycache__/__init__.cpython-38.pyc
  17. +7
    -5
      config/mqtt.yml
  18. 二進制
      enums/__pycache__/ExceptionEnum.cpython-38.pyc
  19. 二進制
      enums/__pycache__/HttpExceptionEnum.cpython-38.pyc
  20. 二進制
      enums/__pycache__/StatusEnum.cpython-38.pyc
  21. 二進制
      enums/__pycache__/__init__.cpython-38.pyc
  22. 二進制
      exception/__pycache__/CustomerException.cpython-38.pyc
  23. 二進制
      exception/__pycache__/__init__.cpython-38.pyc
  24. 二進制
      osssdk/__pycache__/__init__.cpython-38.pyc
  25. 二進制
      osssdk/__pycache__/api.cpython-38.pyc
  26. 二進制
      osssdk/__pycache__/auth.cpython-38.pyc
  27. 二進制
      osssdk/__pycache__/compat.cpython-38.pyc
  28. 二進制
      osssdk/__pycache__/crc64_combine.cpython-38.pyc
  29. 二進制
      osssdk/__pycache__/credentials.cpython-38.pyc
  30. 二進制
      osssdk/__pycache__/crypto.cpython-38.pyc
  31. 二進制
      osssdk/__pycache__/crypto_bucket.cpython-38.pyc
  32. 二進制
      osssdk/__pycache__/defaults.cpython-38.pyc
  33. 二進制
      osssdk/__pycache__/exceptions.cpython-38.pyc
  34. 二進制
      osssdk/__pycache__/headers.cpython-38.pyc
  35. 二進制
      osssdk/__pycache__/http.cpython-38.pyc
  36. 二進制
      osssdk/__pycache__/iterators.cpython-38.pyc
  37. 二進制
      osssdk/__pycache__/models.cpython-38.pyc
  38. 二進制
      osssdk/__pycache__/resumable.cpython-38.pyc
  39. 二進制
      osssdk/__pycache__/select_params.cpython-38.pyc
  40. 二進制
      osssdk/__pycache__/select_response.cpython-38.pyc
  41. 二進制
      osssdk/__pycache__/task_queue.cpython-38.pyc
  42. 二進制
      osssdk/__pycache__/utils.cpython-38.pyc
  43. 二進制
      osssdk/__pycache__/xml_utils.cpython-38.pyc
  44. 二進制
      router/__pycache__/__init__.cpython-38.pyc
  45. 二進制
      router/__pycache__/easy_rtmp_router.cpython-38.pyc
  46. 二進制
      router/__pycache__/media_file_router.cpython-38.pyc
  47. +1
    -0
      router/easy_rtmp_router.py
  48. +2
    -0
      service/MqttDisService.py
  49. 二進制
      service/__pycache__/HttpDisService.cpython-38.pyc
  50. 二進制
      service/__pycache__/MqttDisService.cpython-38.pyc
  51. 二進制
      service/__pycache__/__init__.cpython-38.pyc
  52. +5
    -4
      util/MqttUtil.py
  53. 二進制
      util/__pycache__/AliyunUtil.cpython-38.pyc
  54. 二進制
      util/__pycache__/FileUtil.cpython-38.pyc
  55. 二進制
      util/__pycache__/ImageUtil.cpython-38.pyc
  56. 二進制
      util/__pycache__/LogUtils.cpython-38.pyc
  57. 二進制
      util/__pycache__/MqttUtil.cpython-38.pyc
  58. 二進制
      util/__pycache__/QueUtil.cpython-38.pyc
  59. 二進制
      util/__pycache__/RWUtils.cpython-38.pyc
  60. 二進制
      util/__pycache__/RequestUtil.cpython-38.pyc
  61. 二進制
      util/__pycache__/ThreadUtil.cpython-38.pyc
  62. 二進制
      util/__pycache__/TimeUtils.cpython-38.pyc
  63. 二進制
      util/__pycache__/VideoUtil.cpython-38.pyc
  64. 二進制
      util/__pycache__/__init__.cpython-38.pyc
  65. 二進制
      vodsdk/__pycache__/AliyunVodUploader.cpython-38.pyc
  66. 二進制
      vodsdk/__pycache__/AliyunVodUtils.cpython-38.pyc
  67. 二進制
      vodsdk/__pycache__/UploadVideoRequest.cpython-38.pyc
  68. 二進制
      vodsdk/__pycache__/__init__.cpython-38.pyc

二進制
bean/__pycache__/Feedback.cpython-38.pyc 查看文件


二進制
bean/__pycache__/File.cpython-38.pyc 查看文件


二進制
bean/__pycache__/Result.cpython-38.pyc 查看文件


二進制
bean/__pycache__/__init__.cpython-38.pyc 查看文件


二進制
common/__pycache__/Constant.cpython-38.pyc 查看文件


二進制
common/__pycache__/__init__.cpython-38.pyc 查看文件


二進制
concurrency/__pycache__/__init__.cpython-38.pyc 查看文件


+ 16
- 8
concurrency/http/HttpUploadFileProcess.py 查看文件

@@ -319,23 +319,31 @@ class HttpUploadFileProcess(Process):
sleep(1)
except ServiceException as s:
ex = s.code, s.msg
it.clear_work_queue()
vt.clear_work_queue()
if it:
it.clear_work_queue()
if vt:
vt.clear_work_queue()
# 停止所有任务
self.stop_all_task(imageList, imageTask, videoList, videoTask)
it.shutdown()
vt.shutdown()
if it:
it.shutdown()
if vt:
vt.shutdown()
self.stop_change_status(imageList, imageTask, videoList, videoTask, deleteImageList, deleteVideoList)
logger.error("上传文件任务异常失败: {}, requestId:{}", s.msg, requestId)
except Exception:
ex = UploadStrExceptionType.SERVICE_INNER_EXCEPTION.value[0], \
UploadStrExceptionType.SERVICE_INNER_EXCEPTION.value[1]
it.clear_work_queue()
vt.clear_work_queue()
if it:
it.clear_work_queue()
if vt:
vt.clear_work_queue()
# 停止所有任务
self.stop_all_task(imageList, imageTask, videoList, videoTask)
it.shutdown()
vt.shutdown()
if it:
it.shutdown()
if vt:
vt.shutdown()
self.stop_change_status(imageList, imageTask, videoList, videoTask, deleteImageList, deleteVideoList)
logger.error("上传文件任务异常失败: {}, requestId:{}", format_exc(), requestId)
finally:

二進制
concurrency/http/__pycache__/HttpFeedbackThread.cpython-38.pyc 查看文件


二進制
concurrency/http/__pycache__/HttpServiceImpl.cpython-38.pyc 查看文件


二進制
concurrency/http/__pycache__/HttpUploadFileProcess.cpython-38.pyc 查看文件


二進制
concurrency/http/__pycache__/__init__.cpython-38.pyc 查看文件


+ 16
- 8
concurrency/mqtt/MqttUploadFileProcess.py 查看文件

@@ -322,23 +322,31 @@ class MqttUploadFileProcess(Process):
sleep(1)
except ServiceException as s:
ex = s.code, s.msg
it.clear_work_queue()
vt.clear_work_queue()
if it:
it.clear_work_queue()
if vt:
vt.clear_work_queue()
# 停止所有任务
self.stop_all_task(imageList, imageTask, videoList, videoTask)
it.shutdown()
vt.shutdown()
if it:
it.shutdown()
if vt:
vt.shutdown()
self.stop_change_status(imageList, imageTask, videoList, videoTask, deleteImageList, deleteVideoList)
logger.error("上传文件任务异常失败: {}, requestId:{}", s.msg, requestId)
except Exception:
ex = UploadStrExceptionType.SERVICE_INNER_EXCEPTION.value[0], \
UploadStrExceptionType.SERVICE_INNER_EXCEPTION.value[1]
it.clear_work_queue()
vt.clear_work_queue()
if it:
it.clear_work_queue()
if vt:
vt.clear_work_queue()
# 停止所有任务
self.stop_all_task(imageList, imageTask, videoList, videoTask)
it.shutdown()
vt.shutdown()
if it:
it.shutdown()
if vt:
vt.shutdown()
self.stop_change_status(imageList, imageTask, videoList, videoTask, deleteImageList, deleteVideoList)
logger.error("上传文件任务异常失败: {}, requestId:{}", format_exc(), requestId)
finally:

二進制
concurrency/mqtt/__pycache__/MqttFeedbackThread.cpython-38.pyc 查看文件


二進制
concurrency/mqtt/__pycache__/MqttUploadFileProcess.cpython-38.pyc 查看文件


二進制
concurrency/mqtt/__pycache__/__init__.cpython-38.pyc 查看文件


+ 7
- 5
config/mqtt.yml 查看文件

@@ -1,6 +1,8 @@
mqtt:
# mqtt客户端id对应每个机场平台的编码
client_id: "THOBS@0000THJSQ232003"
client_id: "THOBS@0000THJSQ232004"
# 机场平台编号
airport_code: "0000THJSQ232004"
# mqtt用户(根据对接环境修改)
username: "admin"
# mqtt密码(根据对接环境修改)
@@ -13,13 +15,13 @@ mqtt:
keepalive: 60
topic:
upload:
# 文件上传订阅topic(不修改)
# 文件上传订阅topic(不修改) %s代码会自动替换为airport_code
sub_topic: "/v1/%s/media/upload"
# 文件上传响应topic(不修改)
# 文件上传响应topic(不修改)%s代码会自动替换为airport_code
res_topic: "/v1/%s/media/result"
easy_rtmp_live:
# EasyRtmpLive启动停止订阅topic(不修改)
# EasyRtmpLive启动停止订阅topic(不修改) %s代码会自动替换为airport_code
sub_topic: "/v1/%s/rtmp/live"
# EasyRtmpLive响应topic(不修改)
# EasyRtmpLive响应topic(不修改) %s代码会自动替换为airport_code
res_topic: "/v1/%s/rtmp/result"


二進制
enums/__pycache__/ExceptionEnum.cpython-38.pyc 查看文件


二進制
enums/__pycache__/HttpExceptionEnum.cpython-38.pyc 查看文件


二進制
enums/__pycache__/StatusEnum.cpython-38.pyc 查看文件


二進制
enums/__pycache__/__init__.cpython-38.pyc 查看文件


二進制
exception/__pycache__/CustomerException.cpython-38.pyc 查看文件


二進制
exception/__pycache__/__init__.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/__init__.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/api.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/auth.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/compat.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/crc64_combine.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/credentials.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/crypto.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/crypto_bucket.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/defaults.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/exceptions.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/headers.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/http.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/iterators.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/models.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/resumable.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/select_params.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/select_response.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/task_queue.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/utils.cpython-38.pyc 查看文件


二進制
osssdk/__pycache__/xml_utils.cpython-38.pyc 查看文件


二進制
router/__pycache__/__init__.cpython-38.pyc 查看文件


二進制
router/__pycache__/easy_rtmp_router.cpython-38.pyc 查看文件


二進制
router/__pycache__/media_file_router.cpython-38.pyc 查看文件


+ 1
- 0
router/easy_rtmp_router.py 查看文件

@@ -100,6 +100,7 @@ async def stopPushStream():
channel = channelList[0]
if channel["enable"] == "false":
logger.info("EasyRtmpLive任务已停止")
return JsonResult.success()
channel["enable"] = "false"
channel["srcURL"] = '"%s"' % channel["srcURL"]
req_param = 'indexCode=%s&name=%s&srcURL=%s&connectType=%s&timeout=5&mediaType=%s&dstURL=%s&dstFormat=%s&enable=%s' % \

+ 2
- 0
service/MqttDisService.py 查看文件

@@ -142,6 +142,8 @@ def handle_rtmp(msg, task, fb_queue, service_config):
if 'stop' == command:
if channel["enable"] == "false":
logger.info("EasyRtmpLive任务已停止!")
rtmp_result(fb_queue, 0, "操作成功!")
return
channel["enable"] = "false"
channel["srcURL"] = '"%s"' % channel["srcURL"]
req_param = 'indexCode=%s&name=%s&srcURL=%s&connectType=%s&timeout=5&mediaType=%s&dstURL=%s&dstFormat=%s&enable=%s' % \

二進制
service/__pycache__/HttpDisService.cpython-38.pyc 查看文件


二進制
service/__pycache__/MqttDisService.cpython-38.pyc 查看文件


二進制
service/__pycache__/__init__.cpython-38.pyc 查看文件


+ 5
- 4
util/MqttUtil.py 查看文件

@@ -20,8 +20,8 @@ class MqttClient:
self.client = None
self.config = getConfigs(base_dir, "config/mqtt.yml")
self.res_topic = {
"upload": self.config["topic"]["upload"]["res_topic"] % self.config["mqtt"]["client_id"],
"rtmp": self.config["topic"]["easy_rtmp_live"]["res_topic"] % self.config["mqtt"]["client_id"]
"upload": self.config["topic"]["upload"]["res_topic"] % self.config["mqtt"]["airport_code"],
"rtmp": self.config["topic"]["easy_rtmp_live"]["res_topic"] % self.config["mqtt"]["airport_code"]
}
self.msg_queue = msg_queue
self.fb_queue = fb_queue
@@ -30,6 +30,7 @@ class MqttClient:
if self.client is None:
try:
client_id = self.config["mqtt"]["client_id"]
airport_code = self.config["mqtt"]["airport_code"]
self.client = mqtt.Client(client_id=client_id, clean_session=True)
# self.client.enable_logger(logger=logging)
self.client.disable_logger()
@@ -38,8 +39,8 @@ class MqttClient:
self.client.on_message = self.on_message
# self.client.on_disconnect = self.on_disconnect
# self.client.on_log = self.on_log
upload_topic = self.config["topic"]["upload"]["sub_topic"] % client_id
rtmp_topic = self.config["topic"]["easy_rtmp_live"]["sub_topic"] % client_id
upload_topic = self.config["topic"]["upload"]["sub_topic"] % airport_code
rtmp_topic = self.config["topic"]["easy_rtmp_live"]["sub_topic"] % airport_code
self.client.user_data_set({
"sub_upload_topic": upload_topic,
"sub_rtmp_topic": rtmp_topic,

二進制
util/__pycache__/AliyunUtil.cpython-38.pyc 查看文件


二進制
util/__pycache__/FileUtil.cpython-38.pyc 查看文件


二進制
util/__pycache__/ImageUtil.cpython-38.pyc 查看文件


二進制
util/__pycache__/LogUtils.cpython-38.pyc 查看文件


二進制
util/__pycache__/MqttUtil.cpython-38.pyc 查看文件


二進制
util/__pycache__/QueUtil.cpython-38.pyc 查看文件


二進制
util/__pycache__/RWUtils.cpython-38.pyc 查看文件


二進制
util/__pycache__/RequestUtil.cpython-38.pyc 查看文件


二進制
util/__pycache__/ThreadUtil.cpython-38.pyc 查看文件


二進制
util/__pycache__/TimeUtils.cpython-38.pyc 查看文件


二進制
util/__pycache__/VideoUtil.cpython-38.pyc 查看文件


二進制
util/__pycache__/__init__.cpython-38.pyc 查看文件


二進制
vodsdk/__pycache__/AliyunVodUploader.cpython-38.pyc 查看文件


二進制
vodsdk/__pycache__/AliyunVodUtils.cpython-38.pyc 查看文件


二進制
vodsdk/__pycache__/UploadVideoRequest.cpython-38.pyc 查看文件


二進制
vodsdk/__pycache__/__init__.cpython-38.pyc 查看文件


Loading…
取消
儲存