| | |
| | | @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; |
| | | } |
| | |
| | | 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"; |
| | | } |
| | | |