| | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.genersoft.iot.vmp.common.CommonCallback; |
| | | import com.genersoft.iot.vmp.common.VideoManagerConstants; |
| | | import com.genersoft.iot.vmp.conf.DynamicTask; |
| | |
| | | * 媒体服务器节点管理 |
| | | */ |
| | | @Service |
| | | @DS("master") |
| | | public class MediaServerServiceImpl implements IMediaServerService { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(MediaServerServiceImpl.class); |
| | |
| | | |
| | | @Override |
| | | public MediaServerItem getDefaultMediaServer() { |
| | | |
| | | return mediaServerMapper.queryDefault(); |
| | | } |
| | | |
| | |
| | | param.put("rtp_proxy.port_range", mediaServerItem.getRtpPortRange().replace(",", "-")); |
| | | } |
| | | |
| | | if (mediaServerItem.getRecordPath() != null) { |
| | | if (!ObjectUtils.isEmpty(mediaServerItem.getRecordPath())) { |
| | | File recordPathFile = new File(mediaServerItem.getRecordPath()); |
| | | param.put("protocol.mp4_save_path", recordPathFile.getParentFile().getPath()); |
| | | param.put("protocol.downloadRoot", recordPathFile.getParentFile().getPath()); |