| | |
| | | } |
| | | hCNetSDK.NET_DVR_StopRealPlay(info.getLRealHandle()); |
| | | log.info("录像停止"); |
| | | //存入minio |
| | | String BucketName = cmd.getRecordBucketName(); |
| | | String ObjectName = cmd.getRecordObjectName(); |
| | | String ContentType = "video/MP4"; |
| | | FileInputStream stream = new FileInputStream(info.getRecordPath()); |
| | | boolean b = MinioUtils.uploadObject(BucketName, ObjectName, stream, stream.available(), ContentType); |
| | | if (b) { |
| | | log.info("上传文件成功!" + MinioClientSingleton.domainUrl + "/"+ BucketName + "/" + ObjectName); |
| | | GlobalVariable.user_real_Map.remove(userId); |
| | | if(cmd.isUploadMinio()) { |
| | | //存入minio |
| | | String BucketName = cmd.getRecordBucketName(); |
| | | String ObjectName = cmd.getRecordObjectName(); |
| | | String ContentType = "video/MP4"; |
| | | FileInputStream stream = new FileInputStream(info.getRecordPath()); |
| | | boolean b = MinioUtils.uploadObject(BucketName, ObjectName, stream, stream.available(), ContentType); |
| | | if (b) { |
| | | log.info("上传文件成功!" + MinioClientSingleton.domainUrl + "/" + BucketName + "/" + ObjectName); |
| | | GlobalVariable.user_real_Map.remove(userId); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception ex) { |