Commit e4622d17a6cfe348fa39c644f798aac1f8b6069a
1 parent
27b125cf
优化字段名称
Showing
13 changed files
with
46 additions
and
42 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
| ... | ... | @@ -9,7 +9,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.SIPSender; |
| 9 | 9 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; |
| 10 | 10 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.SIPRequestHeaderPlarformProvider; |
| 11 | 11 | import com.genersoft.iot.vmp.gb28181.utils.SipUtils; |
| 12 | -import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; | |
| 12 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 13 | 13 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 14 | 14 | import com.genersoft.iot.vmp.service.IMediaServerService; |
| 15 | 15 | import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; |
| ... | ... | @@ -56,7 +56,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 56 | 56 | private SipSubscribe sipSubscribe; |
| 57 | 57 | |
| 58 | 58 | @Autowired |
| 59 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 59 | + private ZLMServerFactory ZLMServerFactory; | |
| 60 | 60 | |
| 61 | 61 | @Autowired |
| 62 | 62 | private SipLayer sipLayer; |
| ... | ... | @@ -820,7 +820,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 820 | 820 | MediaServerItem mediaServerItem = mediaServerService.getOne(mediaServerId); |
| 821 | 821 | if (mediaServerItem != null) { |
| 822 | 822 | mediaServerService.releaseSsrc(mediaServerItem.getId(), sendRtpItem.getSsrc()); |
| 823 | - zlmrtpServerFactory.closeRtpServer(mediaServerItem, sendRtpItem.getStreamId()); | |
| 823 | + ZLMServerFactory.closeRtpServer(mediaServerItem, sendRtpItem.getStreamId()); | |
| 824 | 824 | } |
| 825 | 825 | SIPRequest byeRequest = headerProviderPlatformProvider.createByeRequest(parentPlatform, sendRtpItem); |
| 826 | 826 | if (byeRequest == null) { | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
| ... | ... | @@ -12,7 +12,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander; |
| 12 | 12 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; |
| 13 | 13 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor; |
| 14 | 14 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 15 | -import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; | |
| 15 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 16 | 16 | import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; |
| 17 | 17 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 18 | 18 | import com.genersoft.iot.vmp.service.IMediaServerService; |
| ... | ... | @@ -67,7 +67,7 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In |
| 67 | 67 | private IVideoManagerStorage storager; |
| 68 | 68 | |
| 69 | 69 | @Autowired |
| 70 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 70 | + private ZLMServerFactory ZLMServerFactory; | |
| 71 | 71 | |
| 72 | 72 | @Autowired |
| 73 | 73 | private ZlmHttpHookSubscribe hookSubscribe; |
| ... | ... | @@ -140,7 +140,7 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In |
| 140 | 140 | startSendRtpStreamHand(evt, sendRtpItem, parentPlatform, jsonObject, param, callIdHeader); |
| 141 | 141 | }); |
| 142 | 142 | }else { |
| 143 | - JSONObject startSendRtpStreamResult = zlmrtpServerFactory.startSendRtpStream(mediaInfo, param); | |
| 143 | + JSONObject startSendRtpStreamResult = ZLMServerFactory.startSendRtpStream(mediaInfo, param); | |
| 144 | 144 | if (startSendRtpStreamResult != null) { |
| 145 | 145 | startSendRtpStreamHand(evt, sendRtpItem, parentPlatform, startSendRtpStreamResult, param, callIdHeader); |
| 146 | 146 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java
| ... | ... | @@ -11,7 +11,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver; |
| 11 | 11 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander; |
| 12 | 12 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor; |
| 13 | 13 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 14 | -import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; | |
| 14 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 15 | 15 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 16 | 16 | import com.genersoft.iot.vmp.service.*; |
| 17 | 17 | import com.genersoft.iot.vmp.service.bean.MessageForPushChannel; |
| ... | ... | @@ -64,7 +64,7 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In |
| 64 | 64 | private IVideoManagerStorage storager; |
| 65 | 65 | |
| 66 | 66 | @Autowired |
| 67 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 67 | + private ZLMServerFactory ZLMServerFactory; | |
| 68 | 68 | |
| 69 | 69 | @Autowired |
| 70 | 70 | private SSRCFactory ssrcFactory; |
| ... | ... | @@ -115,7 +115,7 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In |
| 115 | 115 | MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId()); |
| 116 | 116 | redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), |
| 117 | 117 | callIdHeader.getCallId(), null); |
| 118 | - zlmrtpServerFactory.stopSendRtpStream(mediaInfo, param); | |
| 118 | + ZLMServerFactory.stopSendRtpStream(mediaInfo, param); | |
| 119 | 119 | if (sendRtpItem.getPlayType().equals(InviteStreamType.PUSH)) { |
| 120 | 120 | ParentPlatform platform = platformService.queryPlatformByServerGBId(sendRtpItem.getPlatformId()); |
| 121 | 121 | if (platform != null) { |
| ... | ... | @@ -129,7 +129,7 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In |
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - int totalReaderCount = zlmrtpServerFactory.totalReaderCount(mediaInfo, sendRtpItem.getApp(), streamId); | |
| 132 | + int totalReaderCount = ZLMServerFactory.totalReaderCount(mediaInfo, sendRtpItem.getApp(), streamId); | |
| 133 | 133 | if (totalReaderCount <= 0) { |
| 134 | 134 | logger.info("[收到bye] {} 无其它观看者,通知设备停止推流", streamId); |
| 135 | 135 | if (sendRtpItem.getPlayType().equals(InviteStreamType.PLAY)) { | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
| ... | ... | @@ -12,7 +12,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor |
| 12 | 12 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 13 | 13 | import com.genersoft.iot.vmp.gb28181.utils.SipUtils; |
| 14 | 14 | import com.genersoft.iot.vmp.media.zlm.ZLMMediaListManager; |
| 15 | -import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; | |
| 15 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 16 | 16 | import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; |
| 17 | 17 | import com.genersoft.iot.vmp.media.zlm.dto.*; |
| 18 | 18 | import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam; |
| ... | ... | @@ -91,7 +91,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 91 | 91 | private SIPSender sipSender; |
| 92 | 92 | |
| 93 | 93 | @Autowired |
| 94 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 94 | + private ZLMServerFactory ZLMServerFactory; | |
| 95 | 95 | |
| 96 | 96 | @Autowired |
| 97 | 97 | private IMediaServerService mediaServerService; |
| ... | ... | @@ -345,7 +345,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 345 | 345 | streamTypeStr = "UDP"; |
| 346 | 346 | } |
| 347 | 347 | logger.info("[上级Invite] {}, 平台:{}, 通道:{}, 收流地址:{}:{},收流方式:{}, ssrc:{}", sessionName, username, channelId, addressStr, port, streamTypeStr, ssrc); |
| 348 | - SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId, | |
| 348 | + SendRtpItem sendRtpItem = ZLMServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId, | |
| 349 | 349 | device.getDeviceId(), channelId, mediaTransmissionTCP, platform.isRtcp()); |
| 350 | 350 | |
| 351 | 351 | if (tcpActive != null) { |
| ... | ... | @@ -548,10 +548,10 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 548 | 548 | CallIdHeader callIdHeader, MediaServerItem mediaServerItem, |
| 549 | 549 | int port, Boolean tcpActive, boolean mediaTransmissionTCP, |
| 550 | 550 | String channelId, String addressStr, String ssrc, String requesterId) { |
| 551 | - Boolean streamReady = zlmrtpServerFactory.isStreamReady(mediaServerItem, gbStream.getApp(), gbStream.getStream()); | |
| 551 | + Boolean streamReady = ZLMServerFactory.isStreamReady(mediaServerItem, gbStream.getApp(), gbStream.getStream()); | |
| 552 | 552 | if (streamReady != null && streamReady) { |
| 553 | 553 | // 自平台内容 |
| 554 | - SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId, | |
| 554 | + SendRtpItem sendRtpItem = ZLMServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId, | |
| 555 | 555 | gbStream.getApp(), gbStream.getStream(), channelId, mediaTransmissionTCP, platform.isRtcp()); |
| 556 | 556 | |
| 557 | 557 | if (sendRtpItem == null) { |
| ... | ... | @@ -587,10 +587,10 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 587 | 587 | String channelId, String addressStr, String ssrc, String requesterId) { |
| 588 | 588 | // 推流 |
| 589 | 589 | if (streamPushItem.isSelf()) { |
| 590 | - Boolean streamReady = zlmrtpServerFactory.isStreamReady(mediaServerItem, gbStream.getApp(), gbStream.getStream()); | |
| 590 | + Boolean streamReady = ZLMServerFactory.isStreamReady(mediaServerItem, gbStream.getApp(), gbStream.getStream()); | |
| 591 | 591 | if (streamReady != null && streamReady) { |
| 592 | 592 | // 自平台内容 |
| 593 | - SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId, | |
| 593 | + SendRtpItem sendRtpItem = ZLMServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId, | |
| 594 | 594 | gbStream.getApp(), gbStream.getStream(), channelId, mediaTransmissionTCP, platform.isRtcp()); |
| 595 | 595 | |
| 596 | 596 | if (sendRtpItem == null) { |
| ... | ... | @@ -706,7 +706,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 706 | 706 | mediaListManager.addChannelOnlineEventLister(gbStream.getApp(), gbStream.getStream(), (app, stream, serverId) -> { |
| 707 | 707 | dynamicTask.stop(callIdHeader.getCallId()); |
| 708 | 708 | if (serverId.equals(userSetting.getServerId())) { |
| 709 | - SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, addressStr, finalPort, ssrc, requesterId, | |
| 709 | + SendRtpItem sendRtpItem = ZLMServerFactory.createSendRtpItem(mediaServerItem, addressStr, finalPort, ssrc, requesterId, | |
| 710 | 710 | app, stream, channelId, mediaTransmissionTCP, platform.isRtcp()); |
| 711 | 711 | |
| 712 | 712 | if (sendRtpItem == null) { | ... | ... |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaListManager.java
| ... | ... | @@ -61,7 +61,7 @@ public class ZLMMediaListManager { |
| 61 | 61 | private UserSetting userSetting; |
| 62 | 62 | |
| 63 | 63 | @Autowired |
| 64 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 64 | + private ZLMServerFactory ZLMServerFactory; | |
| 65 | 65 | |
| 66 | 66 | @Autowired |
| 67 | 67 | private IMediaServerService mediaServerService; |
| ... | ... | @@ -97,7 +97,7 @@ public class ZLMMediaListManager { |
| 97 | 97 | public void sendStreamEvent(String app, String stream, String mediaServerId) { |
| 98 | 98 | MediaServerItem mediaServerItem = mediaServerService.getOne(mediaServerId); |
| 99 | 99 | // 查看推流状态 |
| 100 | - Boolean streamReady = zlmrtpServerFactory.isStreamReady(mediaServerItem, app, stream); | |
| 100 | + Boolean streamReady = ZLMServerFactory.isStreamReady(mediaServerItem, app, stream); | |
| 101 | 101 | if (streamReady != null && streamReady) { |
| 102 | 102 | ChannelOnlineEvent channelOnlineEventLister = getChannelOnlineEventLister(app, stream); |
| 103 | 103 | if (channelOnlineEventLister != null) { | ... | ... |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java renamed to src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerFactory.java
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
| ... | ... | @@ -87,7 +87,7 @@ public class MediaServerServiceImpl implements IMediaServerService { |
| 87 | 87 | |
| 88 | 88 | |
| 89 | 89 | @Autowired |
| 90 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 90 | + private ZLMServerFactory ZLMServerFactory; | |
| 91 | 91 | |
| 92 | 92 | @Autowired |
| 93 | 93 | private EventPublisher publisher; |
| ... | ... | @@ -181,7 +181,7 @@ public class MediaServerServiceImpl implements IMediaServerService { |
| 181 | 181 | } |
| 182 | 182 | int rtpServerPort; |
| 183 | 183 | if (mediaServerItem.isRtpEnable()) { |
| 184 | - rtpServerPort = zlmrtpServerFactory.createRTPServer(mediaServerItem, streamId, ssrcCheck?Integer.parseInt(ssrc):0, port, reUsePort, tcpMode); | |
| 184 | + rtpServerPort = ZLMServerFactory.createRTPServer(mediaServerItem, streamId, ssrcCheck?Integer.parseInt(ssrc):0, port, reUsePort, tcpMode); | |
| 185 | 185 | } else { |
| 186 | 186 | rtpServerPort = mediaServerItem.getRtpProxyPort(); |
| 187 | 187 | } |
| ... | ... | @@ -193,7 +193,7 @@ public class MediaServerServiceImpl implements IMediaServerService { |
| 193 | 193 | if (mediaServerItem == null) { |
| 194 | 194 | return; |
| 195 | 195 | } |
| 196 | - zlmrtpServerFactory.closeRtpServer(mediaServerItem, streamId); | |
| 196 | + ZLMServerFactory.closeRtpServer(mediaServerItem, streamId); | |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | @Override |
| ... | ... | @@ -202,7 +202,7 @@ public class MediaServerServiceImpl implements IMediaServerService { |
| 202 | 202 | callback.run(false); |
| 203 | 203 | return; |
| 204 | 204 | } |
| 205 | - zlmrtpServerFactory.closeRtpServer(mediaServerItem, streamId, callback); | |
| 205 | + ZLMServerFactory.closeRtpServer(mediaServerItem, streamId, callback); | |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | @Override |
| ... | ... | @@ -213,7 +213,7 @@ public class MediaServerServiceImpl implements IMediaServerService { |
| 213 | 213 | |
| 214 | 214 | @Override |
| 215 | 215 | public Boolean updateRtpServerSSRC(MediaServerItem mediaServerItem, String streamId, String ssrc) { |
| 216 | - return zlmrtpServerFactory.updateRtpServerSSRC(mediaServerItem, streamId, ssrc); | |
| 216 | + return ZLMServerFactory.updateRtpServerSSRC(mediaServerItem, streamId, ssrc); | |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | @Override | ... | ... |
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java
| ... | ... | @@ -6,7 +6,7 @@ import com.genersoft.iot.vmp.gb28181.bean.*; |
| 6 | 6 | import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; |
| 7 | 7 | import com.genersoft.iot.vmp.gb28181.session.SSRCFactory; |
| 8 | 8 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform; |
| 9 | -import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; | |
| 9 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 10 | 10 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 11 | 11 | import com.genersoft.iot.vmp.service.IMediaServerService; |
| 12 | 12 | import com.genersoft.iot.vmp.service.IPlatformService; |
| ... | ... | @@ -69,7 +69,7 @@ public class PlatformServiceImpl implements IPlatformService { |
| 69 | 69 | private DynamicTask dynamicTask; |
| 70 | 70 | |
| 71 | 71 | @Autowired |
| 72 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 72 | + private ZLMServerFactory ZLMServerFactory; | |
| 73 | 73 | |
| 74 | 74 | @Autowired |
| 75 | 75 | private SubscribeHolder subscribeHolder; |
| ... | ... | @@ -338,7 +338,7 @@ public class PlatformServiceImpl implements IPlatformService { |
| 338 | 338 | param.put("vhost", "__defaultVhost__"); |
| 339 | 339 | param.put("app", sendRtpItem.getApp()); |
| 340 | 340 | param.put("stream", sendRtpItem.getStreamId()); |
| 341 | - zlmrtpServerFactory.stopSendRtpStream(mediaInfo, param); | |
| 341 | + ZLMServerFactory.stopSendRtpStream(mediaInfo, param); | |
| 342 | 342 | } |
| 343 | 343 | } |
| 344 | 344 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
| ... | ... | @@ -19,7 +19,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| 19 | 19 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform; |
| 20 | 20 | import com.genersoft.iot.vmp.media.zlm.AssistRESTfulUtils; |
| 21 | 21 | import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils; |
| 22 | -import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; | |
| 22 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 23 | 23 | import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; |
| 24 | 24 | import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeFactory; |
| 25 | 25 | import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeForStreamChange; |
| ... | ... | @@ -81,7 +81,7 @@ public class PlayServiceImpl implements IPlayService { |
| 81 | 81 | private ZLMRESTfulUtils zlmresTfulUtils; |
| 82 | 82 | |
| 83 | 83 | @Autowired |
| 84 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 84 | + private ZLMServerFactory ZLMServerFactory; | |
| 85 | 85 | |
| 86 | 86 | @Autowired |
| 87 | 87 | private AssistRESTfulUtils assistRESTfulUtils; |
| ... | ... | @@ -142,7 +142,7 @@ public class PlayServiceImpl implements IPlayService { |
| 142 | 142 | String mediaServerId = streamInfo.getMediaServerId(); |
| 143 | 143 | MediaServerItem mediaInfo = mediaServerService.getOne(mediaServerId); |
| 144 | 144 | |
| 145 | - Boolean ready = zlmrtpServerFactory.isStreamReady(mediaInfo, "rtp", streamId); | |
| 145 | + Boolean ready = ZLMServerFactory.isStreamReady(mediaInfo, "rtp", streamId); | |
| 146 | 146 | if (ready != null && ready) { |
| 147 | 147 | callback.run(InviteErrorCode.SUCCESS.getCode(), InviteErrorCode.SUCCESS.getMsg(), streamInfo); |
| 148 | 148 | inviteStreamService.call(InviteSessionType.PLAY, device.getDeviceId(), channelId, null, | ... | ... |
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGbPlayMsgListener.java
| ... | ... | @@ -6,7 +6,7 @@ import com.genersoft.iot.vmp.common.VideoManagerConstants; |
| 6 | 6 | import com.genersoft.iot.vmp.conf.DynamicTask; |
| 7 | 7 | import com.genersoft.iot.vmp.conf.UserSetting; |
| 8 | 8 | import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem; |
| 9 | -import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; | |
| 9 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 10 | 10 | import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; |
| 11 | 11 | import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeFactory; |
| 12 | 12 | import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeForStreamChange; |
| ... | ... | @@ -72,7 +72,7 @@ public class RedisGbPlayMsgListener implements MessageListener { |
| 72 | 72 | private RedisTemplate<Object, Object> redisTemplate; |
| 73 | 73 | |
| 74 | 74 | @Autowired |
| 75 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 75 | + private ZLMServerFactory ZLMServerFactory; | |
| 76 | 76 | |
| 77 | 77 | @Autowired |
| 78 | 78 | private IMediaServerService mediaServerService; |
| ... | ... | @@ -230,7 +230,7 @@ public class RedisGbPlayMsgListener implements MessageListener { |
| 230 | 230 | param.put("pt", requestPushStreamMsg.getPt()); |
| 231 | 231 | param.put("use_ps", requestPushStreamMsg.isPs() ? "1" : "0"); |
| 232 | 232 | param.put("only_audio", requestPushStreamMsg.isOnlyAudio() ? "1" : "0"); |
| 233 | - JSONObject jsonObject = zlmrtpServerFactory.startSendRtpStream(mediaInfo, param); | |
| 233 | + JSONObject jsonObject = ZLMServerFactory.startSendRtpStream(mediaInfo, param); | |
| 234 | 234 | // 回复消息 |
| 235 | 235 | responsePushStream(jsonObject, fromId, serial); |
| 236 | 236 | } |
| ... | ... | @@ -267,7 +267,7 @@ public class RedisGbPlayMsgListener implements MessageListener { |
| 267 | 267 | return; |
| 268 | 268 | } |
| 269 | 269 | // 确定流是否在线 |
| 270 | - Boolean streamReady = zlmrtpServerFactory.isStreamReady(mediaServerItem, content.getApp(), content.getStream()); | |
| 270 | + Boolean streamReady = ZLMServerFactory.isStreamReady(mediaServerItem, content.getApp(), content.getStream()); | |
| 271 | 271 | if (streamReady != null && streamReady) { |
| 272 | 272 | logger.info("[回复推流信息] {}/{}", content.getApp(), content.getStream()); |
| 273 | 273 | responseSendItem(mediaServerItem, content, toId, serial); |
| ... | ... | @@ -311,7 +311,7 @@ public class RedisGbPlayMsgListener implements MessageListener { |
| 311 | 311 | * 将获取到的sendItem发送出去 |
| 312 | 312 | */ |
| 313 | 313 | private void responseSendItem(MediaServerItem mediaServerItem, RequestSendItemMsg content, String toId, String serial) { |
| 314 | - SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, content.getIp(), | |
| 314 | + SendRtpItem sendRtpItem = ZLMServerFactory.createSendRtpItem(mediaServerItem, content.getIp(), | |
| 315 | 315 | content.getPort(), content.getSsrc(), content.getPlatformId(), |
| 316 | 316 | content.getApp(), content.getStream(), content.getChannelId(), |
| 317 | 317 | content.getTcp(), content.getRtcp()); | ... | ... |
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamCloseResponseListener.java
| ... | ... | @@ -6,7 +6,7 @@ import com.genersoft.iot.vmp.gb28181.bean.InviteStreamType; |
| 6 | 6 | import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; |
| 7 | 7 | import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem; |
| 8 | 8 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; |
| 9 | -import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; | |
| 9 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 10 | 10 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 11 | 11 | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; |
| 12 | 12 | import com.genersoft.iot.vmp.service.IMediaServerService; |
| ... | ... | @@ -58,7 +58,7 @@ public class RedisPushStreamCloseResponseListener implements MessageListener { |
| 58 | 58 | private IMediaServerService mediaServerService; |
| 59 | 59 | |
| 60 | 60 | @Autowired |
| 61 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 61 | + private ZLMServerFactory ZLMServerFactory; | |
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | private Map<String, PushStreamResponseEvent> responseEvents = new ConcurrentHashMap<>(); |
| ... | ... | @@ -89,7 +89,7 @@ public class RedisPushStreamCloseResponseListener implements MessageListener { |
| 89 | 89 | logger.info("[REDIS消息-推流结束] 停止向上级推流:{}", streamId); |
| 90 | 90 | MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId()); |
| 91 | 91 | redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), sendRtpItem.getCallId(), sendRtpItem.getStreamId()); |
| 92 | - zlmrtpServerFactory.stopSendRtpStream(mediaInfo, param); | |
| 92 | + ZLMServerFactory.stopSendRtpStream(mediaInfo, param); | |
| 93 | 93 | |
| 94 | 94 | try { |
| 95 | 95 | commanderFroPlatform.streamByeCmd(parentPlatform, sendRtpItem); | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java
| ... | ... | @@ -11,7 +11,7 @@ import com.genersoft.iot.vmp.gb28181.bean.Device; |
| 11 | 11 | import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; |
| 12 | 12 | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| 13 | 13 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| 14 | -import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; | |
| 14 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 15 | 15 | import com.genersoft.iot.vmp.service.IInviteStreamService; |
| 16 | 16 | import com.genersoft.iot.vmp.service.IPlayService; |
| 17 | 17 | import com.genersoft.iot.vmp.service.bean.InviteErrorCode; |
| ... | ... | @@ -54,7 +54,7 @@ public class PlaybackController { |
| 54 | 54 | private SIPCommander cmder; |
| 55 | 55 | |
| 56 | 56 | @Autowired |
| 57 | - private ZLMRTPServerFactory zlmrtpServerFactory; | |
| 57 | + private ZLMServerFactory ZLMServerFactory; | |
| 58 | 58 | |
| 59 | 59 | @Autowired |
| 60 | 60 | private IVideoManagerStorage storager; | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java
| ... | ... | @@ -5,6 +5,7 @@ import com.genersoft.iot.vmp.conf.UserSetting; |
| 5 | 5 | import com.genersoft.iot.vmp.conf.VersionInfo; |
| 6 | 6 | import com.genersoft.iot.vmp.conf.exception.ControllerException; |
| 7 | 7 | import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem; |
| 8 | +import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; | |
| 8 | 9 | import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; |
| 9 | 10 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 10 | 11 | import com.genersoft.iot.vmp.service.*; |
| ... | ... | @@ -28,6 +29,9 @@ import org.springframework.web.bind.annotation.RestController; |
| 28 | 29 | public class RtpController { |
| 29 | 30 | |
| 30 | 31 | @Autowired |
| 32 | + private ZLMServerFactory zlmServerFactory; | |
| 33 | + | |
| 34 | + @Autowired | |
| 31 | 35 | private ZlmHttpHookSubscribe zlmHttpHookSubscribe; |
| 32 | 36 | |
| 33 | 37 | @Autowired | ... | ... |