live
Data Structures | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | Friends
GenericMediaServer Class Referenceabstract

#include <GenericMediaServer.hh>

Inheritance diagram for GenericMediaServer:
Inheritance graph
[legend]
Collaboration diagram for GenericMediaServer:
Collaboration graph
[legend]

Data Structures

class  ClientConnection
 
class  ClientSession
 
class  ServerMediaSessionIterator
 

Public Member Functions

virtual void addServerMediaSession (ServerMediaSession *serverMediaSession)
 
virtual void lookupServerMediaSession (char const *streamName, lookupServerMediaSessionCompletionFunc *completionFunc, void *completionClientData, Boolean isFirstLookupInSession=True)
 
void lookupServerMediaSession (char const *streamName, void(GenericMediaServer::*memberFunc)(ServerMediaSession *))
 
void removeServerMediaSession (ServerMediaSession *serverMediaSession)
 
virtual void removeServerMediaSession (char const *streamName)
 
void closeAllClientSessionsForServerMediaSession (ServerMediaSession *serverMediaSession)
 
virtual void closeAllClientSessionsForServerMediaSession (char const *streamName)
 
void deleteServerMediaSession (ServerMediaSession *serverMediaSession)
 
virtual void deleteServerMediaSession (char const *streamName)
 
unsigned numClientSessions () const
 
UsageEnvironmentenvir () const
 
char const * name () const
 
virtual Boolean isSource () const
 
virtual Boolean isSink () const
 
virtual Boolean isRTCPInstance () const
 
virtual Boolean isRTSPClient () const
 
virtual Boolean isRTSPServer () const
 
virtual Boolean isMediaSession () const
 
virtual Boolean isServerMediaSession () const
 

Static Public Member Functions

static Boolean lookupByName (UsageEnvironment &env, char const *mediumName, Medium *&resultMedium)
 
static void close (UsageEnvironment &env, char const *mediumName)
 
static void close (Medium *medium)
 

Protected Member Functions

 GenericMediaServer (UsageEnvironment &env, int ourSocketIPv4, int ourSocketIPv6, Port ourPort, unsigned reclamationSeconds)
 
virtual ~GenericMediaServer ()
 
void cleanup ()
 
void incomingConnectionHandlerIPv4 ()
 
void incomingConnectionHandlerIPv6 ()
 
void incomingConnectionHandlerOnSocket (int serverSocket)
 
void setTLSFileNames (char const *certFileName, char const *privKeyFileName)
 
virtual ClientConnectioncreateNewClientConnection (int clientSocket, struct sockaddr_storage const &clientAddr)=0
 
virtual ClientSessioncreateNewClientSession (u_int32_t sessionId)=0
 
ClientSessioncreateNewClientSessionWithId ()
 
ClientSessionlookupClientSession (u_int32_t sessionId)
 
ClientSessionlookupClientSession (char const *sessionIdStr)
 
ServerMediaSessiongetServerMediaSession (char const *streamName)
 
TaskTokennextTask ()
 

Static Protected Member Functions

static int setUpOurSocket (UsageEnvironment &env, Port &ourPort, int domain)
 
static void incomingConnectionHandlerIPv4 (void *, int)
 
static void incomingConnectionHandlerIPv6 (void *, int)
 

Protected Attributes

int fServerSocketIPv4
 
int fServerSocketIPv6
 
Port fServerPort
 
unsigned fReclamationSeconds
 
HashTablefServerMediaSessions
 
HashTablefClientConnections
 
HashTablefClientSessions
 

Private Attributes

u_int32_t fPreviousClientSessionId
 
char const * fTLSCertificateFileName
 
char const * fTLSPrivateKeyFileName
 
UsageEnvironmentfEnviron
 
char fMediumName [mediumNameMaxLen]
 
TaskToken fNextTask
 

Friends

class ClientConnection
 
class ClientSession
 
class ServerMediaSessionIterator
 

Detailed Description

Definition at line 44 of file GenericMediaServer.hh.

Constructor & Destructor Documentation

◆ GenericMediaServer()

GenericMediaServer::GenericMediaServer ( UsageEnvironment env,
int  ourSocketIPv4,
int  ourSocketIPv6,
Port  ourPort,
unsigned  reclamationSeconds 
)
protected

◆ ~GenericMediaServer()

virtual GenericMediaServer::~GenericMediaServer ( )
protectedvirtual

Member Function Documentation

◆ addServerMediaSession()

virtual void GenericMediaServer::addServerMediaSession ( ServerMediaSession serverMediaSession)
virtual

Reimplemented in RTSPServer.

◆ cleanup()

void GenericMediaServer::cleanup ( )
protected

◆ close() [1/2]

static void Medium::close ( Medium medium)
staticinherited

◆ close() [2/2]

static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited

◆ closeAllClientSessionsForServerMediaSession() [1/2]

virtual void GenericMediaServer::closeAllClientSessionsForServerMediaSession ( char const *  streamName)
virtual

◆ closeAllClientSessionsForServerMediaSession() [2/2]

void GenericMediaServer::closeAllClientSessionsForServerMediaSession ( ServerMediaSession serverMediaSession)

◆ createNewClientConnection()

virtual ClientConnection * GenericMediaServer::createNewClientConnection ( int  clientSocket,
struct sockaddr_storage const &  clientAddr 
)
protectedpure virtual

Implemented in RTSPServer.

◆ createNewClientSession()

virtual ClientSession * GenericMediaServer::createNewClientSession ( u_int32_t  sessionId)
protectedpure virtual

Implemented in RTSPServer.

◆ createNewClientSessionWithId()

ClientSession * GenericMediaServer::createNewClientSessionWithId ( )
protected

◆ deleteServerMediaSession() [1/2]

virtual void GenericMediaServer::deleteServerMediaSession ( char const *  streamName)
virtual

◆ deleteServerMediaSession() [2/2]

void GenericMediaServer::deleteServerMediaSession ( ServerMediaSession serverMediaSession)

◆ envir()

UsageEnvironment & Medium::envir ( ) const
inlineinherited

◆ getServerMediaSession()

ServerMediaSession * GenericMediaServer::getServerMediaSession ( char const *  streamName)
protected

◆ incomingConnectionHandlerIPv4() [1/2]

void GenericMediaServer::incomingConnectionHandlerIPv4 ( )
protected

◆ incomingConnectionHandlerIPv4() [2/2]

static void GenericMediaServer::incomingConnectionHandlerIPv4 ( void *  ,
int   
)
staticprotected

◆ incomingConnectionHandlerIPv6() [1/2]

void GenericMediaServer::incomingConnectionHandlerIPv6 ( )
protected

◆ incomingConnectionHandlerIPv6() [2/2]

static void GenericMediaServer::incomingConnectionHandlerIPv6 ( void *  ,
int   
)
staticprotected

◆ incomingConnectionHandlerOnSocket()

void GenericMediaServer::incomingConnectionHandlerOnSocket ( int  serverSocket)
protected

◆ isMediaSession()

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

◆ isRTCPInstance()

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

◆ isRTSPClient()

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

◆ isRTSPServer()

virtual Boolean Medium::isRTSPServer ( ) const
virtualinherited

Reimplemented in RTSPServer.

◆ isServerMediaSession()

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

◆ isSink()

virtual Boolean Medium::isSink ( ) const
virtualinherited

Reimplemented in MediaSink.

◆ isSource()

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

◆ lookupByName()

static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
)
staticinherited

◆ lookupClientSession() [1/2]

ClientSession * GenericMediaServer::lookupClientSession ( char const *  sessionIdStr)
protected

◆ lookupClientSession() [2/2]

ClientSession * GenericMediaServer::lookupClientSession ( u_int32_t  sessionId)
protected

◆ lookupServerMediaSession() [1/2]

virtual void GenericMediaServer::lookupServerMediaSession ( char const *  streamName,
lookupServerMediaSessionCompletionFunc completionFunc,
void *  completionClientData,
Boolean  isFirstLookupInSession = True 
)
virtual

◆ lookupServerMediaSession() [2/2]

void GenericMediaServer::lookupServerMediaSession ( char const *  streamName,
void(GenericMediaServer::*)(ServerMediaSession *)  memberFunc 
)

◆ name()

char const * Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

61{return fMediumName;}
char fMediumName[mediumNameMaxLen]
Definition: Media.hh:83

References Medium::fMediumName.

◆ nextTask()

TaskToken & Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

77 {
78 return fNextTask;
79 }
TaskToken fNextTask
Definition: Media.hh:84

References Medium::fNextTask.

◆ numClientSessions()

unsigned GenericMediaServer::numClientSessions ( ) const
inline

Definition at line 80 of file GenericMediaServer.hh.

80{ return fClientSessions->numEntries(); }
virtual unsigned numEntries() const =0

References fClientSessions, and HashTable::numEntries().

◆ removeServerMediaSession() [1/2]

virtual void GenericMediaServer::removeServerMediaSession ( char const *  streamName)
virtual

◆ removeServerMediaSession() [2/2]

void GenericMediaServer::removeServerMediaSession ( ServerMediaSession serverMediaSession)

◆ setTLSFileNames()

void GenericMediaServer::setTLSFileNames ( char const *  certFileName,
char const *  privKeyFileName 
)
protected

◆ setUpOurSocket()

static int GenericMediaServer::setUpOurSocket ( UsageEnvironment env,
Port ourPort,
int  domain 
)
staticprotected

Friends And Related Function Documentation

◆ ClientConnection

friend class ClientConnection
friend

Definition at line 181 of file GenericMediaServer.hh.

◆ ClientSession

friend class ClientSession
friend

Definition at line 182 of file GenericMediaServer.hh.

◆ ServerMediaSessionIterator

friend class ServerMediaSessionIterator
friend

Definition at line 183 of file GenericMediaServer.hh.

Field Documentation

◆ fClientConnections

HashTable* GenericMediaServer::fClientConnections
protected

Definition at line 188 of file GenericMediaServer.hh.

◆ fClientSessions

HashTable* GenericMediaServer::fClientSessions
protected

Definition at line 189 of file GenericMediaServer.hh.

Referenced by numClientSessions().

◆ fEnviron

UsageEnvironment& Medium::fEnviron
privateinherited

Definition at line 82 of file Media.hh.

Referenced by Medium::envir().

◆ fMediumName

char Medium::fMediumName[mediumNameMaxLen]
privateinherited

Definition at line 83 of file Media.hh.

Referenced by Medium::name().

◆ fNextTask

TaskToken Medium::fNextTask
privateinherited

Definition at line 84 of file Media.hh.

Referenced by Medium::nextTask().

◆ fPreviousClientSessionId

u_int32_t GenericMediaServer::fPreviousClientSessionId
private

Definition at line 192 of file GenericMediaServer.hh.

◆ fReclamationSeconds

unsigned GenericMediaServer::fReclamationSeconds
protected

Definition at line 186 of file GenericMediaServer.hh.

◆ fServerMediaSessions

HashTable* GenericMediaServer::fServerMediaSessions
protected

Definition at line 187 of file GenericMediaServer.hh.

◆ fServerPort

Port GenericMediaServer::fServerPort
protected

◆ fServerSocketIPv4

int GenericMediaServer::fServerSocketIPv4
protected

Definition at line 184 of file GenericMediaServer.hh.

◆ fServerSocketIPv6

int GenericMediaServer::fServerSocketIPv6
protected

Definition at line 184 of file GenericMediaServer.hh.

◆ fTLSCertificateFileName

char const* GenericMediaServer::fTLSCertificateFileName
private

Definition at line 194 of file GenericMediaServer.hh.

◆ fTLSPrivateKeyFileName

char const* GenericMediaServer::fTLSPrivateKeyFileName
private

Definition at line 195 of file GenericMediaServer.hh.


The documentation for this class was generated from the following file: