648540858
2024-03-28 1de344674afd6bb35b51b165bbad76dbe6299b7e
src/main/java/com/genersoft/iot/vmp/gb28181/session/AudioBroadcastManager.java
@@ -25,6 +25,7 @@
    public void update(AudioBroadcastCatch audioBroadcastCatch) {
        if (SipUtils.isFrontEnd(audioBroadcastCatch.getDeviceId())) {
            audioBroadcastCatch.setChannelId(audioBroadcastCatch.getDeviceId());
            data.put(audioBroadcastCatch.getDeviceId(), audioBroadcastCatch);
        }else {
            data.put(audioBroadcastCatch.getDeviceId() + audioBroadcastCatch.getChannelId(), audioBroadcastCatch);
@@ -83,4 +84,21 @@
        return audioBroadcastCatch;
    }
    public List<AudioBroadcastCatch> get(String deviceId) {
        List<AudioBroadcastCatch> audioBroadcastCatchList= new ArrayList<>();
        if (SipUtils.isFrontEnd(deviceId)) {
            if (data.get(deviceId) != null) {
                audioBroadcastCatchList.add(data.get(deviceId));
            }
        }else {
            for (String key : data.keySet()) {
                if (key.startsWith(deviceId)) {
                    audioBroadcastCatchList.add(data.get(key));
                }
            }
        }
        return audioBroadcastCatchList;
    }
}