修复语音对讲

This commit is contained in:
648540858
2024-09-11 16:59:52 +08:00
parent 91a8dc59a8
commit e078360928
11 changed files with 194 additions and 180 deletions

View File

@@ -459,6 +459,7 @@ public class DeviceServiceImpl implements IDeviceService {
if (!ObjectUtils.isEmpty(device.getStreamMode())) {
deviceInStore.setStreamMode(device.getStreamMode());
}
deviceInStore.setBroadcastPushAfterAck(device.isBroadcastPushAfterAck());
// 目录订阅相关的信息
if (deviceInStore.getSubscribeCycleForCatalog() != device.getSubscribeCycleForCatalog()) {
if (device.getSubscribeCycleForCatalog() > 0) {

View File

@@ -293,11 +293,13 @@ public class InviteStreamServiceImpl implements IInviteStreamService {
public void call(InviteSessionType type, Integer channelId, String stream, int code, String msg, StreamInfo data) {
String key = buildSubStreamKey(type, channelId, stream);
List<ErrorCallback<StreamInfo>> callbacks = inviteErrorCallbackMap.get(key);
if (callbacks == null) {
if (callbacks == null || callbacks.isEmpty()) {
return;
}
for (ErrorCallback<StreamInfo> callback : callbacks) {
callback.run(code, msg, data);
if (callback != null) {
callback.run(code, msg, data);
}
}
inviteErrorCallbackMap.remove(key);
}

View File

@@ -127,7 +127,7 @@ public class PlayServiceImpl implements IPlayService {
@Async("taskExecutor")
@org.springframework.context.event.EventListener
public void onApplicationEvent(MediaArrivalEvent event) {
if ("broadcast".equals(event.getApp())) {
if ("broadcast".equals(event.getApp()) || "talk".equals(event.getApp())) {
if (event.getStream().indexOf("_") > 0) {
String[] streamArray = event.getStream().split("_");
if (streamArray.length == 2) {