live
PassiveServerMediaSubsession.hh
Go to the documentation of this file.
1/**********
2This library is free software; you can redistribute it and/or modify it under
3the terms of the GNU Lesser General Public License as published by the
4Free Software Foundation; either version 3 of the License, or (at your
5option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
6
7This library is distributed in the hope that it will be useful, but WITHOUT
8ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10more details.
11
12You should have received a copy of the GNU Lesser General Public License
13along with this library; if not, write to the Free Software Foundation, Inc.,
1451 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15**********/
16// "liveMedia"
17// Copyright (c) 1996-2024 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
21
22#ifndef _PASSIVE_SERVER_MEDIA_SUBSESSION_HH
23#define _PASSIVE_SERVER_MEDIA_SUBSESSION_HH
24
25#ifndef _SERVER_MEDIA_SESSION_HH
26#include "ServerMediaSession.hh"
27#endif
28
29#ifndef _RTP_SINK_HH
30#include "RTPSink.hh"
31#endif
32#ifndef _RTCP_HH
33#include "RTCP.hh"
34#endif
35
37public:
39 RTCPInstance* rtcpInstance = NULL);
40
41protected:
43 // called only by createNew();
45
47
48protected: // 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*& rtpSink, RTCPInstance*& rtcp);
74 virtual void deleteStream(unsigned clientSessionId, void*& streamToken);
75
76protected:
77 char* fSDPLines;
80 HashTable* fClientRTCPSourceRecords; // indexed by client session id; used to implement RTCP "RR" handling
81};
82
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 deleteStream(unsigned clientSessionId, void *&streamToken)
static PassiveServerMediaSubsession * createNew(RTPSink &rtpSink, RTCPInstance *rtcpInstance=NULL)
PassiveServerMediaSubsession(RTPSink &rtpSink, RTCPInstance *rtcpInstance)
virtual void getRTPSinkandRTCP(void *streamToken, RTPSink *&rtpSink, RTCPInstance *&rtcp)
virtual char const * sdpLines(int addressFamily)
virtual Boolean rtcpIsMuxed()
virtual float getCurrentNPT(void *streamToken)
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)