1078-优化回放

This commit is contained in:
648540858
2024-05-30 10:29:14 +08:00
parent 74c98c8636
commit 6efff9daf9
2 changed files with 11 additions and 4 deletions

View File

@@ -222,7 +222,7 @@ public class JT1078Controller {
@Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号, 一般为从1开始的数字", required = true)
@Parameter(name = "streamType", description = "0:主码流; 1:子码流", required = true)
@GetMapping("/live/continue")
@GetMapping("/live/switch")
public void changeStreamType(HttpServletRequest request,
@Parameter(required = true) String deviceId,
@Parameter(required = true) String channelId,

View File

@@ -365,9 +365,16 @@ public class jt1078ServiceImpl implements Ijt1078Service {
J9201 j9201 = new J9201();
j9201.setChannel(Integer.parseInt(channelId));
j9201.setIp(mediaServer.getSdpIp());
j9201.setRate(rate);
j9201.setPlaybackType(playbackType);
j9201.setPlaybackSpeed(playbackSpeed);
if (rate != null) {
j9201.setRate(rate);
}
if (playbackType != null) {
j9201.setPlaybackType(playbackType);
}
if (playbackSpeed != null) {
j9201.setPlaybackSpeed(playbackSpeed);
}
j9201.setTcpPort(ssrcInfo.getPort());
j9201.setUdpPort(ssrcInfo.getPort());
j9201.setType(type);