From 71fe60d885b09d53fcd4c58afcfccf18d24a94c2 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 11 四月 2024 15:34:56 +0800
Subject: [PATCH] 更新README
---
src/main/java/com/genersoft/iot/vmp/gb28181/bean/SendRtpItem.java | 240 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 231 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SendRtpItem.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SendRtpItem.java
old mode 100644
new mode 100755
index f3ec337..c133c82
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SendRtpItem.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SendRtpItem.java
@@ -1,5 +1,7 @@
package com.genersoft.iot.vmp.gb28181.bean;
+import com.genersoft.iot.vmp.service.bean.RequestPushStreamMsg;
+
public class SendRtpItem {
/**
@@ -22,7 +24,17 @@
*/
private String platformId;
+ /**
+ * 瀵瑰簲璁惧id
+ */
+ private String deviceId;
+
/**
+ * 鐩存挱娴佺殑搴旂敤鍚�
+ */
+ private String app;
+
+ /**
* 閫氶亾id
*/
private String channelId;
@@ -35,15 +47,11 @@
*/
private int status = 0;
- /**
- * 璁惧鎺ㄦ祦鐨刟pp
- */
- private String app = "rtp";
/**
* 璁惧鎺ㄦ祦鐨剆treamId
*/
- private String streamId;
+ private String stream;
/**
* 鏄惁涓簍cp
@@ -59,6 +67,95 @@
* 鑷繁鎺ㄦ祦浣跨敤鐨勭鍙�
*/
private int localPort;
+
+ /**
+ * 浣跨敤鐨勬祦濯掍綋
+ */
+ private String mediaServerId;
+
+ /**
+ * 浣跨敤鐨勬湇鍔$殑ID
+ */
+ private String serverId;
+
+ /**
+ * invite 鐨� callId
+ */
+ private String CallId;
+
+ /**
+ * invite 鐨� fromTag
+ */
+ private String fromTag;
+
+ /**
+ * invite 鐨� toTag
+ */
+ private String toTag;
+
+ /**
+ * 鍙戦�佹椂锛宺tp鐨刾t锛坲int8_t锛�,涓嶄紶鏃堕粯璁や负96
+ */
+ private int pt = 96;
+
+ /**
+ * 鍙戦�佹椂锛宺tp鐨勮礋杞界被鍨嬨�備负true鏃讹紝璐熻浇涓簆s锛涗负false鏃讹紝涓篹s锛�
+ */
+ private boolean usePs = true;
+
+ /**
+ * 褰搖sePs 涓篺alse鏃讹紝鏈夋晥銆備负1鏃讹紝鍙戦�侀煶棰戯紱涓�0鏃讹紝鍙戦�佽棰戯紱涓嶄紶鏃堕粯璁や负0
+ */
+ private boolean onlyAudio = false;
+
+ /**
+ * 鏄惁寮�鍚痳tcp淇濇椿
+ */
+ private boolean rtcp = false;
+
+
+ /**
+ * 鎾斁绫诲瀷
+ */
+ private InviteStreamType playType;
+
+ /**
+ * 鍙戞祦鐨勫悓鏃舵敹娴�
+ */
+ private String receiveStream;
+
+ public static SendRtpItem getInstance(RequestPushStreamMsg requestPushStreamMsg) {
+ SendRtpItem sendRtpItem = new SendRtpItem();
+ sendRtpItem.setMediaServerId(requestPushStreamMsg.getMediaServerId());
+ sendRtpItem.setApp(requestPushStreamMsg.getApp());
+ sendRtpItem.setStream(requestPushStreamMsg.getStream());
+ sendRtpItem.setIp(requestPushStreamMsg.getIp());
+ sendRtpItem.setPort(requestPushStreamMsg.getPort());
+ sendRtpItem.setSsrc(requestPushStreamMsg.getSsrc());
+ sendRtpItem.setTcp(requestPushStreamMsg.isTcp());
+ sendRtpItem.setLocalPort(requestPushStreamMsg.getSrcPort());
+ sendRtpItem.setPt(requestPushStreamMsg.getPt());
+ sendRtpItem.setUsePs(requestPushStreamMsg.isPs());
+ sendRtpItem.setOnlyAudio(requestPushStreamMsg.isOnlyAudio());
+ return sendRtpItem;
+
+ }
+
+ public static SendRtpItem getInstance(String app, String stream, String ssrc, String dstIp, Integer dstPort, boolean tcp, int sendLocalPort, Integer pt) {
+ SendRtpItem sendRtpItem = new SendRtpItem();
+ sendRtpItem.setApp(app);
+ sendRtpItem.setStream(stream);
+ sendRtpItem.setSsrc(ssrc);
+ sendRtpItem.setTcp(tcp);
+ sendRtpItem.setLocalPort(sendLocalPort);
+ sendRtpItem.setIp(dstIp);
+ sendRtpItem.setPort(dstPort);
+ if (pt != null) {
+ sendRtpItem.setPt(pt);
+ }
+
+ return sendRtpItem;
+ }
public String getIp() {
return ip;
@@ -92,6 +189,14 @@
this.platformId = platformId;
}
+ public String getDeviceId() {
+ return deviceId;
+ }
+
+ public void setDeviceId(String deviceId) {
+ this.deviceId = deviceId;
+ }
+
public String getChannelId() {
return channelId;
}
@@ -116,12 +221,12 @@
this.app = app;
}
- public String getStreamId() {
- return streamId;
+ public String getStream() {
+ return stream;
}
- public void setStreamId(String streamId) {
- this.streamId = streamId;
+ public void setStream(String stream) {
+ this.stream = stream;
}
public boolean isTcp() {
@@ -147,4 +252,121 @@
public void setTcpActive(boolean tcpActive) {
this.tcpActive = tcpActive;
}
+
+ public String getMediaServerId() {
+ return mediaServerId;
+ }
+
+ public void setMediaServerId(String mediaServerId) {
+ this.mediaServerId = mediaServerId;
+ }
+
+ public String getCallId() {
+ return CallId;
+ }
+
+ public void setCallId(String callId) {
+ CallId = callId;
+ }
+
+ public InviteStreamType getPlayType() {
+ return playType;
+ }
+
+ public void setPlayType(InviteStreamType playType) {
+ this.playType = playType;
+ }
+
+ 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;
+ }
+
+ public String getServerId() {
+ return serverId;
+ }
+
+ public void setServerId(String serverId) {
+ this.serverId = serverId;
+ }
+
+ public String getFromTag() {
+ return fromTag;
+ }
+
+ public void setFromTag(String fromTag) {
+ this.fromTag = fromTag;
+ }
+
+ public String getToTag() {
+ return toTag;
+ }
+
+ public void setToTag(String toTag) {
+ this.toTag = toTag;
+ }
+
+ public boolean isRtcp() {
+ return rtcp;
+ }
+
+ public void setRtcp(boolean rtcp) {
+ this.rtcp = rtcp;
+ }
+
+ public String getReceiveStream() {
+ return receiveStream;
+ }
+
+ public void setReceiveStream(String receiveStream) {
+ this.receiveStream = receiveStream;
+ }
+
+ @Override
+ public String toString() {
+ return "SendRtpItem{" +
+ "ip='" + ip + '\'' +
+ ", port=" + port +
+ ", ssrc='" + ssrc + '\'' +
+ ", platformId='" + platformId + '\'' +
+ ", deviceId='" + deviceId + '\'' +
+ ", app='" + app + '\'' +
+ ", channelId='" + channelId + '\'' +
+ ", status=" + status +
+ ", stream='" + stream + '\'' +
+ ", tcp=" + tcp +
+ ", tcpActive=" + tcpActive +
+ ", localPort=" + localPort +
+ ", mediaServerId='" + mediaServerId + '\'' +
+ ", serverId='" + serverId + '\'' +
+ ", CallId='" + CallId + '\'' +
+ ", fromTag='" + fromTag + '\'' +
+ ", toTag='" + toTag + '\'' +
+ ", pt=" + pt +
+ ", usePs=" + usePs +
+ ", onlyAudio=" + onlyAudio +
+ ", rtcp=" + rtcp +
+ ", playType=" + playType +
+ ", receiveStream='" + receiveStream + '\'' +
+ '}';
+ }
}
--
Gitblit v1.8.0