|
@@ -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);
|