sipxmediaadapterlib  Version 3.3
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Attributes | List of all members
CpMediaInterface Class Referenceabstract

Abstract media control interface. More...

#include <CpMediaInterface.h>

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

Public Types

enum  MEDIA_STREAM_TYPE { MEDIA_TYPE_UNKNOWN = 0, AUDIO_STREAM, VIDEO_STREAM }
 
enum  CpAudioFileFormat {
  CP_UNKNOWN_FORMAT = 0, CP_WAVE_PCM_16, CP_WAVE_ALAW, CP_WAVE_MULAW,
  CP_WAVE_GSM
}
 

Public Member Functions

 CpMediaInterface (CpMediaInterfaceFactoryImpl *pFactoryImpl)
 Default constructor. More...
 
virtual void release ()=0
 public interface for destroying this media interface More...
 
virtual OsStatus createConnection (int &connectionId, const char *szLocalAddress, int localPort=0, void *videoWindowHandle=NULL, void *const pSecurityAttributes=NULL, const RtpTransportOptions rtpTransportOptions=RTP_TRANSPORT_UDP)=0
 Create a media connection in the media processing subsystem. More...
 
virtual OsStatus setPlcMethod (int connectionId, const UtlString &methodName="")=0
 Set PLC method to use for codecs which does not have own PLC. More...
 
virtual OsMsgDispatcher * setNotificationDispatcher (OsMsgDispatcher *pNotificationDispatcher)=0
 Add, replace, or clear the media notification dispatcher held by the MI. More...
 
virtual OsStatus setNotificationsEnabled (bool enabled, const UtlString &resourceName=NULL)=0
 Enable or disable media notifications for one/all resource(s). More...
 
virtual int getNumBridgePorts ()
 Return the number of ports on the bridge (by default, not implemented in base class) More...
 
virtual OsStatus setSrtpParams (SdpSrtpParameters &srtpParameters)
 Set the secure RTP parameters. More...
 
virtual OsStatus setMediaPassThrough (int connectionId, MEDIA_STREAM_TYPE mediaType, int mediaTypeStreamIndex, UtlString &receiveAddress, int rtpPort, int rtcpPort)=0
 Set pass through port and address to send RTP stream to. More...
 
virtual OsStatus setConnectionDestination (int connectionId, const char *rtpHostAddress, int rtpAudioPort, int rtcpAudioPort, int rtpVideoPort, int rtcpVideoPort)=0
 Set the connection destination (target) for the designated media connection. More...
 
virtual OsStatus setConnectionDestination (int connectionId, CpMediaInterface::MEDIA_STREAM_TYPE mediaType, int streamIndex, const char *rtpHostAddress, int rtpPort, int rtcpPort)=0
 Set the connection destination (target) for the designated stream on the given media connection. More...
 
virtual OsStatus addAudioRtpConnectionDestination (int connectionId, int iPriority, const char *candidateIp, int candidatePort)=0
 Add an alternate Audio RTP connection destination for this media interface. More...
 
virtual OsStatus addAudioRtcpConnectionDestination (int connectionId, int iPriority, const char *candidateIp, int candidatePort)=0
 Add an alternate Audio RTCP connection destination for this media interface. More...
 
virtual OsStatus addVideoRtpConnectionDestination (int connectionId, int iPriority, const char *candidateIp, int candidatePort)=0
 Add an alternate Video RTP connection destination for this media interface. More...
 
virtual OsStatus addVideoRtcpConnectionDestination (int connectionId, int iPriority, const char *candidateIp, int candidatePort)=0
 Add an alternate Video RTCP connection destination for this media interface. More...
 
virtual OsStatus copyPayloadIds (int connectionId, int numCodecs, SdpCodec *remoteCodecs[])=0
 copies payload IDs for matching codecs to interfaces codec list More...
 
virtual OsStatus startRtpSend (int connectionId, int numCodecs, SdpCodec *sendCodec[])=0
 Start sending RTP using the specified codec list. More...
 
virtual OsStatus startRtpReceive (int connectionId, int numCodecs, SdpCodec *sendCodec[])=0
 Start receiving RTP using the specified codec list. More...
 
virtual OsStatus stopRtpSend (int connectionId)=0
 Stop sending RTP and RTCP data for the specified connection. More...
 
virtual OsStatus stopRtpReceive (int connectionId)=0
 Stop receiving RTP and RTCP data for the specified connection. More...
 
virtual const SdpCodecList * getConnectionCodecList (int connectionId)=0
 Get the list of codecs and payload IDs for the connection. More...
 
virtual OsStatus deleteConnection (int connectionId)=0
 Delete the specified RTP or RTCP connetion. More...
 
virtual OsStatus startTone (int toneId, UtlBoolean local, UtlBoolean remote)=0
 Start playing the specified tone for this call. More...
 
virtual OsStatus stopTone ()=0
 Stop playing all tones. More...
 
virtual OsStatus setRtcpTimeOffset (int connectionId, CpMediaInterface::MEDIA_STREAM_TYPE mediaType, int streamIndex, int timeOffset)=0
 Set an offset to the NTP time provided in the RTCP SR. More...
 
virtual OsStatus startChannelTone (int connectiondId, int toneId, UtlBoolean local, UtlBoolean remote)=0
 Start playing DTMF tone. More...
 
virtual OsStatus stopChannelTone (int connectiondId)=0
 Stop playing DTMF tone. More...
 
virtual OsStatus recordChannelAudio (int connectionId, const char *szFile, CpAudioFileFormat cpFileFormat=CP_WAVE_PCM_16, UtlBoolean appendToFile=FALSE, int numChannels=1)=0
 Start recording to file. More...
 
virtual OsStatus stopRecordChannelAudio (int connectionId)=0
 Stop buffer or file recording which has been started. More...
 
virtual OsStatus pauseRecordChannelAudio (int connectionId)=0
 Pause buffer or file recording which has been started. More...
 
virtual OsStatus resumeRecordChannelAudio (int connectionId)=0
 Resume buffer or file recording which has been paused. More...
 
virtual OsStatus recordBufferChannelAudio (int connectionId, char *pBuffer, int bufferSize, int maxRecordTime=-1, int maxSilence=-1)=0
 Start recording to buffer. More...
 
virtual OsStatus stopRecordBufferChannelAudio (int connectionId)=0
 Stop recording to buffer. More...
 
virtual OsStatus recordCircularBufferChannelAudio (int connectionId, CircularBufferPtr &buffer, CpMediaInterface::CpAudioFileFormat recordingFormat, unsigned long recordingBufferNotificationWatermark)=0
 
virtual OsStatus stopRecordCircularBufferChannelAudio (int connectionId)=0
 
virtual OsStatus playAudio (const char *url, UtlBoolean repeat, UtlBoolean local, UtlBoolean remote, UtlBoolean mixWithMic=false, int downScaling=100, UtlBoolean autoStopAfterFinish=TRUE)=0
 Play the specified audio URL to the call. More...
 
virtual OsStatus playChannelAudio (int connectionId, const char *url, UtlBoolean repeat, UtlBoolean local, UtlBoolean remote, UtlBoolean mixWithMic=false, int downScaling=100, UtlBoolean autoStopOnFinish=TRUE)=0
 
virtual OsStatus playBuffer (char *buf, unsigned long bufSize, uint32_t bufRate, int type, UtlBoolean repeat, UtlBoolean local, UtlBoolean remote, OsProtectedEvent *event=NULL, UtlBoolean mixWithMic=false, int downScaling=100, UtlBoolean autoStopOnFinish=TRUE)=0
 Play the specified audio buffer to the call. More...
 
virtual OsStatus pauseAudio ()=0
 Pause all playing URLs or buffers. More...
 
virtual OsStatus resumeAudio ()=0
 Resume all paused URLs or buffers. More...
 
virtual OsStatus stopAudio ()=0
 Stop playing any URLs or buffers. More...
 
virtual OsStatus stopChannelAudio (int connectionId)=0
 
virtual OsStatus giveFocus ()=0
 Give the focus of the local audio device to the associated call. More...
 
virtual OsStatus defocus ()=0
 Take this call out of focus for the local audio device. More...
 
virtual OsStatus createPlayer (MpStreamPlayer **ppPlayer, const char *szStream, int flags, OsMsgQ *pMsgQ=NULL, const char *szTarget=NULL)=0
 Create a simple player for this call to play a single stream. More...
 
virtual OsStatus destroyPlayer (MpStreamPlayer *pPlayer)=0
 Destroy a simple player in this call. More...
 
virtual OsStatus createPlaylistPlayer (MpStreamPlaylistPlayer **ppPlayer, OsMsgQ *pMsgQ=NULL, const char *szTarget=NULL)=0
 Create a single-buffered play list player for this call. More...
 
virtual OsStatus destroyPlaylistPlayer (MpStreamPlaylistPlayer *pPlayer)=0
 Destroy a single-buffered play list player in this call. More...
 
virtual OsStatus createQueuePlayer (MpStreamQueuePlayer **ppPlayer, OsMsgQ *pMsgQ=NULL, const char *szTarget=NULL)=0
 Create a double-buffered list player for this call. More...
 
virtual OsStatus destroyQueuePlayer (MpStreamQueuePlayer *pPlayer)=0
 Destroy a double-buffered list player in this call. More...
 
virtual void setCodecCPULimit (int iLimit)=0
 Set the CPU resource limit for the media connections in this call. More...
 
virtual OsStatus setMicGain (float gain)=0
 Set microphone gain. More...
 
virtual OsStatus recordMic (int ms, int silenceLength, const char *fileName)=0
 Record the microphone data to a file. More...
 
virtual OsStatus recordMic (int ms, int16_t *pAudioBuf, int bufferSize)=0
 Record the microphone data. More...
 
virtual OsStatus setMixWeightForOutput (int bridgeOutputPort, float weight)=0
 Set the mix weight for all inputs, but its own to the given weight and output on bridge. More...
 
virtual OsStatus setMixWeightsForOutput (int bridgeOutputPort, int numWeights, float weights[])=0
 Set gain for inputs to given output on bridge. More...
 
virtual void setContactType (int connectionId, SIPX_CONTACT_TYPE eType, SIPX_CONTACT_ID contactId)=0
 Set the preferred contact type for this media connection. More...
 
virtual OsStatus setAudioCodecBandwidth (int connectionId, int bandWidth)=0
 Rebuild the codec factory on the fly. More...
 
virtual OsStatus limitCodecs (int connectionId, const SdpCodecList &includeOnlyCodecList)=0
 Further restrict the set of codecs to the list provided. More...
 
virtual OsStatus rebuildCodecFactory (int connectionId, int audioBandwidth, int videoBandwidth, UtlString &videoCodec)=0
 Rebuild codec factory with one video codec. More...
 
virtual OsStatus setConnectionBitrate (int connectionId, int bitrate)=0
 Set connection bitrate on the fly. More...
 
virtual OsStatus setConnectionFramerate (int connectionId, int framerate)=0
 Set connection framerate on the fly. More...
 
virtual OsStatus setVideoWindowDisplay (const void *hWnd)=0
 
virtual OsStatus setSecurityAttributes (const void *security)=0
 
virtual OsStatus generateVoiceQualityReport (int connectionId, const char *callId, UtlString &report)=0
 
virtual void setConnectionTcpRole (const int connectionId, const RtpTcpRoles role)=0
 
virtual OsStatus getCapabilities (int connectionId, UtlString &rtpHostAddress, int &rtpAudioPort, int &rtcpAudioPort, int &rtpVideoPort, int &rtcpVideoPort, SdpCodecList &supportedCodecs, SdpSrtpParameters &srtpParams, int bandWidth, int &videoBandwidth, int &videoFramerate)=0
 
virtual OsStatus getCapabilitiesEx (int connectionId, int nMaxAddresses, UtlString rtpHostAddresses[], int rtpAudioPorts[], int rtcpAudioPorts[], int rtpVideoPorts[], int rtcpVideoPorts[], RTP_TRANSPORT transportTypes[], int &nActualAddresses, SdpCodecList &supportedCodecs, SdpSrtpParameters &srtpParameters, int bandWidth, int &videoBandwidth, int &videoFramerate)=0
 
virtual int getCodecCPUCost ()=0
 Calculate the current cost for the current set of sending/receiving codecs. More...
 
virtual int getCodecCPULimit ()=0
 Calculate the worst case cost for the current set of sending/receiving codecs. More...
 
virtual uint32_t getSamplesPerSec ()=0
 Returns the sample rate of the flowgraph. More...
 
virtual uint32_t getSamplesPerFrame ()=0
 Returns the samples per frame of the flowgraph. More...
 
virtual OsMsgQ * getMsgQ ()=0
 Returns the flowgraph's message queue. More...
 
virtual OsMsgDispatcher * getNotificationDispatcher ()=0
 Returns the Media Notification dispatcher this controls. More...
 
virtual OsStatus getPrimaryCodec (int connectionId, UtlString &audioCodec, UtlString &videoCodec, int *audiopPayloadType, int *videoPayloadType, bool &isEncrypted)=0
 Returns the primary codec for the connection. More...
 
virtual const void * getVideoWindowDisplay ()=0
 
virtual OsStatus getAudioEnergyLevels (int &iInputEnergyLevel, int &iOutputEnergyLevel)
 
virtual OsStatus getAudioEnergyLevels (int connectionId, int &iInputEnergyLevel, int &iOutputEnergyLevel, int &nContributors, unsigned int *pContributorSRCIds, int *pContributorEngeryLevels)
 
virtual OsStatus getAudioRtpSourceIDs (int connectionId, unsigned int &uiSendingSSRC, unsigned int &uiReceivingSSRC)
 
virtual OsStatus enableAudioTransport (int connectionId, UtlBoolean bEnable)
 
virtual OsStatus enableVideoTransport (int connectionId, UtlBoolean bEnable)
 
virtual OsStatus setMediaProperty (const UtlString &propertyName, const UtlString &propertyValue)=0
 Set a media property on the media interface. More...
 
virtual OsStatus getMediaProperty (const UtlString &propertyName, UtlString &propertyValue)=0
 Get a media property on the media interface. More...
 
virtual OsStatus setMediaProperty (int connectionId, const UtlString &propertyName, const UtlString &propertyValue)=0
 Set a media property associated with a connection. More...
 
virtual OsStatus getMediaProperty (int connectionId, const UtlString &propertyName, UtlString &propertyValue)=0
 Get a media property associated with a connection. More...
 
virtual UtlString getType ()=0
 Set IP address to advertise in SDP. More...
 
virtual void setConfiguredIpAddress (const UtlString &ipAddress)
 
virtual UtlBoolean isConnectionIdValid (int connectionId)
 Query if connectionId is valid. More...
 
virtual UtlBoolean isSendingRtpAudio (int connectionId)=0
 
virtual UtlBoolean isSendingRtpVideo (int connectionId)=0
 
virtual UtlBoolean isReceivingRtpAudio (int connectionId)=0
 
virtual UtlBoolean isReceivingRtpVideo (int connectionId)=0
 
virtual UtlBoolean isDestinationSet (int connectionId)=0
 
virtual UtlBoolean canAddParty ()=0
 Query whether a new party can be added to this media interfaces. More...
 
virtual UtlBoolean isVideoInitialized (int connectionId)=0
 Query whether the connection has started sending or receiving video. More...
 
virtual UtlBoolean isAudioInitialized (int connectionId)=0
 Query whether the connection has started sending or receiving audio. More...
 
virtual UtlBoolean isAudioAvailable ()=0
 Query if the audio device is available. More...
 
virtual UtlBoolean isVideoConferencing ()=0
 Query if we are mixing a video conference. More...
 

Static Public Member Functions

static int getInvalidConnectionId ()
 Provide an invalid connectionId. More...
 

Protected Member Functions

virtual ~CpMediaInterface ()
 Protected Destructor so that we can manage media interface pointers. More...
 

Protected Attributes

CpMediaInterfaceFactoryImplmpFactoryImpl
 
SdpSrtpParameters mSrtpParams
 
UtlString mConfiguredIpAddress
 Address to use instead of local address in SDP. More...
 

Private Member Functions

CpMediaInterfaceoperator= (const CpMediaInterface &rhs)
 Assignment operator disabled. More...
 
 CpMediaInterface (const CpMediaInterface &rCpMediaInterface)
 Copy constructor disabled. More...
 

Static Private Attributes

static int sInvalidConnectionId = -1
 Number of connection, assigned to invalid connection. More...
 

Detailed Description

Abstract media control interface.

The CpCallManager creates a CpMediaInterface for each call created. The media interface is then used to control and query the media sub-system used for that call. As connections are added to the call, the media interface is used to add those connections to the media control system such that all connections in that call are bridged together.

Note
This abstract class must be sub-classed and implemented to replace the default media sub-system.

Member Enumeration Documentation

Enumerator
MEDIA_TYPE_UNKNOWN 
AUDIO_STREAM 
VIDEO_STREAM 
Enumerator
CP_UNKNOWN_FORMAT 
CP_WAVE_PCM_16 

Wave file format containing PCM 16 bit signed little endian encoded audio.

CP_WAVE_ALAW 
CP_WAVE_MULAW 
CP_WAVE_GSM 

Wafe file format contain GSM encoded audio.

Constructor & Destructor Documentation

Default constructor.

~CpMediaInterface ( )
protectedvirtual

Protected Destructor so that we can manage media interface pointers.

CpMediaInterface ( const CpMediaInterface rCpMediaInterface)
private

Copy constructor disabled.

Member Function Documentation

virtual void release ( )
pure virtual

public interface for destroying this media interface

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus createConnection ( int &  connectionId,
const char *  szLocalAddress,
int  localPort = 0,
void *  videoWindowHandle = NULL,
void *const  pSecurityAttributes = NULL,
const RtpTransportOptions  rtpTransportOptions = RTP_TRANSPORT_UDP 
)
pure virtual

Create a media connection in the media processing subsystem.

One instance of the CpMediaInterface exists for each call, however, each leg of the call requires an individual connection.

Parameters
[out]connectionId- A newly allocated connection id returned via this call. The connection passed to many other media processing methods in this interface.
[in]szLocalAddress- Local address (interface) that should be used for this connection.
[in]localPort- Local port that should be used for this connection. Note, that in fact two ports will be allocated - (localPort) for RTP and (localPort+1) for RTCP. If 0 is passed, port number will be selected automatically.
[in]videoWindowHandle- Video Window handle if using video. Supply a window handle of NULL to disable video for this call/connection.
pSecurityAttributes- Pointer to a SIPXVE_SECURITY_ATTRIBUTES object.
pSocketIdleSink- <<UNKNOWN -- What does this do? -- kkyzivat 20070801 >>
pMediaEventListener- <<UNKNOWN -- What does this do? -- kkyzivat 20070801 >>
[in]rtpTransportOptionsRTP_TRANSPORT_UDP, RTP_TRANSPORT_TCP, or BOTH
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus setPlcMethod ( int  connectionId,
const UtlString &  methodName = "" 
)
pure virtual

Set PLC method to use for codecs which does not have own PLC.

Parameters
[in]connectionId- Connection Id for the call leg obtained from createConnection
[in]methodName- Name of PLC method. If method name is unknown, default method will be used. This also means you could pass "" to select default method.
Return values
OS_SUCCESS- message to connection was sent, PLC method will be changed on next message processing interval.
OS_NOT_FOUND- connection with given connectionId was not found.
OS_NOT_SUPPORTED- this implementation of CpMediaInterface does not support PLC algorithm changing.
OS_NOT_YET_IMPLEMENTED- this implementation of CpMediaInterface might support PLC algorithm changing, but this feature is not yet implemented.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsMsgDispatcher* setNotificationDispatcher ( OsMsgDispatcher *  pNotificationDispatcher)
pure virtual

Add, replace, or clear the media notification dispatcher held by the MI.

Gives the Media Interface an object to help in the dispatching of notification messages to users of the media interface. Users are free to subclass OsMsgDispatcher to filter messages as they see fit, and should hold on to it to receive their messages.

Parameters
[in]pNotificationDispatcher- A notification dispatcher to give to the MI.
Returns
Pointer to the previous media notification dispatcher set in this MI. If there was no previous media notification dispatcher, NULL is returned.

Implemented in CpPhoneMediaInterface, and CpTopologyGraphInterface.

virtual OsStatus setNotificationsEnabled ( bool  enabled,
const UtlString &  resourceName = NULL 
)
pure virtual

Enable or disable media notifications for one/all resource(s).

Enable or disable media notifications for a given resource or all resources.

If /p NULL is passed for resource name, then all resources will have all notifications enabled/disabled This is an asynchronous operation. After calling this, it may take a bit of time before the new state takes effect.

Parameters
[in]enabled- Whether notification type is to be enabled or disabled.
[in]resourceName- the name of the resource to have notifications enabled/disabled on.
Return values
OS_SUCCESSif the initial sending of a message to enable/disable notifications succeeded.
OS_NOT_FOUNDif there is no resource named /p resourceName.
OS_FAILEDif some other failure in queuing the message occurred.

Implemented in CpPhoneMediaInterface, and CpTopologyGraphInterface.

virtual int getNumBridgePorts ( )
inlinevirtual

Return the number of ports on the bridge (by default, not implemented in base class)

Reimplemented in CpTopologyGraphInterface.

OsStatus setSrtpParams ( SdpSrtpParameters &  srtpParameters)
virtual

Set the secure RTP parameters.

Parameters
[in]srtpParameters- the parameter block to pull requested srtp settings from.
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>
virtual OsStatus setMediaPassThrough ( int  connectionId,
MEDIA_STREAM_TYPE  mediaType,
int  mediaTypeStreamIndex,
UtlString &  receiveAddress,
int  rtpPort,
int  rtcpPort 
)
pure virtual

Set pass through port and address to send RTP stream to.

Set up so that RTP stream does not go through the media subsystem, but get send directly to this port and address. The idea is that this address and port(s) are provided for use in advertizing in the SDP for the local address and port that the remote side should send the media stream to. This address and port is provided in the getCapabilitiesEx/getCapabilities methods.

Implemented in CpTopologyGraphInterface.

virtual OsStatus setConnectionDestination ( int  connectionId,
const char *  rtpHostAddress,
int  rtpAudioPort,
int  rtcpAudioPort,
int  rtpVideoPort,
int  rtcpVideoPort 
)
pure virtual

Set the connection destination (target) for the designated media connection.

Parameters
[in]connectionId- Connection Id for the call leg obtained from createConnection
[in]rtpHostAddress- IP (or host) address of remote party.
[in]rtpAudioPort- RTP audio port of remote party
[in]rtcpAudioPort- RTCP audio port of remote party
[in]rtpVideoPort- RTP video port of remote party
[in]rtcpVideoPort- RTCP video port of remote party
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus setConnectionDestination ( int  connectionId,
CpMediaInterface::MEDIA_STREAM_TYPE  mediaType,
int  streamIndex,
const char *  rtpHostAddress,
int  rtpPort,
int  rtcpPort 
)
pure virtual

Set the connection destination (target) for the designated stream on the given media connection.

Parameters
[in]connectionId- Connection Id for the call leg obtained from createConnection *
[in]rtpHostAddress- IP (or host) address of remote party.
[in]mediaType- stream media type (e.g. audio or video)
[in]streamIndex- stream index for given type in the given connection
[in]rtpPort- RTP port of remote party
[in]rtcpPort- RTCP port of remote party

Implemented in CpTopologyGraphInterface.

virtual OsStatus addAudioRtpConnectionDestination ( int  connectionId,
int  iPriority,
const char *  candidateIp,
int  candidatePort 
)
pure virtual

Add an alternate Audio RTP connection destination for this media interface.

Alternerates are generally obtained from the SdpBody in the form of candidate addresses. When adding an alternate connection, the implementation should use an ICE-like method to determine the best destination address.

Parameters
[in]connectionId- Connection Id for the call leg obtained from createConnection
[in]iPriority- Relatively priority of the destination. Higher numbers have greater priority.
[in]candidateIp- Target/Candidate IP Address
[in]candidatePort- Target/Candidate Port
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus addAudioRtcpConnectionDestination ( int  connectionId,
int  iPriority,
const char *  candidateIp,
int  candidatePort 
)
pure virtual

Add an alternate Audio RTCP connection destination for this media interface.

See also
CpMediaInterface::addAudioRtpConnectionDestination

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus addVideoRtpConnectionDestination ( int  connectionId,
int  iPriority,
const char *  candidateIp,
int  candidatePort 
)
pure virtual

Add an alternate Video RTP connection destination for this media interface.

See also
CpMediaInterface::addAudioRtpConnectionDestination

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus addVideoRtcpConnectionDestination ( int  connectionId,
int  iPriority,
const char *  candidateIp,
int  candidatePort 
)
pure virtual

Add an alternate Video RTCP connection destination for this media interface.

See also
CpMediaInterface::addAudioRtpConnectionDestination

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus copyPayloadIds ( int  connectionId,
int  numCodecs,
SdpCodec *  remoteCodecs[] 
)
pure virtual

copies payload IDs for matching codecs to interfaces codec list

Implemented in CpTopologyGraphInterface.

virtual OsStatus startRtpSend ( int  connectionId,
int  numCodecs,
SdpCodec *  sendCodec[] 
)
pure virtual

Start sending RTP using the specified codec list.

Generally, this codec list is the intersection between both parties.

Parameters
[in]connectionId- Connection Id for the call leg obtained from createConnection
[in]numCodecNumber of codecs supplied in the sendCodec array
[in]sendCodecArray of codecs ordered in sending preference.
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus startRtpReceive ( int  connectionId,
int  numCodecs,
SdpCodec *  sendCodec[] 
)
pure virtual

Start receiving RTP using the specified codec list.

Generally, this codec list is the intersection between both parties. The media processing subsystem should be prepared to receive any of the specified payload type without additional signaling. For example, it is perfectly legal to switch between codecs on a whim if multiple codecs are agreed upon.

Parameters
[in]connectionId- Connection Id for the call leg obtained from createConnection
[in]numCodec- Number of codecs supplied in the sendCodec array
[in]sendCodec- Array of receive codecs
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus stopRtpSend ( int  connectionId)
pure virtual

Stop sending RTP and RTCP data for the specified connection.

Parameters
[in]connectionId- Connection Id for the call leg obtained from createConnection
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus stopRtpReceive ( int  connectionId)
pure virtual

Stop receiving RTP and RTCP data for the specified connection.

Parameters
[in]connectionId- Connection Id for the call leg obtained from createConnection
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual const SdpCodecList* getConnectionCodecList ( int  connectionId)
pure virtual

Get the list of codecs and payload IDs for the connection.

Return values
pointerto connection's SdpCodecList

Implemented in CpTopologyGraphInterface.

virtual OsStatus deleteConnection ( int  connectionId)
pure virtual

Delete the specified RTP or RTCP connetion.

Delete the specified connection and free up any resources associated with that connection.

Parameters
[in]connectionId- Connection Id for the call leg obtained from createConnection.
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus startTone ( int  toneId,
UtlBoolean  local,
UtlBoolean  remote 
)
pure virtual

Start playing the specified tone for this call.

If the tone is a DTMF tone and the remote flag is set, the interface should send out of band DTMF using RFC 2833. Inband audio should be sent to all connections. If a previous tone was playing, calling startTone should automatically stop existing tone.

Parameters
[in]toneId- The designated tone to play (TODO: make enum)
[in]local- True indicates that sound should be played to the local speaker (assuming call is in focus).
[in]remote- True indicates that the sound should be played to all remote parties.
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus stopTone ( )
pure virtual

Stop playing all tones.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus setRtcpTimeOffset ( int  connectionId,
CpMediaInterface::MEDIA_STREAM_TYPE  mediaType,
int  streamIndex,
int  timeOffset 
)
pure virtual

Set an offset to the NTP time provided in the RTCP SR.

Some tones/implementations may not support this. For example, some DTMF playing implementations will only play DTMF for a fixed interval.

Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus startChannelTone ( int  connectiondId,
int  toneId,
UtlBoolean  local,
UtlBoolean  remote 
)
pure virtual

Start playing DTMF tone.

Allows the RTCP synchronization time to be offset from the local wall clock time (NTP time). This does not efect the RTP timestamps in the RTP packets. It only effects the synchronization time in the RTCP sender report by offsetting the calculation of the RTP timestamp in the RTCP sender report for the current wall clock time in the RTCP sender report. This has the effect of adding a syncrhonization offset from other RTP streams (for receiving end points that use the RTCP sender report for synchronization).

Parameters
[in]connectionId- connection in which the RTP stream to be offset is contained.
[in]mediaType- media time of the stream to be offset (e.g. video or audio)
[in]streamIndex- index to specific RTP stream of the give media type in the given connection.
[in]timeOffset- offset to apply to the stream synchronization time in milliseconds
Return values

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus stopChannelTone ( int  connectiondId)
pure virtual

Stop playing DTMF tone.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus recordChannelAudio ( int  connectionId,
const char *  szFile,
CpAudioFileFormat  cpFileFormat = CP_WAVE_PCM_16,
UtlBoolean  appendToFile = FALSE,
int  numChannels = 1 
)
pure virtual

Start recording to file.

Implemented in CpTopologyGraphInterface.

virtual OsStatus stopRecordChannelAudio ( int  connectionId)
pure virtual

Stop buffer or file recording which has been started.

Parameters
[in]connectionId- handle for media connection to which recorder is relate
[in]szFile- name of file to record to
[in]cpFileFormat- audio encoding format to use in the file
[in]appendToFile- if file exist TRUE/FALSE should append to existing audio file. Note: If file is existing, it must be of the same audio format. Also be aware that when stopping and starting in rapid succession, you should wait for the stop notification before starting to record again with the same file or results are unpredictable.
[in]numChannels- number of channels of audio to record to file
Returns
OS_SUCCESS if file was successfully opened (and if append, format is the same) OS_FAILED if existing file was of a different audio format than requested or unable to determine existing file audio format, or error opening file for read and write.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus pauseRecordChannelAudio ( int  connectionId)
pure virtual

Pause buffer or file recording which has been started.

Implemented in CpTopologyGraphInterface.

virtual OsStatus resumeRecordChannelAudio ( int  connectionId)
pure virtual

Resume buffer or file recording which has been paused.

Implemented in CpTopologyGraphInterface.

virtual OsStatus recordBufferChannelAudio ( int  connectionId,
char *  pBuffer,
int  bufferSize,
int  maxRecordTime = -1,
int  maxSilence = -1 
)
pure virtual

Start recording to buffer.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus stopRecordBufferChannelAudio ( int  connectionId)
pure virtual

Stop recording to buffer.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus recordCircularBufferChannelAudio ( int  connectionId,
CircularBufferPtr &  buffer,
CpMediaInterface::CpAudioFileFormat  recordingFormat,
unsigned long  recordingBufferNotificationWatermark 
)
pure virtual
virtual OsStatus stopRecordCircularBufferChannelAudio ( int  connectionId)
pure virtual
virtual OsStatus playAudio ( const char *  url,
UtlBoolean  repeat,
UtlBoolean  local,
UtlBoolean  remote,
UtlBoolean  mixWithMic = false,
int  downScaling = 100,
UtlBoolean  autoStopAfterFinish = TRUE 
)
pure virtual

Play the specified audio URL to the call.

Parameters
[in]url- Audio url to be played – The sipX implementation is limited to file paths (not file Urls).
[in]repeat- If set, loop the audio file until stopAudio is called.
[in]local- True indicates that sound should be played to the local speaker (assuming call is in focus).
[in]remote- True indicates that the sound should be played to all remote parties.
[in]mixWithMic- True to mix with microphone or False to replace it.
[in]downScaling- 100 for no down scaling (range from 0 to 100)
[in]autoStopAfterFinish- if set to TRUE you don't need to call stopAudio() when playback finishes because of end of the file. Otherwise you need to call stopAudio() on receiving of FINISHED notification.
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus playChannelAudio ( int  connectionId,
const char *  url,
UtlBoolean  repeat,
UtlBoolean  local,
UtlBoolean  remote,
UtlBoolean  mixWithMic = false,
int  downScaling = 100,
UtlBoolean  autoStopOnFinish = TRUE 
)
pure virtual
virtual OsStatus playBuffer ( char *  buf,
unsigned long  bufSize,
uint32_t  bufRate,
int  type,
UtlBoolean  repeat,
UtlBoolean  local,
UtlBoolean  remote,
OsProtectedEvent *  event = NULL,
UtlBoolean  mixWithMic = false,
int  downScaling = 100,
UtlBoolean  autoStopOnFinish = TRUE 
)
pure virtual

Play the specified audio buffer to the call.

Todo:
This method should also specify the audio format (e.g. samples/per second, etc.).
Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070801 >>
See also
CpMediaInterface::playAudio

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus pauseAudio ( )
pure virtual

Pause all playing URLs or buffers.

Todo:
This method should also take an optional uniqueId representing a particular playing instance to pause, instead of all of them.
Return values
OS_SUCCESSif the asynchronous request to pause audio succeeded.
OS_NOT_FOUNDif required underlying media resources are not found.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus resumeAudio ( )
pure virtual

Resume all paused URLs or buffers.

Todo:
This method should also take an optional uniqueId representing a particular paused instance to resume, instead of all of them.
Return values
OS_SUCCESSif the asynchronous request to pause audio succeeded.
OS_NOT_FOUNDif required underlying media resources are not found.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus stopAudio ( )
pure virtual

Stop playing any URLs or buffers.

Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070802 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus stopChannelAudio ( int  connectionId)
pure virtual
virtual OsStatus giveFocus ( )
pure virtual

Give the focus of the local audio device to the associated call.

(for example, take this call off hold).

Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070802 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus defocus ( )
pure virtual

Take this call out of focus for the local audio device.

(for example, put this call on hold).

Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070802 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus createPlayer ( MpStreamPlayer **  ppPlayer,
const char *  szStream,
int  flags,
OsMsgQ *  pMsgQ = NULL,
const char *  szTarget = NULL 
)
pure virtual

Create a simple player for this call to play a single stream.

Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070802 >>
See also
CpCallManager::createPlayer

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus destroyPlayer ( MpStreamPlayer *  pPlayer)
pure virtual

Destroy a simple player in this call.

Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070802 >>

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus createPlaylistPlayer ( MpStreamPlaylistPlayer **  ppPlayer,
OsMsgQ *  pMsgQ = NULL,
const char *  szTarget = NULL 
)
pure virtual

Create a single-buffered play list player for this call.

Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070802 >>
See also
CpCallManager::createPlayer

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus destroyPlaylistPlayer ( MpStreamPlaylistPlayer *  pPlayer)
pure virtual

Destroy a single-buffered play list player in this call.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus createQueuePlayer ( MpStreamQueuePlayer **  ppPlayer,
OsMsgQ *  pMsgQ = NULL,
const char *  szTarget = NULL 
)
pure virtual

Create a double-buffered list player for this call.

Return values
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070802 >>
UNKNOWN- << TODO: Add useful return values here - i.e. failure codes to expect, etc. – kkyzivat 20070802 >>
See also
CpCallManager::createPlayer

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus destroyQueuePlayer ( MpStreamQueuePlayer *  pPlayer)
pure virtual

Destroy a double-buffered list player in this call.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual void setCodecCPULimit ( int  iLimit)
pure virtual

Set the CPU resource limit for the media connections in this call.

This is used to limit the available codecs to only those within the designated CPU cost limit.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus setMicGain ( float  gain)
pure virtual

Set microphone gain.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus recordMic ( int  ms,
int  silenceLength,
const char *  fileName 
)
pure virtual

Record the microphone data to a file.

Record a fixed amount of audio from the microphone to a file.

Note
The flowgraph must be in focus for this to work properly.
Parameters
[in]ms- The amount of time, in milliseconds, to record.
[in]silenceLength- The amount of silence, in SECONDS, before recording is terminated.
[in]fileName- The path and name of a file to record to.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus recordMic ( int  ms,
int16_t *  pAudioBuf,
int  bufferSize 
)
pure virtual

Record the microphone data.

Record audio from the microphone to a buffer passed in.

Note
The flowgraph must be in focus for this to work properly.
Parameters
[in]ms- The amount of time (in milliseconds) to record.
[in]pAudioBuf- Audio buffer to record to.
[in]bufferSize- Size of the buffer (in samples).

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus setMixWeightForOutput ( int  bridgeOutputPort,
float  weight 
)
pure virtual

Set the mix weight for all inputs, but its own to the given weight and output on bridge.

Parameters
[in]bridgeOutputPort- output port on the bridge to which input gains are to be set
[in]weight- the new weights to set for the inputs. 1.0f is a net gain of zero. 2.0f is a 3Db gain. The input at port bridgeOutputPort, will get a weight of 0.0f.

Implemented in CpTopologyGraphInterface.

virtual OsStatus setMixWeightsForOutput ( int  bridgeOutputPort,
int  numWeights,
float  weights[] 
)
pure virtual

Set gain for inputs to given output on bridge.

Parameters
[in]bridgeOutputPort- output port on the bridge to which input gains are to be set
[in]numWeights- number of input weights provided. If this number is less than the number of inputs on the bridge the inputs after numWeights are left unchanged.
[in]weights- the new weights to set for the inputs. One for each of the numWeights to set. 1.0f is a net gain of zero. 2.0f is a 3Db gain.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual void setContactType ( int  connectionId,
SIPX_CONTACT_TYPE  eType,
SIPX_CONTACT_ID  contactId 
)
pure virtual

Set the preferred contact type for this media connection.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus setAudioCodecBandwidth ( int  connectionId,
int  bandWidth 
)
pure virtual

Rebuild the codec factory on the fly.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus limitCodecs ( int  connectionId,
const SdpCodecList &  includeOnlyCodecList 
)
pure virtual

Further restrict the set of codecs to the list provided.

Implemented in CpTopologyGraphInterface.

virtual OsStatus rebuildCodecFactory ( int  connectionId,
int  audioBandwidth,
int  videoBandwidth,
UtlString &  videoCodec 
)
pure virtual

Rebuild codec factory with one video codec.

No codecs will be added. This method only removes currently enabled codecs which are not included in the given list.

Returns
the number of codecs remaining enabled

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus setConnectionBitrate ( int  connectionId,
int  bitrate 
)
pure virtual

Set connection bitrate on the fly.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus setConnectionFramerate ( int  connectionId,
int  framerate 
)
pure virtual

Set connection framerate on the fly.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

int getInvalidConnectionId ( )
static

Provide an invalid connectionId.

virtual OsStatus setVideoWindowDisplay ( const void *  hWnd)
pure virtual
virtual OsStatus setSecurityAttributes ( const void *  security)
pure virtual
virtual OsStatus generateVoiceQualityReport ( int  connectionId,
const char *  callId,
UtlString &  report 
)
pure virtual
virtual void setConnectionTcpRole ( const int  connectionId,
const RtpTcpRoles  role 
)
pure virtual
virtual OsStatus getCapabilities ( int  connectionId,
UtlString &  rtpHostAddress,
int &  rtpAudioPort,
int &  rtcpAudioPort,
int &  rtpVideoPort,
int &  rtcpVideoPort,
SdpCodecList &  supportedCodecs,
SdpSrtpParameters &  srtpParams,
int  bandWidth,
int &  videoBandwidth,
int &  videoFramerate 
)
pure virtual

Get the port, address, and codec capabilities for the specified media connection. The CpMediaInterface implementation is responsible for managing port allocations.

Parameters
connectionIdConnection Id for the call leg obtained from createConnection
rtpHostAddressIP address or hostname that should be advertised in SDP data.
rtpPortRTP port number that should be advertised in SDP.
rtcpPortRTCP port number that should be advertised in SDP.
supportedCodecsList of supported codecs.
srtParamssupported SRTP parameters
bandWidthbandwidth limitation id

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus getCapabilitiesEx ( int  connectionId,
int  nMaxAddresses,
UtlString  rtpHostAddresses[],
int  rtpAudioPorts[],
int  rtcpAudioPorts[],
int  rtpVideoPorts[],
int  rtcpVideoPorts[],
RTP_TRANSPORT  transportTypes[],
int &  nActualAddresses,
SdpCodecList &  supportedCodecs,
SdpSrtpParameters &  srtpParameters,
int  bandWidth,
int &  videoBandwidth,
int &  videoFramerate 
)
pure virtual

DOCME

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual int getCodecCPUCost ( )
pure virtual

Calculate the current cost for the current set of sending/receiving codecs.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual int getCodecCPULimit ( )
pure virtual

Calculate the worst case cost for the current set of sending/receiving codecs.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual uint32_t getSamplesPerSec ( )
pure virtual

Returns the sample rate of the flowgraph.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual uint32_t getSamplesPerFrame ( )
pure virtual

Returns the samples per frame of the flowgraph.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsMsgQ* getMsgQ ( )
pure virtual

Returns the flowgraph's message queue.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsMsgDispatcher* getNotificationDispatcher ( )
pure virtual

Returns the Media Notification dispatcher this controls.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus getPrimaryCodec ( int  connectionId,
UtlString &  audioCodec,
UtlString &  videoCodec,
int *  audiopPayloadType,
int *  videoPayloadType,
bool &  isEncrypted 
)
pure virtual

Returns the primary codec for the connection.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual const void* getVideoWindowDisplay ( )
pure virtual
virtual OsStatus getAudioEnergyLevels ( int &  iInputEnergyLevel,
int &  iOutputEnergyLevel 
)
inlinevirtual

Reimplemented in CpTopologyGraphInterface.

virtual OsStatus getAudioEnergyLevels ( int  connectionId,
int &  iInputEnergyLevel,
int &  iOutputEnergyLevel,
int &  nContributors,
unsigned int *  pContributorSRCIds,
int *  pContributorEngeryLevels 
)
inlinevirtual

Reimplemented in CpTopologyGraphInterface.

virtual OsStatus getAudioRtpSourceIDs ( int  connectionId,
unsigned int &  uiSendingSSRC,
unsigned int &  uiReceivingSSRC 
)
inlinevirtual

Reimplemented in CpTopologyGraphInterface.

virtual OsStatus enableAudioTransport ( int  connectionId,
UtlBoolean  bEnable 
)
inlinevirtual

Reimplemented in CpTopologyGraphInterface.

virtual OsStatus enableVideoTransport ( int  connectionId,
UtlBoolean  bEnable 
)
inlinevirtual

Reimplemented in CpTopologyGraphInterface.

virtual OsStatus setMediaProperty ( const UtlString &  propertyName,
const UtlString &  propertyValue 
)
pure virtual

Set a media property on the media interface.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus getMediaProperty ( const UtlString &  propertyName,
UtlString &  propertyValue 
)
pure virtual

Get a media property on the media interface.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus setMediaProperty ( int  connectionId,
const UtlString &  propertyName,
const UtlString &  propertyValue 
)
pure virtual

Set a media property associated with a connection.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual OsStatus getMediaProperty ( int  connectionId,
const UtlString &  propertyName,
UtlString &  propertyValue 
)
pure virtual

Get a media property associated with a connection.

Get the specific type of this media interface

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlString getType ( )
pure virtual

Set IP address to advertise in SDP.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

void setConfiguredIpAddress ( const UtlString &  ipAddress)
virtual
UtlBoolean isConnectionIdValid ( int  connectionId)
virtual

Query if connectionId is valid.

virtual UtlBoolean isSendingRtpAudio ( int  connectionId)
pure virtual

Query whether the specified media connection is enabled for sending RTP.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlBoolean isSendingRtpVideo ( int  connectionId)
pure virtual

Query whether the specified media connection is enabled for sending RTP.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlBoolean isReceivingRtpAudio ( int  connectionId)
pure virtual

Query whether the specified media connection is enabled for sending RTP.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlBoolean isReceivingRtpVideo ( int  connectionId)
pure virtual

Query whether the specified media connection is enabled for sending RTP.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlBoolean isDestinationSet ( int  connectionId)
pure virtual

Query whether the specified media connection has a destination specified for sending RTP.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlBoolean canAddParty ( )
pure virtual

Query whether a new party can be added to this media interfaces.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlBoolean isVideoInitialized ( int  connectionId)
pure virtual

Query whether the connection has started sending or receiving video.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlBoolean isAudioInitialized ( int  connectionId)
pure virtual

Query whether the connection has started sending or receiving audio.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlBoolean isAudioAvailable ( )
pure virtual

Query if the audio device is available.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

virtual UtlBoolean isVideoConferencing ( )
pure virtual

Query if we are mixing a video conference.

Implemented in CpTopologyGraphInterface, and CpPhoneMediaInterface.

CpMediaInterface& operator= ( const CpMediaInterface rhs)
private

Assignment operator disabled.

Member Data Documentation

CpMediaInterfaceFactoryImpl* mpFactoryImpl
protected
SdpSrtpParameters mSrtpParams
protected
UtlString mConfiguredIpAddress
protected

Address to use instead of local address in SDP.

int sInvalidConnectionId = -1
staticprivate

Number of connection, assigned to invalid connection.