648540858
2022-06-03 19a52a20f358b22211dde9da9d25b65c9cbaddcf
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
@@ -188,8 +188,8 @@
               startTime = startTimeFiled.getStartTime();
               stopTime = startTimeFiled.getStopTime();
               start = Instant.ofEpochMilli(startTime*1000);
               end = Instant.ofEpochMilli(stopTime*1000);
               start = Instant.ofEpochSecond(startTime);
               end = Instant.ofEpochSecond(stopTime);
            }
            //  获取支持的格式
            Vector mediaDescriptions = sdp.getMediaDescriptions(true);
@@ -235,7 +235,7 @@
            String username = sdp.getOrigin().getUsername();
            String addressStr = sdp.getOrigin().getAddress();
            logger.info("[上级点播]用户:{}, 地址:{}:{}, ssrc:{}", username, addressStr, port, ssrc);
            logger.info("[上级点播]用户:{}, 通道:{}, 地址:{}:{}, ssrc:{}", username, channelId, addressStr, port, ssrc);
            Device device  = null;
            // 通过 channel 和 gbStream 是否为null 值判断来源是直播流合适国标
            if (channel != null) {
@@ -372,11 +372,12 @@
                     if (mediaServerItem.isRtpEnable()) {
                        streamId = String.format("%s_%s", device.getDeviceId(), channelId);
                     }
                     SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, true, false);
                     SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, device.isSsrcCheck(), false);
                     sendRtpItem.setStreamId(ssrcInfo.getStream());
                     // 写入redis, 超时时回复
                     redisCatchStorage.updateSendRTPSever(sendRtpItem);
                     playService.play(mediaServerItem, ssrcInfo, device, channelId, hookEvent, errorEvent, (code, msg)->{
                        logger.info("[上级点播]超时, 用户:{}, 通道:{}", username, channelId);
                        redisCatchStorage.deleteSendRTPServer(platform.getServerGBId(), channelId, callIdHeader.getCallId(), null);
                     }, null);
                  }else {