| | |
| | |
|
| | | import java.io.ByteArrayInputStream;
|
| | | import java.text.ParseException;
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.util.*;
|
| | |
|
| | | import javax.sip.address.SipURI;
|
| | |
| | | |
| | | import java.util.*; |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | @Component |
| | | public class ZLMMediaListManager { |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.genersoft.iot.vmp.conf.MediaConfig; |
| | | import okhttp3.*; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.*; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | /** |
| | | * 处理onvif的各种操作 |
| | | */ |
| | |
| | | */ |
| | | @ApiOperation("移除国标关联") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true , |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true, |
| | | dataTypeClass = GbStreamParam.class), |
| | | }) |
| | | @DeleteMapping(value = "/del") |
| | |
| | | */ |
| | | @ApiOperation("保存国标关联") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true , dataTypeClass = GbStreamParam.class), |
| | | @ApiImplicitParam(name = "gbStreamParam", value = "GbStreamParam", required = true, dataTypeClass = GbStreamParam.class), |
| | | }) |
| | | @PostMapping(value = "/add") |
| | | @ResponseBody |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | |
| | | @RestController |
| | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/**/**/**", produces = "application/json;charset=UTF-8") |
| | | public Object proxy(HttpServletRequest request, HttpServletResponse response){ |
| | | public Object proxy(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException{ |
| | | |
| | | |
| | | String baseRequestURI = request.getRequestURI(); |
| | |
| | | mediaInfo.getSdpIp(), |
| | | mediaConfig.getRecordAssistPort(), |
| | | baseRequestURI.substring(baseRequestURI.indexOf(mediaId) + mediaId.length()), |
| | | URLDecoder.decode(request.getQueryString()) |
| | | URLDecoder.decode(request.getQueryString(), "UTF-8") |
| | | ); |
| | | // 发送请求 |
| | | RestTemplate restTemplate = new RestTemplate(); |