live555学习笔记-RTSP服务运作
RTSP服务运作 基础基本搞明白了,那么RTSP,RTP等这些协议又是如何利用这些基础机制运作的呢? 首先来看RTSP. RTSP首先需建立TCP侦听socket。可见于此函数: [cpp] view plain copy DynamicRTSPServer* DynamicRTSPServer::createNew(UsageEnvironment& env, Port ourPort, UserAuthenticationDatabase* authDatabase, unsigned reclamationTestSeconds) { int ourSocket = setUpOurSocket(env, ourPort); //建立TCP socket if (ourSocket == -1) return NULL; return new DynamicRTSPServer(env, ourSocket, ourPort, authDatabase, reclamationTestSeconds); } 要帧听客户端的连接,就需要利用任务调度机制了,所以需添加一个socket handler。可见于此函数: [cpp] view plain copy RTSPServer::RTSPServer(UsageEnvironment& env, int ourSocket,