| | |
| | | result.onCompletion(()->{ |
| | | // 点播结束时调用截图接口 |
| | | // TODO 应该在上流时调用更好,结束也可能是错误结束 |
| | | String path = "static/static/snap/"; |
| | | String path = "snap"; |
| | | String fileName = deviceId + "_" + channelId + ".jpg"; |
| | | ResponseEntity responseEntity = (ResponseEntity)result.getResult(); |
| | | if (responseEntity != null && responseEntity.getStatusCode() == HttpStatus.OK) { |
| | |
| | | streamInfo = null; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | if (streamInfo == null) { |
| | |
| | | public StreamInfo onPublishHandler(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId) { |
| | | String streamId = resonse.getString("stream"); |
| | | JSONArray tracks = resonse.getJSONArray("tracks"); |
| | | StreamInfo streamInfo = mediaService.getStreamInfoByAppAndStream(mediaServerItem,"rtp", streamId, tracks); |
| | | StreamInfo streamInfo = mediaService.getStreamInfoByAppAndStream(mediaServerItem,"rtp", streamId, tracks, null); |
| | | streamInfo.setDeviceID(deviceId); |
| | | streamInfo.setChannelId(channelId); |
| | | return streamInfo; |