liveMedia/include/PassiveServerMediaSubsession.hh

Go to the documentation of this file.
00001 /**********
00002 This library is free software; you can redistribute it and/or modify it under
00003 the terms of the GNU Lesser General Public License as published by the
00004 Free Software Foundation; either version 2.1 of the License, or (at your
00005 option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
00006 
00007 This library is distributed in the hope that it will be useful, but WITHOUT
00008 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00009 FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
00010 more details.
00011 
00012 You should have received a copy of the GNU Lesser General Public License
00013 along with this library; if not, write to the Free Software Foundation, Inc.,
00014 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
00015 **********/
00016 // "liveMedia"
00017 // Copyright (c) 1996-2013 Live Networks, Inc.  All rights reserved.
00018 // A 'ServerMediaSubsession' object that represents an existing
00019 // 'RTPSink', rather than one that creates new 'RTPSink's on demand.
00020 // C++ header
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       // called only by createNew();
00044   virtual ~PassiveServerMediaSubsession();
00045 
00046 protected: // redefined virtual functions
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; // indexed by client session id; used to implement RTCP "RR" handling
00078 };
00079 
00080 #endif

Generated on Mon Apr 29 13:28:01 2013 for live by  doxygen 1.5.2