From 6fcff0567e3a324e82ff35e276b0667ecb3e0907 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期三, 28 六月 2023 09:15:07 +0800 Subject: [PATCH] doc去除cdn依赖 --- src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java | 37 +++++++++++++++++++++++++++++-------- 1 files changed, 29 insertions(+), 8 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 304ccf9..36ef8ac 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 @@ -10,12 +10,14 @@ import com.genersoft.iot.vmp.storager.IRedisCatchStorage; import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.*; - -import java.util.List; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; @SuppressWarnings("rawtypes") @Tag(name = "绗笁鏂规湇鍔″鎺�") @@ -61,16 +63,35 @@ private IRedisCatchStorage redisCatchStorage; - @GetMapping(value = "/send/ready") + @GetMapping(value = "/openRtpServer") @ResponseBody - @Operation(summary = "涓哄彂閫佽棰戞祦鑾峰彇淇℃伅") - public List<MediaServerItem> getMediaServerList(Boolean onlySender, ) { + @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 = "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) { MediaServerItem mediaServerItem = mediaServerService.getMediaServerForMinimumLoad(null); if (mediaServerItem == null) { throw new ControllerException(ErrorCode.ERROR100.getCode(),"娌℃湁鍙敤鐨凪ediaServer"); } - mediaServerService.openRTPServer() - return mediaServerService.getAll(); + } + + @GetMapping(value = "/sendRTP") + @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 = "onlyAudio", description = "鏄惁鍙湁闊抽", required = true) + public void sendRTP(String ssrc, String ip, Integer port, String app, String stream, String callId, Boolean onlyAudio) { + } } -- Gitblit v1.8.0