| | |
| | | package com.genersoft.iot.vmp.gb28181.bean; |
| | | |
| | | import com.genersoft.iot.vmp.service.bean.RequestPushStreamMsg; |
| | | |
| | | import com.genersoft.iot.vmp.common.VideoManagerConstants; |
| | | |
| | | public class SendRtpItem { |
| | | |
| | | /** |
| | |
| | | /** |
| | | * invite 的 callId |
| | | */ |
| | | private String CallId; |
| | | private String callId; |
| | | |
| | | /** |
| | | * invite 的 fromTag |
| | |
| | | * 上级的点播类型 |
| | | */ |
| | | private String sessionName; |
| | | |
| | | 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; |
| | |
| | | } |
| | | |
| | | public String getCallId() { |
| | | return CallId; |
| | | return callId; |
| | | } |
| | | |
| | | public void setCallId(String callId) { |
| | | CallId = callId; |
| | | this.callId = callId; |
| | | } |
| | | |
| | | public InviteStreamType getPlayType() { |
| | |
| | | ", localPort=" + localPort + |
| | | ", mediaServerId='" + mediaServerId + '\'' + |
| | | ", serverId='" + serverId + '\'' + |
| | | ", CallId='" + CallId + '\'' + |
| | | ", CallId='" + callId + '\'' + |
| | | ", fromTag='" + fromTag + '\'' + |
| | | ", toTag='" + toTag + '\'' + |
| | | ", pt=" + pt + |
| | |
| | | ", sessionName='" + sessionName + '\'' + |
| | | '}'; |
| | | } |
| | | |
| | | public String getRedisKey() { |
| | | String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX + |
| | | serverId + "_" |
| | | + mediaServerId + "_" |
| | | + platformId + "_" |
| | | + channelId + "_" |
| | | + stream + "_" |
| | | + callId; |
| | | return key; |
| | | } |
| | | } |