648540858
2022-04-26 363606d8453c027429ea66a6036c62b01ff8e06c
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java
@@ -81,11 +81,11 @@
        return result;
    }
    public int createRTPServer(MediaServerItem mediaServerItem, String streamId) {
    public int createRTPServer(MediaServerItem mediaServerItem, String streamId, int ssrc) {
        int result = -1;
        // 查询此rtp server 是否已经存在
        JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaServerItem, streamId);
        if (rtpInfo.getInteger("code ") == 0 && rtpInfo.getBoolean("exist")) {
        if (rtpInfo != null && rtpInfo.getInteger("code") == 0 && rtpInfo.getBoolean("exist")) {
            result = rtpInfo.getInteger("local_port");
            return result;
        }
@@ -94,6 +94,7 @@
        param.put("enable_tcp", 1);
        param.put("stream_id", streamId);
        param.put("port", 0);
        param.put("ssrc", ssrc);
        JSONObject openRtpServerResultJson = zlmresTfulUtils.openRtpServer(mediaServerItem, param);
        if (openRtpServerResultJson != null) {