完善支持语音对讲talk

This commit is contained in:
648540858
2023-02-19 12:46:53 +08:00
parent a209d17390
commit 663130df45
26 changed files with 457 additions and 341 deletions

View File

@@ -1,43 +1,96 @@
package com.genersoft.iot.vmp.vmanager.bean;
import com.genersoft.iot.vmp.common.StreamInfo;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema(description = "流信息")
public class StreamContent {
@Schema(description = "应用名")
private String app;
@Schema(description = "流ID")
private String stream;
@Schema(description = "IP")
private String ip;
@Schema(description = "HTTP-FLV流地址")
private String flv;
@Schema(description = "HTTPS-FLV流地址")
private String https_flv;
@Schema(description = "Websocket-FLV流地址")
private String ws_flv;
@Schema(description = "Websockets-FLV流地址")
private String wss_flv;
@Schema(description = "HTTP-FMP4流地址")
private String fmp4;
@Schema(description = "HTTPS-FMP4流地址")
private String https_fmp4;
@Schema(description = "Websocket-FMP4流地址")
private String ws_fmp4;
@Schema(description = "Websockets-FMP4流地址")
private String wss_fmp4;
@Schema(description = "HLS流地址")
private String hls;
@Schema(description = "HTTPS-HLS流地址")
private String https_hls;
@Schema(description = "Websocket-HLS流地址")
private String ws_hls;
@Schema(description = "Websockets-HLS流地址")
private String wss_hls;
@Schema(description = "HTTP-TS流地址")
private String ts;
@Schema(description = "HTTPS-TS流地址")
private String https_ts;
@Schema(description = "Websocket-TS流地址")
private String ws_ts;
@Schema(description = "Websockets-TS流地址")
private String wss_ts;
@Schema(description = "RTMP流地址")
private String rtmp;
@Schema(description = "RTMPS流地址")
private String rtmps;
@Schema(description = "RTSP流地址")
private String rtsp;
@Schema(description = "RTSPS流地址")
private String rtsps;
@Schema(description = "RTC流地址")
private String rtc;
@Schema(description = "RTCS流地址")
private String rtcs;
@Schema(description = "流媒体ID")
private String mediaServerId;
@Schema(description = "流编码信息")
private Object tracks;
@Schema(description = "开始时间")
private String startTime;
@Schema(description = "结束时间")
private String endTime;
private double progress;

View File

@@ -19,11 +19,7 @@ import com.genersoft.iot.vmp.service.IMediaService;
import com.genersoft.iot.vmp.service.IPlayService;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
import com.genersoft.iot.vmp.vmanager.bean.DeferredResultEx;
import com.genersoft.iot.vmp.vmanager.bean.AudioBroadcastResult;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import com.genersoft.iot.vmp.vmanager.bean.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -269,14 +265,6 @@ public class PlayController {
}
@GetMapping("/1111")
public void broadcastApi1() {
MediaServerItem defaultMediaServer = mediaServerService.getMediaServerForMinimumLoad(null);
Device device = storager.queryVideoDevice("34020000001320090001");
playService.talk(defaultMediaServer, device, "34020000001370000001", null, null, null);
}
@Operation(summary = "停止语音广播")
@Parameter(name = "deviceId", description = "设备Id", required = true)
@@ -289,7 +277,7 @@ public class PlayController {
}
// try {
// playService.stopAudioBroadcast(deviceId, channelId);
// } catch (InvalidArgumentException | ParseException | SsrcTransactionNotFoundException | SipException e) {
// } catch (InvalidArgumentException | ParseException | SipException e) {
// logger.error("[命令发送失败] 停止语音: {}", e.getMessage());
// throw new ControllerException(ErrorCode.ERROR100.getCode(), "命令发送失败: " + e.getMessage());
// }

View File

@@ -4,6 +4,6 @@ package com.genersoft.iot.vmp.vmanager.gb28181.play.bean;
/**
* @author lin
*/
public interface AudioBroadcastEvent {
public interface AudioEvent {
void call(String msg);
}