This commit is contained in:
parent
785a4cd6d9
commit
70c658ea8c
|
|
@ -34,6 +34,9 @@ public class StreamRecordController {
|
||||||
@Autowired
|
@Autowired
|
||||||
IRecordService iRecordService;
|
IRecordService iRecordService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("start")
|
@GetMapping("start")
|
||||||
public Response<StreamTask> startRecording(@RequestParam String streamUrl) {
|
public Response<StreamTask> startRecording(@RequestParam String streamUrl) {
|
||||||
System.out.println("启动录制 :"+streamUrl);
|
System.out.println("启动录制 :"+streamUrl);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.tuoheng.steam.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController()
|
||||||
|
@RequestMapping("/test")
|
||||||
|
public class TestController {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -72,9 +72,14 @@ public class Scheduler {
|
||||||
public void mergeTask() throws Exception {
|
public void mergeTask() throws Exception {
|
||||||
// File file = new File("/Users/sunpeng/workspace/text.txt");
|
// File file = new File("/Users/sunpeng/workspace/text.txt");
|
||||||
// InputStream inputStream = new FileInputStream(file);
|
// InputStream inputStream = new FileInputStream(file);
|
||||||
|
// try {
|
||||||
// uploadFile2OSS(inputStream,"text.txt",file.length());
|
// uploadFile2OSS(inputStream,"text.txt",file.length());
|
||||||
|
// }catch (Exception e) {
|
||||||
getCredentials();
|
// logger.error(e.getMessage());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// getCredentials();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -143,6 +148,7 @@ public class Scheduler {
|
||||||
|
|
||||||
String contentType = getContentType(fileName.substring(fileName.lastIndexOf("."))); // 获取文件类型
|
String contentType = getContentType(fileName.substring(fileName.lastIndexOf("."))); // 获取文件类型
|
||||||
|
|
||||||
|
try {
|
||||||
minioClient.putObject(
|
minioClient.putObject(
|
||||||
PutObjectArgs.builder()
|
PutObjectArgs.builder()
|
||||||
.bucket(bucketName) // 存储桶名称
|
.bucket(bucketName) // 存储桶名称
|
||||||
|
|
@ -151,6 +157,10 @@ public class Scheduler {
|
||||||
.contentType(contentType) // 文件类型
|
.contentType(contentType) // 文件类型
|
||||||
.build()
|
.build()
|
||||||
);
|
);
|
||||||
|
}catch (Exception e) {
|
||||||
|
logger.error(e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue