| | |
| | | |
| | | import com.ard.common.core.enums.LiveStreamType; |
| | | import com.ard.qs.api.domain.QsDevice; |
| | | import com.ard.work.api.domian.ArdChannel; |
| | | import com.ard.zlm.api.domain.StreamInfo; |
| | | import com.ard.zlm.service.ErrorCallback; |
| | | import com.ard.zlm.service.IDevicePlayService; |
| | |
| | | public final static String PLAY_SERVICE = "sourceDevicePlayService"; |
| | | |
| | | @Override |
| | | public void play(QsDevice device, Boolean record, ErrorCallback<StreamInfo> callback) { |
| | | log.info("[设备] 播放, 类型: {}", LiveStreamType.getByCode(device.getType())); |
| | | public void play(ArdChannel channel, Boolean record, ErrorCallback<StreamInfo> callback) { |
| | | log.info("[设备] 播放, 类型: {}", LiveStreamType.getByCode(channel.getType())); |
| | | ISourcePlayService sourceChannelPlayService = sourcePlayServiceMap.get(PLAY_SERVICE); |
| | | if (sourceChannelPlayService == null) { |
| | | // 设备数据异常 |
| | | log.error("[点播通用设备] 类型编号: {} 不支持实时流预览", LiveStreamType.getByCode(device.getType())); |
| | | log.error("[点播通用设备] 类型编号: {} 不支持实时流预览", LiveStreamType.getByCode(channel.getType())); |
| | | throw new RuntimeException("Device not supported"); |
| | | } |
| | | sourceChannelPlayService.play(device, record, (code, msg, data) -> { |
| | | sourceChannelPlayService.play(channel, record, (code, msg, data) -> { |
| | | callback.run(code, msg, data); |
| | | }); |
| | | } |