SendRtpItem.java 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. package com.genersoft.iot.vmp.gb28181.bean;
  2. import com.genersoft.iot.vmp.common.VideoManagerConstants;
  3. public class SendRtpItem {
  4. /**
  5. * 推流ip
  6. */
  7. private String ip;
  8. /**
  9. * 推流端口
  10. */
  11. private int port;
  12. /**
  13. * 推流标识
  14. */
  15. private String ssrc;
  16. /**
  17. * 平台id
  18. */
  19. private String platformId;
  20. /**
  21. * 平台名称
  22. */
  23. private String platformName;
  24. /**
  25. * 对应设备id
  26. */
  27. private String deviceId;
  28. /**
  29. * 直播流的应用名
  30. */
  31. private String app;
  32. /**
  33. * 通道id
  34. */
  35. private String channelId;
  36. /**
  37. * 推流状态
  38. * 0 等待设备推流上来
  39. * 1 等待上级平台回复ack
  40. * 2 推流中
  41. */
  42. private int status = 0;
  43. /**
  44. * 设备推流的streamId
  45. */
  46. private String stream;
  47. /**
  48. * 是否为tcp
  49. */
  50. private boolean tcp;
  51. /**
  52. * 是否为tcp主动模式
  53. */
  54. private boolean tcpActive;
  55. /**
  56. * 自己推流使用的IP
  57. */
  58. private String localIp;
  59. /**
  60. * 自己推流使用的端口
  61. */
  62. private int localPort;
  63. /**
  64. * 使用的流媒体
  65. */
  66. private String mediaServerId;
  67. /**
  68. * 使用的服务的ID
  69. */
  70. private String serverId;
  71. /**
  72. * invite 的 callId
  73. */
  74. private String callId;
  75. /**
  76. * invite 的 fromTag
  77. */
  78. private String fromTag;
  79. /**
  80. * invite 的 toTag
  81. */
  82. private String toTag;
  83. /**
  84. * 发送时,rtp的pt(uint8_t),不传时默认为96
  85. */
  86. private int pt = 96;
  87. /**
  88. * 发送时,rtp的负载类型。为true时,负载为ps;为false时,为es;
  89. */
  90. private boolean usePs = true;
  91. /**
  92. * 当usePs 为false时,有效。为1时,发送音频;为0时,发送视频;不传时默认为0
  93. */
  94. private boolean onlyAudio = false;
  95. /**
  96. * 是否开启rtcp保活
  97. */
  98. private boolean rtcp = false;
  99. /**
  100. * 播放类型
  101. */
  102. private InviteStreamType playType;
  103. /**
  104. * 发流的同时收流
  105. */
  106. private String receiveStream;
  107. /**
  108. * 上级的点播类型
  109. */
  110. private String sessionName;
  111. public String getIp() {
  112. return ip;
  113. }
  114. public void setIp(String ip) {
  115. this.ip = ip;
  116. }
  117. public int getPort() {
  118. return port;
  119. }
  120. public void setPort(int port) {
  121. this.port = port;
  122. }
  123. public String getSsrc() {
  124. return ssrc;
  125. }
  126. public void setSsrc(String ssrc) {
  127. this.ssrc = ssrc;
  128. }
  129. public String getPlatformId() {
  130. return platformId;
  131. }
  132. public void setPlatformId(String platformId) {
  133. this.platformId = platformId;
  134. }
  135. public String getDeviceId() {
  136. return deviceId;
  137. }
  138. public void setDeviceId(String deviceId) {
  139. this.deviceId = deviceId;
  140. }
  141. public String getChannelId() {
  142. return channelId;
  143. }
  144. public void setChannelId(String channelId) {
  145. this.channelId = channelId;
  146. }
  147. public int getStatus() {
  148. return status;
  149. }
  150. public void setStatus(int status) {
  151. this.status = status;
  152. }
  153. public String getApp() {
  154. return app;
  155. }
  156. public void setApp(String app) {
  157. this.app = app;
  158. }
  159. public String getStream() {
  160. return stream;
  161. }
  162. public void setStream(String stream) {
  163. this.stream = stream;
  164. }
  165. public boolean isTcp() {
  166. return tcp;
  167. }
  168. public void setTcp(boolean tcp) {
  169. this.tcp = tcp;
  170. }
  171. public int getLocalPort() {
  172. return localPort;
  173. }
  174. public void setLocalPort(int localPort) {
  175. this.localPort = localPort;
  176. }
  177. public boolean isTcpActive() {
  178. return tcpActive;
  179. }
  180. public void setTcpActive(boolean tcpActive) {
  181. this.tcpActive = tcpActive;
  182. }
  183. public String getMediaServerId() {
  184. return mediaServerId;
  185. }
  186. public void setMediaServerId(String mediaServerId) {
  187. this.mediaServerId = mediaServerId;
  188. }
  189. public String getCallId() {
  190. return callId;
  191. }
  192. public void setCallId(String callId) {
  193. this.callId = callId;
  194. }
  195. public InviteStreamType getPlayType() {
  196. return playType;
  197. }
  198. public void setPlayType(InviteStreamType playType) {
  199. this.playType = playType;
  200. }
  201. public int getPt() {
  202. return pt;
  203. }
  204. public void setPt(int pt) {
  205. this.pt = pt;
  206. }
  207. public boolean isUsePs() {
  208. return usePs;
  209. }
  210. public void setUsePs(boolean usePs) {
  211. this.usePs = usePs;
  212. }
  213. public boolean isOnlyAudio() {
  214. return onlyAudio;
  215. }
  216. public void setOnlyAudio(boolean onlyAudio) {
  217. this.onlyAudio = onlyAudio;
  218. }
  219. public String getServerId() {
  220. return serverId;
  221. }
  222. public void setServerId(String serverId) {
  223. this.serverId = serverId;
  224. }
  225. public String getFromTag() {
  226. return fromTag;
  227. }
  228. public void setFromTag(String fromTag) {
  229. this.fromTag = fromTag;
  230. }
  231. public String getToTag() {
  232. return toTag;
  233. }
  234. public void setToTag(String toTag) {
  235. this.toTag = toTag;
  236. }
  237. public boolean isRtcp() {
  238. return rtcp;
  239. }
  240. public void setRtcp(boolean rtcp) {
  241. this.rtcp = rtcp;
  242. }
  243. public String getReceiveStream() {
  244. return receiveStream;
  245. }
  246. public void setReceiveStream(String receiveStream) {
  247. this.receiveStream = receiveStream;
  248. }
  249. public String getPlatformName() {
  250. return platformName;
  251. }
  252. public void setPlatformName(String platformName) {
  253. this.platformName = platformName;
  254. }
  255. public String getLocalIp() {
  256. return localIp;
  257. }
  258. public void setLocalIp(String localIp) {
  259. this.localIp = localIp;
  260. }
  261. public String getSessionName() {
  262. return sessionName;
  263. }
  264. public void setSessionName(String sessionName) {
  265. this.sessionName = sessionName;
  266. }
  267. @Override
  268. public String toString() {
  269. return "SendRtpItem{" +
  270. "ip='" + ip + '\'' +
  271. ", port=" + port +
  272. ", ssrc='" + ssrc + '\'' +
  273. ", platformId='" + platformId + '\'' +
  274. ", platformName='" + platformName + '\'' +
  275. ", deviceId='" + deviceId + '\'' +
  276. ", app='" + app + '\'' +
  277. ", channelId='" + channelId + '\'' +
  278. ", status=" + status +
  279. ", stream='" + stream + '\'' +
  280. ", tcp=" + tcp +
  281. ", tcpActive=" + tcpActive +
  282. ", localIp='" + localIp + '\'' +
  283. ", localPort=" + localPort +
  284. ", mediaServerId='" + mediaServerId + '\'' +
  285. ", serverId='" + serverId + '\'' +
  286. ", CallId='" + callId + '\'' +
  287. ", fromTag='" + fromTag + '\'' +
  288. ", toTag='" + toTag + '\'' +
  289. ", pt=" + pt +
  290. ", usePs=" + usePs +
  291. ", onlyAudio=" + onlyAudio +
  292. ", rtcp=" + rtcp +
  293. ", playType=" + playType +
  294. ", receiveStream='" + receiveStream + '\'' +
  295. ", sessionName='" + sessionName + '\'' +
  296. '}';
  297. }
  298. public String getRedisKey() {
  299. String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX +
  300. serverId + "_"
  301. + mediaServerId + "_"
  302. + platformId + "_"
  303. + channelId + "_"
  304. + stream + "_"
  305. + callId;
  306. return key;
  307. }
  308. }