Go to the documentation of this file.
1 /**********
2 This library is free software; you can redistribute it and/or modify it under
3 the terms of the GNU Lesser General Public License as published by the
4 Free Software Foundation; either version 3 of the License, or (at your
5 option) any later version. (See <>.)
7 This library is distributed in the hope that it will be useful, but WITHOUT
8 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 more details.
12 You should have received a copy of the GNU Lesser General Public License
13 along with this library; if not, write to the Free Software Foundation, Inc.,
14 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 **********/
16 // "liveMedia"
17 // Copyright (c) 1996-2022 Live Networks, Inc. All rights reserved.
18 // A 'ServerMediaSubsession' object that represents an existing
19 // 'RTPSink', rather than one that creates new 'RTPSink's on demand.
20 // C++ header
26 #include "ServerMediaSession.hh"
27 #endif
29 #ifndef _RTP_SINK_HH
30 #include "RTPSink.hh"
31 #endif
32 #ifndef _RTCP_HH
33 #include "RTCP.hh"
34 #endif
37 public:
39  RTCPInstance* rtcpInstance = NULL);
41 protected:
43  // called only by createNew();
46  virtual Boolean rtcpIsMuxed();
48 protected: // redefined virtual functions
49  virtual char const* sdpLines(int addressFamily);
50  virtual void getStreamParameters(unsigned clientSessionId,
51  struct sockaddr_storage const& clientAddress,
52  Port const& clientRTPPort,
53  Port const& clientRTCPPort,
54  int tcpSocketNum,
55  unsigned char rtpChannelId,
56  unsigned char rtcpChannelId,
57  TLSState* tlsSTate,
58  struct sockaddr_storage& destinationAddress,
59  u_int8_t& destinationTTL,
60  Boolean& isMulticast,
61  Port& serverRTPPort,
62  Port& serverRTCPPort,
63  void*& streamToken);
64  virtual void startStream(unsigned clientSessionId, void* streamToken,
65  TaskFunc* rtcpRRHandler,
66  void* rtcpRRHandlerClientData,
67  unsigned short& rtpSeqNum,
68  unsigned& rtpTimestamp,
69  ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler,
70  void* serverRequestAlternativeByteHandlerClientData);
71  virtual float getCurrentNPT(void* streamToken);
72  virtual void getRTPSinkandRTCP(void* streamToken,
73  RTPSink const*& rtpSink, RTCPInstance const*& rtcp);
74  virtual void deleteStream(unsigned clientSessionId, void*& streamToken);
76 protected:
77  char* fSDPLines;
80  HashTable* fClientRTCPSourceRecords; // indexed by client session id; used to implement RTCP "RR" handling
81 };
83 #endif
unsigned char Boolean
Definition: Boolean.hh:25
void ServerRequestAlternativeByteHandler(void *instance, u_int8_t requestByte)
Definition: RTPInterface.hh:41
#define NULL
void TaskFunc(void *clientData)
virtual void getRTPSinkandRTCP(void *streamToken, RTPSink const *&rtpSink, RTCPInstance const *&rtcp)
virtual void deleteStream(unsigned clientSessionId, void *&streamToken)
PassiveServerMediaSubsession(RTPSink &rtpSink, RTCPInstance *rtcpInstance)
static PassiveServerMediaSubsession * createNew(RTPSink &rtpSink, RTCPInstance *rtcpInstance=NULL)
virtual Boolean rtcpIsMuxed()
virtual float getCurrentNPT(void *streamToken)
virtual char const * sdpLines(int addressFamily)
virtual void getStreamParameters(unsigned clientSessionId, struct sockaddr_storage const &clientAddress, Port const &clientRTPPort, Port const &clientRTCPPort, int tcpSocketNum, unsigned char rtpChannelId, unsigned char rtcpChannelId, TLSState *tlsSTate, struct sockaddr_storage &destinationAddress, u_int8_t &destinationTTL, Boolean &isMulticast, Port &serverRTPPort, Port &serverRTCPPort, void *&streamToken)
virtual void startStream(unsigned clientSessionId, void *streamToken, TaskFunc *rtcpRRHandler, void *rtcpRRHandlerClientData, unsigned short &rtpSeqNum, unsigned &rtpTimestamp, ServerRequestAlternativeByteHandler *serverRequestAlternativeByteHandler, void *serverRequestAlternativeByteHandlerClientData)