rtsp服务器: C语言实现rtsp服务器

rtsp服务器: C语言实现rtsp服务器,第1张

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 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/874805.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-13
下一篇 2022-05-13

发表评论

登录后才能评论

评论列表(0条)

保存