live
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
RTSPServer Class Reference

#include <RTSPServer.hh>

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

Data Structures

class  RTSPClientConnection
 
class  RTSPClientSession
 

Public Types

typedef void() responseHandlerForREGISTER(RTSPServer *rtspServer, unsigned requestId, int resultCode, char *resultString)
 
typedef void() responseHandlerForDEREGISTER(RTSPServer *rtspServer, unsigned requestId, int resultCode, char *resultString)
 

Public Member Functions

unsigned registerStream (ServerMediaSession *serverMediaSession, char const *remoteClientNameOrAddress, portNumBits remoteClientPortNum, responseHandlerForREGISTER *responseHandler, char const *username=NULL, char const *password=NULL, Boolean receiveOurStreamViaTCP=False, char const *proxyURLSuffix=NULL)
 
unsigned deregisterStream (ServerMediaSession *serverMediaSession, char const *remoteClientNameOrAddress, portNumBits remoteClientPortNum, responseHandlerForDEREGISTER *responseHandler, char const *username=NULL, char const *password=NULL, char const *proxyURLSuffix=NULL)
 
char * rtspURL (ServerMediaSession const *serverMediaSession, int clientSocket=-1) const
 
char * rtspURLPrefix (int clientSocket=-1) const
 
UserAuthenticationDatabasesetAuthenticationDatabase (UserAuthenticationDatabase *newDB)
 
void disableStreamingRTPOverTCP ()
 
Boolean setUpTunnelingOverHTTP (Port httpPort)
 
portNumBits httpServerPortNum () const
 
void addServerMediaSession (ServerMediaSession *serverMediaSession)
 
virtual ServerMediaSessionlookupServerMediaSession (char const *streamName, Boolean isFirstLookupInSession=True)
 
void removeServerMediaSession (ServerMediaSession *serverMediaSession)
 
void removeServerMediaSession (char const *streamName)
 
void closeAllClientSessionsForServerMediaSession (ServerMediaSession *serverMediaSession)
 
void closeAllClientSessionsForServerMediaSession (char const *streamName)
 
void deleteServerMediaSession (ServerMediaSession *serverMediaSession)
 
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 isMediaSession () const
 
virtual Boolean isServerMediaSession () const
 

Static Public Member Functions

static RTSPServercreateNew (UsageEnvironment &env, Port ourPort=554, UserAuthenticationDatabase *authDatabase=NULL, unsigned reclamationSeconds=65)
 
static Boolean lookupByName (UsageEnvironment &env, char const *name, RTSPServer *&resultServer)
 
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

 RTSPServer (UsageEnvironment &env, int ourSocket, Port ourPort, UserAuthenticationDatabase *authDatabase, unsigned reclamationSeconds)
 
virtual ~RTSPServer ()
 
virtual char const * allowedCommandNames ()
 
virtual Boolean weImplementREGISTER (char const *cmd, char const *proxyURLSuffix, char *&responseStr)
 
virtual void implementCmd_REGISTER (char const *cmd, char const *url, char const *urlSuffix, int socketToRemoteServer, Boolean deliverViaTCP, char const *proxyURLSuffix)
 
virtual UserAuthenticationDatabasegetAuthenticationDatabaseForCommand (char const *cmdName)
 
virtual Boolean specialClientAccessCheck (int clientSocket, struct sockaddr_in &clientAddr, char const *urlSuffix)
 
virtual Boolean specialClientUserAccessCheck (int clientSocket, struct sockaddr_in &clientAddr, char const *urlSuffix, char const *username)
 
virtual ClientConnectioncreateNewClientConnection (int clientSocket, struct sockaddr_in clientAddr)
 
virtual ClientSessioncreateNewClientSession (u_int32_t sessionId)
 
void cleanup ()
 
void incomingConnectionHandler ()
 
void incomingConnectionHandlerOnSocket (int serverSocket)
 
ClientSessioncreateNewClientSessionWithId ()
 
ClientSessionlookupClientSession (u_int32_t sessionId)
 
ClientSessionlookupClientSession (char const *sessionIdStr)
 
TaskTokennextTask ()
 

Static Protected Member Functions

static int setUpOurSocket (UsageEnvironment &env, Port &ourPort)
 
static void incomingConnectionHandler (void *, int)
 

Protected Attributes

int fServerSocket
 
Port fServerPort
 
unsigned fReclamationSeconds
 

Private Member Functions

virtual Boolean isRTSPServer () const
 
void incomingConnectionHandlerHTTP ()
 
void noteTCPStreamingOnSocket (int socketNum, RTSPClientSession *clientSession, unsigned trackNum)
 
void unnoteTCPStreamingOnSocket (int socketNum, RTSPClientSession *clientSession, unsigned trackNum)
 
void stopTCPStreamingOnSocket (int socketNum)
 

Static Private Member Functions

static void incomingConnectionHandlerHTTP (void *, int)
 

Private Attributes

int fHTTPServerSocket
 
Port fHTTPServerPort
 
HashTablefClientConnectionsForHTTPTunneling
 
HashTablefTCPStreamingDatabase
 
HashTablefPendingRegisterOrDeregisterRequests
 
unsigned fRegisterOrDeregisterRequestCounter
 
UserAuthenticationDatabasefAuthDB
 
Boolean fAllowStreamingRTPOverTCP
 

Friends

class RTSPClientConnection
 
class RTSPClientSession
 
class RegisterRequestRecord
 
class DeregisterRequestRecord
 

Detailed Description

Definition at line 31 of file RTSPServer.hh.

Member Typedef Documentation

◆ responseHandlerForDEREGISTER

typedef void() RTSPServer::responseHandlerForDEREGISTER(RTSPServer *rtspServer, unsigned requestId, int resultCode, char *resultString)

Definition at line 64 of file RTSPServer.hh.

◆ responseHandlerForREGISTER

typedef void() RTSPServer::responseHandlerForREGISTER(RTSPServer *rtspServer, unsigned requestId, int resultCode, char *resultString)

Definition at line 46 of file RTSPServer.hh.

Constructor & Destructor Documentation

◆ RTSPServer()

RTSPServer::RTSPServer ( UsageEnvironment env,
int  ourSocket,
Port  ourPort,
UserAuthenticationDatabase authDatabase,
unsigned  reclamationSeconds 
)
protected

◆ ~RTSPServer()

virtual RTSPServer::~RTSPServer ( )
protectedvirtual

Member Function Documentation

◆ addServerMediaSession()

void GenericMediaServer::addServerMediaSession ( ServerMediaSession serverMediaSession)
inherited

◆ allowedCommandNames()

virtual char const* RTSPServer::allowedCommandNames ( )
protectedvirtual

◆ cleanup()

void GenericMediaServer::cleanup ( )
protectedinherited

◆ close() [1/2]

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

◆ close() [2/2]

static void Medium::close ( Medium medium)
staticinherited

◆ closeAllClientSessionsForServerMediaSession() [1/2]

void GenericMediaServer::closeAllClientSessionsForServerMediaSession ( ServerMediaSession serverMediaSession)
inherited

◆ closeAllClientSessionsForServerMediaSession() [2/2]

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

◆ createNew()

static RTSPServer* RTSPServer::createNew ( UsageEnvironment env,
Port  ourPort = 554,
UserAuthenticationDatabase authDatabase = NULL,
unsigned  reclamationSeconds = 65 
)
static

◆ createNewClientConnection()

virtual ClientConnection* RTSPServer::createNewClientConnection ( int  clientSocket,
struct sockaddr_in  clientAddr 
)
protectedvirtual

◆ createNewClientSession()

virtual ClientSession* RTSPServer::createNewClientSession ( u_int32_t  sessionId)
protectedvirtual

Implements GenericMediaServer.

◆ createNewClientSessionWithId()

ClientSession* GenericMediaServer::createNewClientSessionWithId ( )
protectedinherited

◆ deleteServerMediaSession() [1/2]

void GenericMediaServer::deleteServerMediaSession ( ServerMediaSession serverMediaSession)
inherited

◆ deleteServerMediaSession() [2/2]

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

◆ deregisterStream()

unsigned RTSPServer::deregisterStream ( ServerMediaSession serverMediaSession,
char const *  remoteClientNameOrAddress,
portNumBits  remoteClientPortNum,
responseHandlerForDEREGISTER responseHandler,
char const *  username = NULL,
char const *  password = NULL,
char const *  proxyURLSuffix = NULL 
)

◆ disableStreamingRTPOverTCP()

void RTSPServer::disableStreamingRTPOverTCP ( )
inline

Definition at line 88 of file RTSPServer.hh.

References fAllowStreamingRTPOverTCP, and False.

88  {
90  }
const Boolean False
Definition: Boolean.hh:28
Boolean fAllowStreamingRTPOverTCP
Definition: RTSPServer.hh:300

◆ envir()

UsageEnvironment& Medium::envir ( ) const
inlineinherited

◆ getAuthenticationDatabaseForCommand()

virtual UserAuthenticationDatabase* RTSPServer::getAuthenticationDatabaseForCommand ( char const *  cmdName)
protectedvirtual

Reimplemented in RTSPServerWithREGISTERProxying.

◆ httpServerPortNum()

portNumBits RTSPServer::httpServerPortNum ( ) const

◆ implementCmd_REGISTER()

virtual void RTSPServer::implementCmd_REGISTER ( char const *  cmd,
char const *  url,
char const *  urlSuffix,
int  socketToRemoteServer,
Boolean  deliverViaTCP,
char const *  proxyURLSuffix 
)
protectedvirtual

◆ incomingConnectionHandler() [1/2]

static void GenericMediaServer::incomingConnectionHandler ( void *  ,
int   
)
staticprotectedinherited

◆ incomingConnectionHandler() [2/2]

void GenericMediaServer::incomingConnectionHandler ( )
protectedinherited

◆ incomingConnectionHandlerHTTP() [1/2]

static void RTSPServer::incomingConnectionHandlerHTTP ( void *  ,
int   
)
staticprivate

◆ incomingConnectionHandlerHTTP() [2/2]

void RTSPServer::incomingConnectionHandlerHTTP ( )
private

◆ incomingConnectionHandlerOnSocket()

void GenericMediaServer::incomingConnectionHandlerOnSocket ( int  serverSocket)
protectedinherited

◆ 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 RTSPServer::isRTSPServer ( ) const
privatevirtual

Reimplemented from Medium.

◆ 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() [1/2]

static Boolean RTSPServer::lookupByName ( UsageEnvironment env,
char const *  name,
RTSPServer *&  resultServer 
)
static

◆ lookupByName() [2/2]

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

◆ lookupClientSession() [1/2]

ClientSession* GenericMediaServer::lookupClientSession ( u_int32_t  sessionId)
protectedinherited

◆ lookupClientSession() [2/2]

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

◆ lookupServerMediaSession()

virtual ServerMediaSession* GenericMediaServer::lookupServerMediaSession ( char const *  streamName,
Boolean  isFirstLookupInSession = True 
)
virtualinherited

◆ name()

char const* Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

References Medium::fMediumName.

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

◆ nextTask()

TaskToken& Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

References Medium::fNextTask.

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

◆ noteTCPStreamingOnSocket()

void RTSPServer::noteTCPStreamingOnSocket ( int  socketNum,
RTSPClientSession clientSession,
unsigned  trackNum 
)
private

◆ numClientSessions()

unsigned GenericMediaServer::numClientSessions ( ) const
inlineinherited

Definition at line 68 of file GenericMediaServer.hh.

References GenericMediaServer::fClientSessions, and HashTable::numEntries().

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

◆ registerStream()

unsigned RTSPServer::registerStream ( ServerMediaSession serverMediaSession,
char const *  remoteClientNameOrAddress,
portNumBits  remoteClientPortNum,
responseHandlerForREGISTER responseHandler,
char const *  username = NULL,
char const *  password = NULL,
Boolean  receiveOurStreamViaTCP = False,
char const *  proxyURLSuffix = NULL 
)

◆ removeServerMediaSession() [1/2]

void GenericMediaServer::removeServerMediaSession ( ServerMediaSession serverMediaSession)
inherited

◆ removeServerMediaSession() [2/2]

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

◆ rtspURL()

char* RTSPServer::rtspURL ( ServerMediaSession const *  serverMediaSession,
int  clientSocket = -1 
) const

◆ rtspURLPrefix()

char* RTSPServer::rtspURLPrefix ( int  clientSocket = -1) const

◆ setAuthenticationDatabase()

UserAuthenticationDatabase* RTSPServer::setAuthenticationDatabase ( UserAuthenticationDatabase newDB)

◆ setUpOurSocket()

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

◆ setUpTunnelingOverHTTP()

Boolean RTSPServer::setUpTunnelingOverHTTP ( Port  httpPort)

◆ specialClientAccessCheck()

virtual Boolean RTSPServer::specialClientAccessCheck ( int  clientSocket,
struct sockaddr_in &  clientAddr,
char const *  urlSuffix 
)
protectedvirtual

◆ specialClientUserAccessCheck()

virtual Boolean RTSPServer::specialClientUserAccessCheck ( int  clientSocket,
struct sockaddr_in &  clientAddr,
char const *  urlSuffix,
char const *  username 
)
protectedvirtual

◆ stopTCPStreamingOnSocket()

void RTSPServer::stopTCPStreamingOnSocket ( int  socketNum)
private

◆ unnoteTCPStreamingOnSocket()

void RTSPServer::unnoteTCPStreamingOnSocket ( int  socketNum,
RTSPClientSession clientSession,
unsigned  trackNum 
)
private

◆ weImplementREGISTER()

virtual Boolean RTSPServer::weImplementREGISTER ( char const *  cmd,
char const *  proxyURLSuffix,
char *&  responseStr 
)
protectedvirtual

Friends And Related Function Documentation

◆ DeregisterRequestRecord

friend class DeregisterRequestRecord
friend

Definition at line 290 of file RTSPServer.hh.

◆ RegisterRequestRecord

friend class RegisterRequestRecord
friend

Definition at line 289 of file RTSPServer.hh.

◆ RTSPClientConnection

friend class RTSPClientConnection
friend

Definition at line 287 of file RTSPServer.hh.

◆ RTSPClientSession

friend class RTSPClientSession
friend

Definition at line 288 of file RTSPServer.hh.

Field Documentation

◆ fAllowStreamingRTPOverTCP

Boolean RTSPServer::fAllowStreamingRTPOverTCP
private

Definition at line 300 of file RTSPServer.hh.

Referenced by disableStreamingRTPOverTCP().

◆ fAuthDB

UserAuthenticationDatabase* RTSPServer::fAuthDB
private

Definition at line 299 of file RTSPServer.hh.

◆ fClientConnectionsForHTTPTunneling

HashTable* RTSPServer::fClientConnectionsForHTTPTunneling
private

Definition at line 293 of file RTSPServer.hh.

◆ fHTTPServerPort

Port RTSPServer::fHTTPServerPort
private

Definition at line 292 of file RTSPServer.hh.

◆ fHTTPServerSocket

int RTSPServer::fHTTPServerSocket
private

Definition at line 291 of file RTSPServer.hh.

◆ fPendingRegisterOrDeregisterRequests

HashTable* RTSPServer::fPendingRegisterOrDeregisterRequests
private

Definition at line 297 of file RTSPServer.hh.

◆ fReclamationSeconds

unsigned GenericMediaServer::fReclamationSeconds
protectedinherited

Definition at line 160 of file GenericMediaServer.hh.

◆ fRegisterOrDeregisterRequestCounter

unsigned RTSPServer::fRegisterOrDeregisterRequestCounter
private

Definition at line 298 of file RTSPServer.hh.

◆ fServerPort

Port GenericMediaServer::fServerPort
protectedinherited

◆ fServerSocket

int GenericMediaServer::fServerSocket
protectedinherited

Definition at line 158 of file GenericMediaServer.hh.

◆ fTCPStreamingDatabase

HashTable* RTSPServer::fTCPStreamingDatabase
private

Definition at line 295 of file RTSPServer.hh.


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