class RtspServer
{
public:
RtspServer(void);
~RtspServer(void);
public:
int start_server(unsigned short port);
/*RTSP OVER HTTP*/
int http_cmd_server(int socket, char *cmd, int flag);
int http_session_stop(unsigned int *rtspsession);
/*分配端口池*/
CUdpPortPool* GetPortMgr();
/*Get RtspDeal*/
RtspDeal* GetRtspLister();
/*切换rtsp端口*/
int reset_listern_port(unsigned short port);
private:
void release_resource();
private:
RtspDeal* m_pRtspDeal;
CUdpPortPool* m_pUdpPortQueue;
}
class CUdpPortPool
{
public:
CUdpPortPool(void);
~CUdpPortPool(void);
public:
void CreatePortPairs(unsigned short min, unsigned short max);
unsigned short GetPortPair();
void ResusePortPair(unsigned short port);
private:
unsigned short m_minport;
unsigned short m_maxport;
PortQueue m_portqueue;
}
class RtspDeal
{
public:
RtspDeal(void);
~RtspDeal(void);
public:
int Deal( unsigned short
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)