648540858
2022-07-19 28b5cc39d0a2d9939f70b4c980a31d9b27fc1e4c
src/main/java/com/genersoft/iot/vmp/vmanager/streamProxy/StreamProxyController.java
@@ -69,8 +69,15 @@
    @ResponseBody
    public WVPResult save(@RequestBody StreamProxyItem param){
        logger.info("添加代理: " + JSONObject.toJSONString(param));
        if (StringUtils.isEmpty(param.getMediaServerId())) param.setMediaServerId("auto");
        if (StringUtils.isEmpty(param.getType())) param.setType("default");
        if (StringUtils.isEmpty(param.getMediaServerId())) {
            param.setMediaServerId("auto");
        }
        if (StringUtils.isEmpty(param.getType())) {
            param.setType("default");
        }
        if (StringUtils.isEmpty(param.getGbId())) {
            param.setGbId(null);
        }
        WVPResult<StreamInfo> result = streamProxyService.save(param);
        return result;
    }
@@ -124,6 +131,9 @@
    public Object start(String app, String stream){
        logger.info("启用代理: " + app + "/" + stream);
        boolean result = streamProxyService.start(app, stream);
        if (!result) {
            logger.info("启用代理失败: " + app + "/" + stream);
        }
        return result?"success":"fail";
    }