sipxmediaadapterlib  Version 3.3
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | List of all members
CpMediaInterfaceFactory Class Reference

#include <CpMediaInterfaceFactory.h>

Collaboration diagram for CpMediaInterfaceFactory:
Collaboration graph
[legend]

Public Member Functions

 CpMediaInterfaceFactory ()
 
virtual ~CpMediaInterfaceFactory ()
 
void setFactoryImplementation (CpMediaInterfaceFactoryImpl *pFactoryInterface)
 
CpMediaInterfacecreateMediaInterface (const char *publicAddress, const char *localAddress, int numCodecs, SdpCodec *sdpCodecArray[], const char *locale, int expeditedIpTos, const char *szStunServer, int iStunPort, int iStunKeepAlivePeriodSecs, const char *szTurnServer, int iTurnPort, const char *szTurnUsername, const char *szTurnPassword, int iTurnKeepAlivePeriodSecs, UtlBoolean bEnableICE, uint32_t samplesPerSec=0, OsMsgDispatcher *pDispatcher=NULL)
 
CpMediaInterfaceFactoryImplgetFactoryImplementation ()
 

Static Public Member Functions

static OsStatus addCodecPaths (const size_t nCodecPaths, const UtlString codecPaths[])
 Add directory paths to the codec search path. More...
 
static void clearCodecPaths ()
 Clear the static codec path list. More...
 

Protected Attributes

CpMediaInterfaceFactoryImplmpFactoryImpl
 

Private Member Functions

CpMediaInterfaceFactoryoperator= (const CpMediaInterfaceFactory &rhs)
 
 CpMediaInterfaceFactory (const CpMediaInterfaceFactory &rCpMediaInterfaceFactory)
 

Detailed Description

The CpMediaInterfaceFactory is responsible for create media interfaces. Developers must install factory implementation by invoking the setFactoryImplementation(...) method.

The destructor of this factory will automatically destroy the CpMediaIntefaceFactoryInterface.

Constructor & Destructor Documentation

Default constructor

Destructor

CpMediaInterfaceFactory ( const CpMediaInterfaceFactory rCpMediaInterfaceFactory)
private

Disabled copy constructor

Member Function Documentation

void setFactoryImplementation ( CpMediaInterfaceFactoryImpl pFactoryInterface)

Set the factory implementation for creating media processing connections. If an existing factory was set, it will be deleted and the new factory will be used for future calls to createMediaInterface.

The factory will automatically be deleted when the destructor of CpMediaInterfaceFactory is invoked.

CpMediaInterface * createMediaInterface ( const char *  publicAddress,
const char *  localAddress,
int  numCodecs,
SdpCodec *  sdpCodecArray[],
const char *  locale,
int  expeditedIpTos,
const char *  szStunServer,
int  iStunPort,
int  iStunKeepAlivePeriodSecs,
const char *  szTurnServer,
int  iTurnPort,
const char *  szTurnUsername,
const char *  szTurnPassword,
int  iTurnKeepAlivePeriodSecs,
UtlBoolean  bEnableICE,
uint32_t  samplesPerSec = 0,
OsMsgDispatcher *  pDispatcher = NULL 
)

Create a media interface using the designated CpMediaIntefaceFactoryInterface.

Parameters
samplesPerSecZero takes default
OsStatus addCodecPaths ( const size_t  nCodecPaths,
const UtlString  codecPaths[] 
)
static

Add directory paths to the codec search path.

Specify directories that will be added to the list of paths used when searching for codecs to load.

Note
The paths passed in should only contain syntactically valid directory paths. TODO: Syntactically invalid paths will be rejected returning OS_FAILED.
Parameters
[in]codecPaths- array of paths to load.
Return values
OS_SUCCESS- if all of the paths passed in are properly stored.
void clearCodecPaths ( )
static

Clear the static codec path list.

CpMediaInterfaceFactoryImpl * getFactoryImplementation ( )
CpMediaInterfaceFactory& operator= ( const CpMediaInterfaceFactory rhs)
private

Disabled equals operator

Member Data Documentation

CpMediaInterfaceFactoryImpl* mpFactoryImpl
protected