From ed035b74d95f4d18d110626c8335f4b189125db6 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期三, 28 六月 2023 10:47:33 +0800 Subject: [PATCH] 添加关闭收流发流的接口 --- src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java | 40 ++++++++++++++++++++++++++++++---------- 1 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java index 36ef8ac..c8c1625 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java @@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.VersionInfo; import com.genersoft.iot.vmp.conf.exception.ControllerException; +import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem; import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; import com.genersoft.iot.vmp.service.*; @@ -63,34 +64,53 @@ private IRedisCatchStorage redisCatchStorage; - @GetMapping(value = "/openRtpServer") + @GetMapping(value = "/receive/open") @ResponseBody @Operation(summary = "寮�鍚敹娴佸拰鑾峰彇鍙戞祦淇℃伅") - @Parameter(name = "isSend", description = "鏄惁鍙戦�侊紝false鏃跺悓鏃跺彧寮�鍚敹娴�", required = true) - @Parameter(name = "callId", description = "鏁翠釜杩囩▼鐨勫敮涓�鏍囪瘑", required = true) - @Parameter(name = "ssrc", description = "鏉ユ簮娴佺殑SSRC", required = false) - @Parameter(name = "hasAudio", description = "鏄惁", required = false) + @Parameter(name = "isSend", description = "鏄惁鍙戦�侊紝false鏃跺彧寮�鍚敹娴侊紝 true鍚屾椂杩斿洖鎺ㄦ祦淇℃伅", required = true) + @Parameter(name = "callId", description = "鏁翠釜杩囩▼鐨勫敮涓�鏍囪瘑锛屼负浜嗕笌鍚庣画鎺ュ彛鍏宠仈", required = true) + @Parameter(name = "ssrc", description = "鏉ユ簮娴佺殑SSRC锛屼笉浼犲垯涓嶆牎楠屾潵婧恠src", required = false) @Parameter(name = "stream", description = "褰㈡垚鐨勬祦鐨処D", required = true) @Parameter(name = "tcpMode", description = "鏀舵祦妯″紡锛� 0涓篣DP锛� 1涓篢CP琚姩", required = true) - public void openRtpServer(Boolean isSend, String ssrc, String callId, Boolean hasAudio, String stream, Integer tcpMode) { + @Parameter(name = "callBack", description = "鍥炶皟鍦板潃锛屽鏋滄敹娴佽秴鏃朵細閫氶亾鍥炶皟閫氱煡锛屽洖璋冧负get璇锋眰锛屽弬鏁颁负callId", required = true) + public SendRtpItem openRtpServer(Boolean isSend, String ssrc, String callId, String stream, Integer tcpMode, String callBack) { MediaServerItem mediaServerItem = mediaServerService.getMediaServerForMinimumLoad(null); if (mediaServerItem == null) { throw new ControllerException(ErrorCode.ERROR100.getCode(),"娌℃湁鍙敤鐨凪ediaServer"); } + return null; } - @GetMapping(value = "/sendRTP") + @GetMapping(value = "/receive/close") + @ResponseBody + @Operation(summary = "鍏抽棴鏀舵祦") + @Parameter(name = "stream", description = "娴佺殑ID", required = true) + public void closeRtpServer(String stream) { + + } + + @GetMapping(value = "/send/start") @ResponseBody @Operation(summary = "鍙戦�佹祦") - @Parameter(name = "ssrc", description = "鍙戦�佹祦鐨凷SRC", required = true) @Parameter(name = "ip", description = "鐩爣IP", required = true) @Parameter(name = "port", description = "鐩爣绔彛", required = true) @Parameter(name = "app", description = "寰呭彂閫佸簲鐢ㄥ悕", required = true) @Parameter(name = "stream", description = "寰呭彂閫佹祦Id", required = true) - @Parameter(name = "callId", description = "鏁翠釜杩囩▼鐨勫敮涓�鏍囪瘑", required = true) + @Parameter(name = "callId", description = "鏁翠釜杩囩▼鐨勫敮涓�鏍囪瘑锛屼笉浼犲垯浣跨敤闅忔満绔彛鍙戞祦", required = true) @Parameter(name = "onlyAudio", description = "鏄惁鍙湁闊抽", required = true) - public void sendRTP(String ssrc, String ip, Integer port, String app, String stream, String callId, Boolean onlyAudio) { + @Parameter(name = "streamType", description = "娴佺被鍨嬶紝1涓篹s娴侊紝2涓簆s娴侊紝 榛樿es娴�", required = false) + public void sendRTP(String ssrc, String ip, Integer port, String app, String stream, String callId, Boolean onlyAudio, Integer streamType) { + + } + + + + @GetMapping(value = "/send/stop") + @ResponseBody + @Operation(summary = "鍏抽棴鍙戦�佹祦") + @Parameter(name = "callId", description = "鏁翠釜杩囩▼鐨勫敮涓�鏍囪瘑锛屼笉浼犲垯浣跨敤闅忔満绔彛鍙戞祦", required = true) + public void closeSendRTP(String callId) { } -- Gitblit v1.8.0