瀏覽代碼

添加rtsp相关字段并调用rtsp服务接口

wyyay 2 年之前
父節點
當前提交
b9f91c1edf
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      src/main/java/com/iden/common/rtsp/RTSPController.java

+ 9 - 0
src/main/java/com/iden/common/rtsp/RTSPController.java

@@ -6,9 +6,12 @@ import com.iden.common.service.IdenCommunityService;
 import com.iden.common.util.HttpUtil;
 import com.iden.common.util.HttpUtil;
 import com.iden.common.util.Result;
 import com.iden.common.util.Result;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
 /**
 /**
@@ -26,6 +29,9 @@ public class RTSPController {
     private IdenCommunityService idenCommunityService;
     private IdenCommunityService idenCommunityService;
 
 
     //启动rtsp服务
     //启动rtsp服务
+    @RequestMapping(value = "startRtspService", method = RequestMethod.GET)
+    @ResponseBody
+    @ApiOperation(value = "启动rtsp服务",notes = "启动rtsp服务")
     public Result<Object> startRtspService(String ip){
     public Result<Object> startRtspService(String ip){
         try{
         try{
             IdenCommunity idenCommunity = idenCommunityService.queryRtspServiceUrl(ip);
             IdenCommunity idenCommunity = idenCommunityService.queryRtspServiceUrl(ip);
@@ -38,6 +44,9 @@ public class RTSPController {
         }
         }
     }
     }
     //停止rtsp服务
     //停止rtsp服务
+    @RequestMapping(value = "stopRtspService", method = RequestMethod.GET)
+    @ResponseBody
+    @ApiOperation(value = "停止rtsp服务",notes = "停止rtsp服务")
     public Result<Object> stopRtspService(String ip){
     public Result<Object> stopRtspService(String ip){
         try{
         try{
            IdenCommunity idenCommunity = idenCommunityService.queryRtspServiceUrl(ip);
            IdenCommunity idenCommunity = idenCommunityService.queryRtspServiceUrl(ip);