|
|
@@ -1,6 +1,5 @@
|
|
|
package com.zhiqiyun.open.router.apis;
|
|
|
|
|
|
-import cn.hutool.crypto.SecureUtil;
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
@@ -10,8 +9,6 @@ import com.dliyun.oap.framework.annotation.ServiceMethodBean;
|
|
|
import com.dliyun.oap.framework.response.OapResponse;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.zhiqiyun.open.camera.config.CameraConfig;
|
|
|
-import com.zhiqiyun.open.camera.rtsp.RtspPushSrs;
|
|
|
-import com.zhiqiyun.open.camera.rtsp.RtspTransfer;
|
|
|
import com.zhiqiyun.open.core.models.hwVideo.DeviceList;
|
|
|
import com.zhiqiyun.open.core.video.VideoDockingService;
|
|
|
import com.zhiqiyun.open.core.video.VideoDockingUrbanService;
|
|
|
@@ -25,7 +22,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
-import java.net.URLDecoder;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
@@ -85,6 +81,7 @@ public class HwVideoApi {
|
|
|
String rtspId = request.getCameraCode().split("#")[0];
|
|
|
String body = HttpRequest.get(SRS_API + "/api/v1/srs/push")
|
|
|
.form("rtspId", rtspId)
|
|
|
+ .form("ip", request.getIp())
|
|
|
.form("rtspUri", URLEncoder.encode(rtspUri, "utf-8"))
|
|
|
.execute().body();
|
|
|
log.info("推流返回信息:{}", body);
|
|
|
@@ -156,6 +153,7 @@ public class HwVideoApi {
|
|
|
log.info("============停止推流=======================:{}", JSONUtil.toJsonStr(request));
|
|
|
String body = HttpRequest.get(SRS_API + "/api/v1/srs/stop")
|
|
|
.form("rtspId", request.getRtspId())
|
|
|
+ .form("ip", request.getIp())
|
|
|
.execute().body();
|
|
|
log.info("============停止推流=======================:{}", body);
|
|
|
// RtspTransfer.removeRtsp(request.getRtspId());
|