| | |
| | | resultHolder.invokeResult(msg); |
| | | return playResult; |
| | | } |
| | | Device device = storager.queryVideoDevice(deviceId); |
| | | Device device = redisCatchStorage.getDevice(deviceId); |
| | | StreamInfo streamInfo = redisCatchStorage.queryPlayByDevice(deviceId, channelId); |
| | | playResult.setDevice(device); |
| | | // 超时处理 |
| | |
| | | // 点播结束时调用截图接口 |
| | | try { |
| | | String classPath = ResourceUtils.getURL("classpath:").getPath(); |
| | | // System.out.println(classPath); |
| | | // 兼容打包为jar的class路径 |
| | | if(classPath.contains("jar")) { |
| | | classPath = classPath.substring(0, classPath.lastIndexOf(".")); |
| | |
| | | MediaServerItem mediaInfo = mediaServerService.getOne(streamInfoForSuccess.getMediaServerId()); |
| | | String streamUrl = streamInfoForSuccess.getFmp4(); |
| | | // 请求截图 |
| | | logger.info("[请求截图]: " + fileName); |
| | | zlmresTfulUtils.getSnap(mediaInfo, streamUrl, 15, 1, path, fileName); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void onPublishHandlerForPlay(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId, String uuid) { |
| | | public void onPublishHandlerForPlay(MediaServerItem mediaServerItem, JSONObject response, String deviceId, String channelId, String uuid) { |
| | | RequestMessage msg = new RequestMessage(); |
| | | msg.setId(uuid); |
| | | msg.setKey(DeferredResultHolder.CALLBACK_CMD_PLAY + deviceId + channelId); |
| | | StreamInfo streamInfo = onPublishHandler(mediaServerItem, resonse, deviceId, channelId, uuid); |
| | | StreamInfo streamInfo = onPublishHandler(mediaServerItem, response, deviceId, channelId, uuid); |
| | | if (streamInfo != null) { |
| | | DeviceChannel deviceChannel = storager.queryChannel(deviceId, channelId); |
| | | if (deviceChannel != null) { |