648540858
2024-04-24 c21d973977a9f1d00d26179de764687ddd0ec56c
src/main/java/com/genersoft/iot/vmp/gb28181/bean/SendRtpItem.java
old mode 100644 new mode 100755
@@ -1,5 +1,7 @@
package com.genersoft.iot.vmp.gb28181.bean;
import com.genersoft.iot.vmp.common.VideoManagerConstants;
public class SendRtpItem {
    /**
@@ -21,6 +23,11 @@
     * 平台id
     */
    private String platformId;
    /**
     * 平台名称
     */
    private String platformName;
     /**
     * 对应设备id
@@ -49,7 +56,7 @@
    /**
     * 设备推流的streamId
     */
    private String streamId;
    private String stream;
    /**
     * 是否为tcp
@@ -62,6 +69,11 @@
    private boolean tcpActive;
    /**
     * 自己推流使用的IP
     */
    private String localIp;
    /**
     * 自己推流使用的端口
     */
    private int localPort;
@@ -72,18 +84,60 @@
    private String mediaServerId;
    /**
     *  invite的callId
     * 使用的服务的ID
     */
    private String CallId;
    private String serverId;
    /**
     * 是否是play, false是playback
     *  invite 的 callId
     */
    private boolean isPlay;
    private String callId;
    private byte[] transaction;
    /**
     *  invite 的 fromTag
     */
    private String fromTag;
    private byte[] dialog;
    /**
     *  invite 的 toTag
     */
    private String toTag;
    /**
     * 发送时,rtp的pt(uint8_t),不传时默认为96
     */
    private int pt = 96;
    /**
     * 发送时,rtp的负载类型。为true时,负载为ps;为false时,为es;
     */
    private boolean usePs = true;
    /**
     * 当usePs 为false时,有效。为1时,发送音频;为0时,发送视频;不传时默认为0
     */
    private boolean onlyAudio = false;
    /**
     * 是否开启rtcp保活
     */
    private boolean rtcp = false;
    /**
     * 播放类型
     */
    private InviteStreamType playType;
    /**
     * 发流的同时收流
     */
    private String receiveStream;
    /**
     * 上级的点播类型
     */
    private String sessionName;
    public String getIp() {
        return ip;
@@ -149,12 +203,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() {
@@ -190,36 +244,149 @@
    }
    public String getCallId() {
        return CallId;
        return callId;
    }
    public void setCallId(String callId) {
        CallId = callId;
        this.callId = callId;
    }
    public boolean isPlay() {
        return isPlay;
    public InviteStreamType getPlayType() {
        return playType;
    }
    public void setPlay(boolean play) {
        isPlay = play;
    public void setPlayType(InviteStreamType playType) {
        this.playType = playType;
    }
    public byte[] getTransaction() {
        return transaction;
    public int getPt() {
        return pt;
    }
    public void setTransaction(byte[] transaction) {
        this.transaction = transaction;
    public void setPt(int pt) {
        this.pt = pt;
    }
    public byte[] getDialog() {
        return dialog;
    public boolean isUsePs() {
        return usePs;
    }
    public void setDialog(byte[] dialog) {
        this.dialog = dialog;
    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;
    }
    public String getPlatformName() {
        return platformName;
    }
    public void setPlatformName(String platformName) {
        this.platformName = platformName;
    }
    public String getLocalIp() {
        return localIp;
    }
    public void setLocalIp(String localIp) {
        this.localIp = localIp;
    }
    public String getSessionName() {
        return sessionName;
    }
    public void setSessionName(String sessionName) {
        this.sessionName = sessionName;
    }
    @Override
    public String toString() {
        return "SendRtpItem{" +
                "ip='" + ip + '\'' +
                ", port=" + port +
                ", ssrc='" + ssrc + '\'' +
                ", platformId='" + platformId + '\'' +
                ", platformName='" + platformName + '\'' +
                ", deviceId='" + deviceId + '\'' +
                ", app='" + app + '\'' +
                ", channelId='" + channelId + '\'' +
                ", status=" + status +
                ", stream='" + stream + '\'' +
                ", tcp=" + tcp +
                ", tcpActive=" + tcpActive +
                ", localIp='" + localIp + '\'' +
                ", localPort=" + localPort +
                ", mediaServerId='" + mediaServerId + '\'' +
                ", serverId='" + serverId + '\'' +
                ", CallId='" + callId + '\'' +
                ", fromTag='" + fromTag + '\'' +
                ", toTag='" + toTag + '\'' +
                ", pt=" + pt +
                ", usePs=" + usePs +
                ", onlyAudio=" + onlyAudio +
                ", rtcp=" + rtcp +
                ", playType=" + playType +
                ", receiveStream='" + receiveStream + '\'' +
                ", sessionName='" + sessionName + '\'' +
                '}';
    }
    public String getRedisKey() {
        String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX +
                serverId + "_"
                + mediaServerId + "_"
                + platformId + "_"
                + channelId + "_"
                + stream + "_"
                + callId;
        return key;
    }
}