Browse Source

优化推流调用

pull/459/merge
648540858 3 years ago
parent
commit
93e6347f18
  1. 37
      src/main/java/com/genersoft/iot/vmp/gb28181/bean/SendRtpItem.java
  2. 3
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java

37
src/main/java/com/genersoft/iot/vmp/gb28181/bean/SendRtpItem.java

@ -76,6 +76,21 @@ public class SendRtpItem {
*/ */
private String CallId; private String CallId;
/**
* 发送时rtp的ptuint8_t,不传时默认为96
*/
private int pt = 96;
/**
* 发送时rtp的负载类型为true时负载为ps为false时为es
*/
private boolean usePs = true;
/**
* 当usePs 为false时有效为1时发送音频为0时发送视频不传时默认为0
*/
private boolean onlyAudio = false;
/** /**
* 播放类型 * 播放类型
*/ */
@ -221,5 +236,27 @@ public class SendRtpItem {
this.dialog = dialog; this.dialog = dialog;
} }
public int getPt() {
return pt;
}
public void setPt(int pt) {
this.pt = pt;
}
public boolean isUsePs() {
return usePs;
}
public void setUsePs(boolean usePs) {
this.usePs = usePs;
}
public boolean isOnlyAudio() {
return onlyAudio;
}
public void setOnlyAudio(boolean onlyAudio) {
this.onlyAudio = onlyAudio;
}
} }

3
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java

@ -94,6 +94,9 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
param.put("dst_port", sendRtpItem.getPort()); param.put("dst_port", sendRtpItem.getPort());
param.put("is_udp", is_Udp); param.put("is_udp", is_Udp);
param.put("src_port", sendRtpItem.getLocalPort()); param.put("src_port", sendRtpItem.getLocalPort());
param.put("pt", sendRtpItem.getPt());
param.put("use_ps", sendRtpItem.isUsePs() ? "1" : "0");
param.put("only_audio", sendRtpItem.isOnlyAudio());
zlmrtpServerFactory.startSendRtpStream(mediaInfo, param); zlmrtpServerFactory.startSendRtpStream(mediaInfo, param);

Loading…
Cancel
Save