Commit dfb87c768538e280cf5e17d1d5ee5bbed1e1888d
1 parent
d7623b5c
合并主线
Showing
3 changed files
with
14 additions
and
2 deletions
README.md
| ... | ... | @@ -169,3 +169,11 @@ QQ遘∽ソ。荳闊ャ荳榊屓, 邊セ蜉帶怏髯.谺「霑主、ァ螳カ蝨ィ鄒、驥瑚ョィ隶コ.隗牙セ鈴。ケ逶ョ蟇ケ菴 |
| 169 | 169 | |
| 170 | 170 | ps: 蛻壼「槫刈莠ソ吩クェ蜷榊黒瑚け螳夐@貍丈コク莠帛、ァ菴ャ梧ャ「霑主、ァ菴ャ閨皮ウサ謌第キサ蜉縲 |
| 171 | 171 | |
| 172 | +ffmpeg -re -i 123.mp3 -acodec pcm_alaw -ar 8000 -ac 1 -f rtsp rtsp://192.168.1.3:30554/broadcast/34020000001320000101_34020000001310000001 | |
| 173 | + | |
| 174 | +ffmpeg -re -i 123.mp3 -acodec pcm_alaw -ar 8000 -ac 1 -f rtsp rtsp://192.168.1.3:30554/talk/34020000001320000011_34020000001370000001 | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | +ffmpeg -re -i 123.mp3 -acodec pcm_alaw -ar 8000 -ac 1 -f rtsp rtsp://192.168.1.3:30554/talk/34020000001320000101_34020000001310000001 | |
| 179 | + | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| ... | ... | @@ -629,7 +629,7 @@ public class SIPCommander implements ISIPCommander { |
| 629 | 629 | content.append("f=v/////a/1/8/1" + "\r\n"); |
| 630 | 630 | |
| 631 | 631 | Request request = headerProvider.createInviteRequest(device, channelId, content.toString(), SipUtils.getNewViaTag(), SipUtils.getNewFromTag(), null, ssrcInfo.getSsrc(), callIdHeader); |
| 632 | - sipSender.transmitRequest(device.getTransport(), request, (e -> { | |
| 632 | + sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), request, (e -> { | |
| 633 | 633 | streamSession.remove(device.getDeviceId(), channelId, ssrcInfo.getStream()); |
| 634 | 634 | mediaServerService.releaseSsrc(mediaServerItem.getId(), ssrcInfo.getSsrc()); |
| 635 | 635 | errorEvent.response(e); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
| ... | ... | @@ -16,6 +16,8 @@ import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor |
| 16 | 16 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 17 | 17 | import com.genersoft.iot.vmp.media.zlm.ZLMRTPServerFactory; |
| 18 | 18 | import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; |
| 19 | +import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeFactory; | |
| 20 | +import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeForRtpServerTimeout; | |
| 19 | 21 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 20 | 22 | import com.genersoft.iot.vmp.service.IDeviceService; |
| 21 | 23 | import com.genersoft.iot.vmp.service.IMediaServerService; |
| ... | ... | @@ -131,7 +133,7 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In |
| 131 | 133 | param.put("use_ps", sendRtpItem.isUsePs() ? "1" : "0"); |
| 132 | 134 | param.put("only_audio", sendRtpItem.isOnlyAudio() ? "1" : "0"); |
| 133 | 135 | if (!sendRtpItem.isTcp()) { |
| 134 | - // 开启rtcp保活 | |
| 136 | + // udp模式下开启rtcp保活 | |
| 135 | 137 | param.put("udp_rtcp_timeout", sendRtpItem.isRtcp()? "1":"0"); |
| 136 | 138 | } |
| 137 | 139 | |
| ... | ... | @@ -147,6 +149,8 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In |
| 147 | 149 | // 如果是非严格模式,需要关闭端口占用 |
| 148 | 150 | JSONObject startSendRtpStreamResult = null; |
| 149 | 151 | if (sendRtpItem.getLocalPort() != 0) { |
| 152 | + HookSubscribeForRtpServerTimeout hookSubscribeForRtpServerTimeout = HookSubscribeFactory.on_rtp_server_timeout(sendRtpItem.getSsrc(), null, mediaInfo.getId()); | |
| 153 | + hookSubscribe.removeSubscribe(hookSubscribeForRtpServerTimeout); | |
| 150 | 154 | if (zlmrtpServerFactory.releasePort(mediaInfo, sendRtpItem.getSsrc())) { |
| 151 | 155 | if (sendRtpItem.isTcpActive()) { |
| 152 | 156 | startSendRtpStreamResult = zlmrtpServerFactory.startSendRtpPassive(mediaInfo, param); | ... | ... |