12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #ifndef _RTPCOMMON_H_
- #define _RTPCOMMON_H_
- #include <QList>
- #include <QUdpSocket>
- /**
- 接收到的客户端结构体
- 这里的sessionID应该换成对比项ID加需要数据的对比项使用的通道信息,通过对比项ID加通道编号
- 找到对应的声卡通道
- */
- struct RtpRecvClientInfo_t
- {
- char clientIP[32]; /* 客户端IP */
- int clientPort; /* 客户端接收数据的UDP端口 */
- // int sessionID; /* 连接的SessionID */
- int compareItemID; /* 对比项ID */
- int compareItemRoadNum; /* 对比项的通道号 */
- char sessionName[32]; /* 客户端名称 */
- int type; /* 包类型,0:Login,1:Heart,2:Logout */
- RtpRecvClientInfo_t();
- RtpRecvClientInfo_t(const RtpRecvClientInfo_t& other);
- RtpRecvClientInfo_t& operator=(const RtpRecvClientInfo_t& other);
- };
- /**
- 回复给客户端的信息,主要是服务发送RTP数据的端口
- */
- struct RtpReplyClientInfo_t
- {
- int localPort; /* 本地发送数据的UDP端口 */
- };
- /**
- * @brief RTP通道包含带有UDP信息的客户端信息,这个是传递给RTP发送线程的
- *
- */
- struct RtpSendClientInfo_t
- {
- int localPort; /* 本地发送数据的UDP端口 */
- QString clientIP; /* 客户端IP */
- int clientPort; /* 客户端接收数据的UDP端口 */
- // int sessionID; /* 连接的SessionID */
- // QString sessionName; /* 客户端名称 */
- int compareItemID; /* 对比项ID */
- int compareItemRoadNum; /* 对比项通道号 */
- QUdpSocket* udpSocket = nullptr; /* 用于发送数据的UDP套接字 */
- RtpSendClientInfo_t();
- RtpSendClientInfo_t(const RtpSendClientInfo_t& other);
- RtpSendClientInfo_t& operator=(const RtpSendClientInfo_t& other);
- };
- #endif /* _RTPCOMMON_H_ */
|