#ifndef _RTPCOMMON_H_ #define _RTPCOMMON_H_ #include /** * @brief UDP的状态 * */ enum class eUDPState { eUDP_None = 0, /* 未知状态 */ eUDP_Init, /* 初始化 */ eUDP_Opened, /* 已打开 */ eUDP_Closed, /* 已关闭 */ eUDP_Error /* 错误状态 */ }; /** 接收到的客户端结构体 这里的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 客户端信息结构体 * */ struct RtpSendClientInfo_t { QString localIP; /* 本地IP */ int localPort; /* 本地发送数据的UDP端口 */ QString clientIP; /* 客户端IP */ int clientPort; /* 客户端接收数据的UDP端口 */ int compareItemID; /* 对比项ID */ int compareItemRoadNum; /* 对比项通道号 */ int SoundCardNum; /* 声卡编号 */ int SoundCardRoadNum; /* 声卡通道编号 */ RtpSendClientInfo_t(); RtpSendClientInfo_t(const RtpSendClientInfo_t& other); RtpSendClientInfo_t& operator=(const RtpSendClientInfo_t& other); }; #endif /* _RTPCOMMON_H_ */