648540858
2023-08-01 a4b15e84d7979d56c9f785338c3682a49ba940ff
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
@@ -86,7 +86,10 @@
        }else {
            param.put("port", port);
        }
        param.put("ssrc", ssrc);
        if (ssrc != 0) {
            param.put("ssrc", ssrc);
        }
        JSONObject openRtpServerResultJson = zlmresTfulUtils.openRtpServer(mediaServerItem, param);
        logger.info(JSONObject.toJSONString(openRtpServerResultJson));
        if (openRtpServerResultJson != null) {
@@ -164,7 +167,7 @@
        // 默认为随机端口
        int localPort = 0;
        if (userSetting.getGbSendStreamStrict()) {
            localPort = sendRtpPortManager.getNextPort(serverItem.getId());
            localPort = sendRtpPortManager.getNextPort(serverItem);
            if (localPort == 0) {
                return null;
            }
@@ -200,7 +203,7 @@
        // 默认为随机端口
        int localPort = 0;
        if (userSetting.getGbSendStreamStrict()) {
            localPort = sendRtpPortManager.getNextPort(serverItem.getId());
            localPort = sendRtpPortManager.getNextPort(serverItem);
            if (localPort == 0) {
                return null;
            }
@@ -229,6 +232,13 @@
    }
    /**
     * 调用zlm RESTFUL API —— startSendRtpPassive
     */
    public JSONObject startSendRtpStreamForPassive(MediaServerItem mediaServerItem, Map<String, Object>param) {
        return zlmresTfulUtils.startSendRtpPassive(mediaServerItem, param);
    }
    /**
     * 查询待转推的流是否就绪
     */
    public Boolean isRtpReady(MediaServerItem mediaServerItem, String streamId) {