| | |
| | | */ |
| | | package org.springblade.jfpt.rvideo.controller; |
| | | |
| | | import io.minio.MinioClient; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import jodd.util.StringPool; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | import net.logstash.logback.encoder.org.apache.commons.lang3.StringEscapeUtils; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.jfpt.alarm.service.IAlarmService; |
| | | import org.springblade.jfpt.xlfeedback.service.IXlfeedbackService; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private static Thread thread; |
| | | private static String UUIDs; |
| | | private static String uids; |
| | | private static int count=0; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | @PostMapping("/rVoids") |
| | | public void rVoids(String url,String uid) { |
| | | String UUID = DateUtil.time(); |
| | | uids=uid; |
| | | UUIDs=UUID; |
| | | uids=uid; |
| | | RecordVideoThread recordVideoThread = new RecordVideoThread(); |
| | | recordVideoThread.filePath = "D:\\software\\minio\\data\\jfpt\\void\\"+UUID + ".mp4"; |
| | | recordVideoThread.timesSec = 0L; |
| | |
| | | thread = new Thread(recordVideoThread); |
| | | thread.start(); |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/stop") |
| | | public String stop(String jid) throws FrameGrabber.Exception { |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | // /** |
| | | // * Javacv录制视频测试 |
| | | // */ |
| | | // @PostMapping("/cs") |
| | | // public void rVoids(String url,String uid) { |
| | | // String UUID = DateUtil.time(); |
| | | // UUIDs=UUID; |
| | | // String newJson = StringEscapeUtils.unescapeHtml4(url); |
| | | // RecordVideoThread recordVideoThread = new RecordVideoThread(newJson,"D:\\software\\minio\\data\\jfpt\\void\\"+UUID +".mp4"); |
| | | // thread = new Thread(recordVideoThread); |
| | | // thread.start(); |
| | | // } |
| | | // |
| | | // @PostMapping("/csc") |
| | | // public String stopcs(String jid) throws FrameGrabber.Exception { |
| | | // //返回前端路径 |
| | | // String vaddress = null; |
| | | // // 发出中断标志 true |
| | | // thread.interrupt(); |
| | | // //返回路径 |
| | | // vaddress = "https://web.byisf.com/" + PRF_MINIO_URL + UUIDs + ".mp4"; |
| | | // //把路径通过警情id添加到警情信息 |
| | | // String uids=Integer.toString(count); |
| | | // alarmService.updateVaddress(vaddress,uids,jid); |
| | | // return vaddress; |
| | | // |
| | | // } |
| | | |
| | | |
| | | |
| | | } |