Commit daab2586ca1ed278ca19d3f0283fbca192cef1be
1 parent
7d9cc96e
优化国标级联上级要求tcp推流时的回复
Showing
1 changed file
with
11 additions
and
0 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
| ... | ... | @@ -225,6 +225,9 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 225 | 225 | mediaTransmissionTCP = true; |
| 226 | 226 | if ("active".equals(setup)) { |
| 227 | 227 | tcpActive = true; |
| 228 | + // 不支持tcp主动 | |
| 229 | + responseAck(evt, Response.NOT_IMPLEMENTED, "tcp active not support"); // 目录不支持点播 | |
| 230 | + return; | |
| 228 | 231 | } else if ("passive".equals(setup)) { |
| 229 | 232 | tcpActive = false; |
| 230 | 233 | } |
| ... | ... | @@ -428,6 +431,14 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 428 | 431 | content.append("m=video "+ sendRtpItem.getLocalPort()+" RTP/AVP 96\r\n"); |
| 429 | 432 | content.append("a=sendonly\r\n"); |
| 430 | 433 | content.append("a=rtpmap:96 PS/90000\r\n"); |
| 434 | + if (sendRtpItem.isTcp()) { | |
| 435 | + content.append("a=connection:new\r\n"); | |
| 436 | + if (!sendRtpItem.isTcpActive()) { | |
| 437 | + content.append("a=setup:active\r\n"); | |
| 438 | + }else { | |
| 439 | + content.append("a=setup:passive\r\n"); | |
| 440 | + } | |
| 441 | + } | |
| 431 | 442 | content.append("y="+ ssrc + "\r\n"); |
| 432 | 443 | content.append("f=\r\n"); |
| 433 | 444 | ... | ... |