添加日志
This commit is contained in:
parent
726664955c
commit
dea3b1343f
5
pom.xml
5
pom.xml
|
|
@ -46,6 +46,11 @@
|
||||||
<artifactId>minio</artifactId>
|
<artifactId>minio</artifactId>
|
||||||
<version>3.0.10</version>
|
<version>3.0.10</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.fastjson2</groupId>
|
||||||
|
<artifactId>fastjson2</artifactId>
|
||||||
|
<version>2.0.53</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.tuoheng.steam.controller;
|
package com.tuoheng.steam.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.google.api.client.json.Json;
|
||||||
import com.tuoheng.steam.controller.dto.Response;
|
import com.tuoheng.steam.controller.dto.Response;
|
||||||
import com.tuoheng.steam.dos.StreamTask;
|
import com.tuoheng.steam.dos.StreamTask;
|
||||||
import com.tuoheng.steam.service.ITaskService;
|
import com.tuoheng.steam.service.ITaskService;
|
||||||
|
|
@ -23,22 +25,29 @@ public class StreamRecordController {
|
||||||
|
|
||||||
@GetMapping("start")
|
@GetMapping("start")
|
||||||
public Response<StreamTask> startRecording(@RequestParam String streamUrl) {
|
public Response<StreamTask> startRecording(@RequestParam String streamUrl) {
|
||||||
|
System.out.println("启动录制 :"+streamUrl);
|
||||||
Response<StreamTask> response = Response.success(taskService.startTask(streamUrl));
|
Response<StreamTask> response = Response.success(taskService.startTask(streamUrl));
|
||||||
|
System.out.println("启动录制返回 :"+ JSON.toJSONString(response));
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("stop")
|
@GetMapping("stop")
|
||||||
public Response<StreamTask> stopRecording(@RequestParam String streamUrl){
|
public Response<StreamTask> stopRecording(@RequestParam String streamUrl){
|
||||||
|
System.out.println("关闭录制 :"+streamUrl);
|
||||||
Response<StreamTask> response = Response.success(taskService.stopTask(streamUrl));
|
Response<StreamTask> response = Response.success(taskService.stopTask(streamUrl));
|
||||||
if(Objects.isNull(response.getData().getOutFileName()) || response.getData().getOutFileName().isEmpty()){
|
if(Objects.isNull(response.getData().getOutFileName()) || response.getData().getOutFileName().isEmpty()){
|
||||||
response.setCode(500);
|
response.setCode(500);
|
||||||
}
|
}
|
||||||
|
System.out.println("关闭录制返回 :"+ JSON.toJSONString(response));
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("info")
|
@GetMapping("info")
|
||||||
public Response<StreamTask> getLastTask(@RequestParam String streamUrl){
|
public Response<StreamTask> getLastTask(@RequestParam String streamUrl){
|
||||||
return Response.success(taskService.getLastTask(streamUrl));
|
System.out.println("查看录制 :"+streamUrl);
|
||||||
|
Response<StreamTask> response = Response.success(taskService.getLastTask(streamUrl));
|
||||||
|
System.out.println("查看录制返回 :"+ JSON.toJSONString(response));
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue