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)
 
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

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

Definition at line 64 of file RTSPServer.hh.

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 ( UsageEnvironment env,
int  ourSocket,
Port  ourPort,
UserAuthenticationDatabase authDatabase,
unsigned  reclamationSeconds 
)
protected
virtual RTSPServer::~RTSPServer ( )
protectedvirtual

Member Function Documentation

void GenericMediaServer::addServerMediaSession ( ServerMediaSession serverMediaSession)
inherited
virtual char const* RTSPServer::allowedCommandNames ( )
protectedvirtual
void GenericMediaServer::cleanup ( )
protectedinherited
static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited
static void Medium::close ( Medium medium)
staticinherited
void GenericMediaServer::closeAllClientSessionsForServerMediaSession ( ServerMediaSession serverMediaSession)
inherited
void GenericMediaServer::closeAllClientSessionsForServerMediaSession ( char const *  streamName)
inherited
static RTSPServer* RTSPServer::createNew ( UsageEnvironment env,
Port  ourPort = 554,
UserAuthenticationDatabase authDatabase = NULL,
unsigned  reclamationSeconds = 65 
)
static
virtual ClientConnection* RTSPServer::createNewClientConnection ( int  clientSocket,
struct sockaddr_in  clientAddr 
)
protectedvirtual
virtual ClientSession* RTSPServer::createNewClientSession ( u_int32_t  sessionId)
protectedvirtual

Implements GenericMediaServer.

ClientSession* GenericMediaServer::createNewClientSessionWithId ( )
protectedinherited
void GenericMediaServer::deleteServerMediaSession ( ServerMediaSession serverMediaSession)
inherited
void GenericMediaServer::deleteServerMediaSession ( char const *  streamName)
inherited
unsigned RTSPServer::deregisterStream ( ServerMediaSession serverMediaSession,
char const *  remoteClientNameOrAddress,
portNumBits  remoteClientPortNum,
responseHandlerForDEREGISTER responseHandler,
char const *  username = NULL,
char const *  password = NULL,
char const *  proxyURLSuffix = NULL 
)
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
UsageEnvironment& Medium::envir ( ) const
inlineinherited
virtual UserAuthenticationDatabase* RTSPServer::getAuthenticationDatabaseForCommand ( char const *  cmdName)
protectedvirtual

Reimplemented in RTSPServerWithREGISTERProxying.

portNumBits RTSPServer::httpServerPortNum ( ) const
virtual void RTSPServer::implementCmd_REGISTER ( char const *  cmd,
char const *  url,
char const *  urlSuffix,
int  socketToRemoteServer,
Boolean  deliverViaTCP,
char const *  proxyURLSuffix 
)
protectedvirtual
static void GenericMediaServer::incomingConnectionHandler ( void *  ,
int   
)
staticprotectedinherited
void GenericMediaServer::incomingConnectionHandler ( )
protectedinherited
static void RTSPServer::incomingConnectionHandlerHTTP ( void *  ,
int   
)
staticprivate
void RTSPServer::incomingConnectionHandlerHTTP ( )
private
void GenericMediaServer::incomingConnectionHandlerOnSocket ( int  serverSocket)
protectedinherited
virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

virtual Boolean RTSPServer::isRTSPServer ( ) const
privatevirtual

Reimplemented from Medium.

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

virtual Boolean Medium::isSink ( ) const
virtualinherited

Reimplemented in MediaSink.

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

static Boolean RTSPServer::lookupByName ( UsageEnvironment env,
char const *  name,
RTSPServer *&  resultServer 
)
static
static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
)
staticinherited
ClientSession* GenericMediaServer::lookupClientSession ( u_int32_t  sessionId)
protectedinherited
ClientSession* GenericMediaServer::lookupClientSession ( char const *  sessionIdStr)
protectedinherited
virtual ServerMediaSession* GenericMediaServer::lookupServerMediaSession ( char const *  streamName,
Boolean  isFirstLookupInSession = True 
)
virtualinherited
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
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
void RTSPServer::noteTCPStreamingOnSocket ( int  socketNum,
RTSPClientSession clientSession,
unsigned  trackNum 
)
private
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 
)
void GenericMediaServer::removeServerMediaSession ( ServerMediaSession serverMediaSession)
inherited
void GenericMediaServer::removeServerMediaSession ( char const *  streamName)
inherited
char* RTSPServer::rtspURL ( ServerMediaSession const *  serverMediaSession,
int  clientSocket = -1 
) const
char* RTSPServer::rtspURLPrefix ( int  clientSocket = -1) const
UserAuthenticationDatabase* RTSPServer::setAuthenticationDatabase ( UserAuthenticationDatabase newDB)
static int GenericMediaServer::setUpOurSocket ( UsageEnvironment env,
Port ourPort 
)
staticprotectedinherited
Boolean RTSPServer::setUpTunnelingOverHTTP ( Port  httpPort)
virtual Boolean RTSPServer::specialClientAccessCheck ( int  clientSocket,
struct sockaddr_in &  clientAddr,
char const *  urlSuffix 
)
protectedvirtual
virtual Boolean RTSPServer::specialClientUserAccessCheck ( int  clientSocket,
struct sockaddr_in &  clientAddr,
char const *  urlSuffix,
char const *  username 
)
protectedvirtual
void RTSPServer::stopTCPStreamingOnSocket ( int  socketNum)
private
void RTSPServer::unnoteTCPStreamingOnSocket ( int  socketNum,
RTSPClientSession clientSession,
unsigned  trackNum 
)
private
virtual Boolean RTSPServer::weImplementREGISTER ( char const *  cmd,
char const *  proxyURLSuffix,
char *&  responseStr 
)
protectedvirtual

Friends And Related Function Documentation

friend class DeregisterRequestRecord
friend

Definition at line 290 of file RTSPServer.hh.

friend class RegisterRequestRecord
friend

Definition at line 289 of file RTSPServer.hh.

friend class RTSPClientConnection
friend

Definition at line 287 of file RTSPServer.hh.

friend class RTSPClientSession
friend

Definition at line 288 of file RTSPServer.hh.

Field Documentation

Boolean RTSPServer::fAllowStreamingRTPOverTCP
private

Definition at line 300 of file RTSPServer.hh.

Referenced by disableStreamingRTPOverTCP().

UserAuthenticationDatabase* RTSPServer::fAuthDB
private

Definition at line 299 of file RTSPServer.hh.

HashTable* RTSPServer::fClientConnectionsForHTTPTunneling
private

Definition at line 293 of file RTSPServer.hh.

Port RTSPServer::fHTTPServerPort
private

Definition at line 292 of file RTSPServer.hh.

int RTSPServer::fHTTPServerSocket
private

Definition at line 291 of file RTSPServer.hh.

HashTable* RTSPServer::fPendingRegisterOrDeregisterRequests
private

Definition at line 297 of file RTSPServer.hh.

unsigned GenericMediaServer::fReclamationSeconds
protectedinherited

Definition at line 158 of file GenericMediaServer.hh.

unsigned RTSPServer::fRegisterOrDeregisterRequestCounter
private

Definition at line 298 of file RTSPServer.hh.

Port GenericMediaServer::fServerPort
protectedinherited
int GenericMediaServer::fServerSocket
protectedinherited

Definition at line 156 of file GenericMediaServer.hh.

HashTable* RTSPServer::fTCPStreamingDatabase
private

Definition at line 295 of file RTSPServer.hh.


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