00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _PASSIVE_SERVER_MEDIA_SUBSESSION_HH
00023 #define _PASSIVE_SERVER_MEDIA_SUBSESSION_HH
00024
00025 #ifndef _SERVER_MEDIA_SESSION_HH
00026 #include "ServerMediaSession.hh"
00027 #endif
00028
00029 #ifndef _RTP_SINK_HH
00030 #include "RTPSink.hh"
00031 #endif
00032 #ifndef _RTCP_HH
00033 #include "RTCP.hh"
00034 #endif
00035
00036 class PassiveServerMediaSubsession: public ServerMediaSubsession {
00037 public:
00038 static PassiveServerMediaSubsession* createNew(RTPSink& rtpSink,
00039 RTCPInstance* rtcpInstance = NULL);
00040
00041 protected:
00042 PassiveServerMediaSubsession(RTPSink& rtpSink, RTCPInstance* rtcpInstance);
00043
00044 virtual ~PassiveServerMediaSubsession();
00045
00046 protected:
00047 virtual char const* sdpLines();
00048 virtual void getStreamParameters(unsigned clientSessionId,
00049 netAddressBits clientAddress,
00050 Port const& clientRTPPort,
00051 Port const& clientRTCPPort,
00052 int tcpSocketNum,
00053 unsigned char rtpChannelId,
00054 unsigned char rtcpChannelId,
00055 netAddressBits& destinationAddress,
00056 u_int8_t& destinationTTL,
00057 Boolean& isMulticast,
00058 Port& serverRTPPort,
00059 Port& serverRTCPPort,
00060 void*& streamToken);
00061 virtual void startStream(unsigned clientSessionId, void* streamToken,
00062 TaskFunc* rtcpRRHandler,
00063 void* rtcpRRHandlerClientData,
00064 unsigned short& rtpSeqNum,
00065 unsigned& rtpTimestamp,
00066 ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler,
00067 void* serverRequestAlternativeByteHandlerClientData);
00068 virtual float getCurrentNPT(void* streamToken);
00069 virtual void deleteStream(unsigned clientSessionId, void*& streamToken);
00070
00071 protected:
00072 char* fSDPLines;
00073
00074 private:
00075 RTPSink& fRTPSink;
00076 RTCPInstance* fRTCPInstance;
00077 HashTable* fClientRTCPSourceRecords;
00078 };
00079
00080 #endif