| | |
| | | |
| | | 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); |
| | |
| | | |
| | | 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; |
| | | } |
| | | } |