RTPSession内维护了一组RTPStream,RTPSession::AddStream。
RTSPSession内部维护了UDPSocketPair,用来创建rtp和rtcp套接字,但是仅在以udp方式发送数据给客户端时才会创建UDPSocketPair,tcp方式不会创建
QTSS_Error RTPStream::Setup(RTSPRequestInterface* request, QTSS_AddStreamFlags inFlags)中
// Check to see if this RTP stream should be sent over TCP. if (fTransportType == qtssRTPTransportTypeTCP) { fIsTCP = true; fSession->GetOverbufferWindow()->SetWindowSize(kUInt32_Max); // If it is, get 2 channel numbers from the RTSP session. fRTPChannel = request->GetSession()->GetTwoChannelNumbers(fSession->GetValue(qtssCliSesRTSPSessionID)); fRTCPChannel = fRTPChannel+1; // If we are interleaving, this is all we need to do to setup. return QTSS_NoErr; }