sipxmediaadapterlib
Version 3.3
|
#include <CpMediaInterfaceFactoryImpl.h>
Public Member Functions | |
CpMediaInterfaceFactoryImpl () | |
Default constructor. More... | |
virtual void | release () |
Public interface for destroying this media interface. More... | |
virtual CpMediaInterface * | createMediaInterface (const char *publicAddress, const char *localAddress, int numCodecs, SdpCodec *sdpCodecArray[], const char *locale, int expeditedIpTos, const char *szStunServer, int iStunPort, int iStunKeepAliveSecs, const char *szTurnServer, int iTurnPort, const char *szTurnUsername, const char *szTurnPassword, int iTurnKeepAliveSecs, UtlBoolean bEnableICE, uint32_t samplesPerSec, OsMsgDispatcher *pDispatcher)=0 |
Create a media interface given the designated parameters. More... | |
virtual OsStatus | setSpeakerVolume (int iVolume)=0 |
Set the speaker volume. Valid range includes 0 to 50. More... | |
virtual OsStatus | setSpeakerDevice (const UtlString &device)=0 |
Set the speaker device. More... | |
virtual OsStatus | setMicrophoneGain (int iGain)=0 |
Set the microphone gain. Valid range includes 0 to 10. More... | |
virtual OsStatus | setMicrophoneDevice (const UtlString &device)=0 |
Set the Microphone device. More... | |
virtual OsStatus | muteMicrophone (UtlBoolean bMute)=0 |
Mute the microphone. More... | |
virtual OsStatus | setAudioAECMode (const MEDIA_AEC_MODE mode) |
Enable/Disable echo cancellation. More... | |
virtual OsStatus | setAudioNoiseReductionMode (const MEDIA_NOISE_REDUCTION_MODE mode) |
Enable/Disable Noise Reduction. More... | |
virtual OsStatus | enableAGC (UtlBoolean bEnable) |
Enable AGC Status. More... | |
virtual OsStatus | enableOutOfBandDTMF (UtlBoolean enable) |
Enable/Disable sending DTMF tones inband. More... | |
virtual OsStatus | enableInBandDTMF (UtlBoolean enable) |
Enable/Disable sending DTMF tones inband. More... | |
virtual OsStatus | enableRTCP (UtlBoolean bEnable) |
Enable/Disable RTCP reports. More... | |
virtual OsStatus | setRTCPName (const char *szName) |
Set name send as part of RTCP reports. More... | |
virtual OsStatus | buildCodecFactory (SdpCodecList *pFactory, const UtlString &sAudioPreferences, const UtlString &sVideoPreferences, int videoFormat, int *iRejected)=0 |
Populate the codec factory, return number of rejected codecs. More... | |
virtual OsStatus | setVideoPreviewDisplay (void *pDisplay) |
Set the global video preview window. More... | |
virtual OsStatus | setVideoQuality (int quality) |
Set the global video quality. More... | |
virtual OsStatus | setVideoParameters (int bitRate, int frameRate) |
Set the global video parameters. More... | |
virtual OsStatus | setVideoBitrate (int bitrate) |
virtual OsStatus | setVideoFramerate (int framerate) |
virtual OsStatus | setVideoCpuValue (int cpuValue) |
Set the global CPU usage. More... | |
virtual OsStatus | updateVideoPreviewWindow (void *displayContext) |
Update the video preview window given the specified display context. More... | |
virtual void | setRtpPortRange (int startRtpPort, int lastRtpPort) |
Sets the RTP port range for this factory. More... | |
virtual OsStatus | getNextRtpPort (const char *bindAddress, int &rtpPort) |
Gets the next available rtp port. More... | |
virtual OsStatus | releaseRtpPort (const int rtpPort) |
Release the rtp port back to the pool of available RTP ports. More... | |
virtual OsStatus | setConnectionIdleTimeout (const int idleTimeout) |
Set the connection idle timeout. More... | |
virtual void | setDispatcher (OsMsgDispatcher *dispatcher)=0 |
Set the dispatcher for flowgraph independent media events/messages. More... | |
virtual OsStatus | getSpeakerVolume (int &iVolume) const =0 |
Get the speaker volume. More... | |
virtual OsStatus | getSpeakerDevice (UtlString &device) const =0 |
Get the speaker device. More... | |
virtual OsStatus | getMicrophoneGain (int &iVolume) const =0 |
Get the microphone gain. More... | |
virtual OsStatus | getMicrophoneDevice (UtlString &device) const =0 |
Get the microphone device. More... | |
virtual OsStatus | getLocalAudioConnectionId (int &connectionId) const =0 |
Get the connection id for the local audio connection. More... | |
virtual OsStatus | getConnectionIdleTimeout (int &idleTimeout) const |
Get the connection idle timeout. More... | |
virtual void | setConfiguredIpAddress (const UtlString &configuredIpAddress) |
Set IP address to use in SDP (spoofed address) More... | |
virtual OsStatus | getAudioAECMode (MEDIA_AEC_MODE &mode) const |
Return status of echo cancellation. More... | |
virtual OsStatus | getAudioNoiseReductionMode (MEDIA_NOISE_REDUCTION_MODE &mode) const |
Return status of noise reduction. More... | |
virtual OsStatus | isAGCEnabled (UtlBoolean &bEnable) const |
Return status of AGC. More... | |
virtual OsStatus | isOutOfBandDTMFEnabled (UtlBoolean &enabled) const |
Return status of out-of-band DTMF. More... | |
virtual OsStatus | isInBandDTMFEnabled (UtlBoolean &enabled) const |
Return status of in band DTMF. More... | |
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 Member Functions | |
virtual | ~CpMediaInterfaceFactoryImpl () |
Destructor. More... | |
UtlBoolean | isAddressPortBusy (const char *bindAddress, int iPort, int checkTimeMS) |
Bind the the specified port and see if any data is ready to read for the designated check time. More... | |
Static Protected Member Functions | |
static OsStatus | ensureCapacityCodecPaths (size_t newSize) |
Ensure that there is enough capacity in our codec paths array. More... | |
Protected Attributes | |
int | miInterfaceId |
int | miGain |
int | miStartRtpPort |
int | miLastRtpPort |
int | miNextRtpPort |
UtlSList | mlistFreePorts |
UtlSList | mlistBusyPorts |
OsMutex | mlockList |
UtlString | mConfiguredIpAddress |
Static Protected Attributes | |
static size_t | mnAllocCodecPaths = 0 |
Number of slots allocated in codec path array. More... | |
static size_t | mnCodecPaths = 0 |
Number of codec paths stored. More... | |
static UtlString * | mpCodecPaths = NULL |
dynamic array of paths to use when loading codecs. More... | |
Private Member Functions | |
CpMediaInterfaceFactoryImpl (const CpMediaInterfaceFactoryImpl &rCpMediaInterfaceFactoryImpl) | |
Disabled copy constructor. More... | |
CpMediaInterfaceFactoryImpl & | operator= (const CpMediaInterfaceFactoryImpl &rhs) |
Disabled equals operator. More... | |
Default constructor.
|
protectedvirtual |
Destructor.
|
private |
Disabled copy constructor.
|
virtual |
Public interface for destroying this media interface.
public interface for destroying this media interface
|
pure virtual |
Create a media interface given the designated parameters.
Implemented in sipXmediaFactoryImpl, and CpTopologyGraphFactoryImpl.
|
pure virtual |
Set the speaker volume. Valid range includes 0 to 50.
Implemented in sipXmediaFactoryImpl.
|
pure virtual |
Set the speaker device.
Implemented in sipXmediaFactoryImpl, and CpTopologyGraphFactoryImpl.
|
pure virtual |
Set the microphone gain. Valid range includes 0 to 10.
Implemented in sipXmediaFactoryImpl.
|
pure virtual |
Set the Microphone device.
Implemented in sipXmediaFactoryImpl, and CpTopologyGraphFactoryImpl.
|
pure virtual |
Mute the microphone.
Implemented in sipXmediaFactoryImpl.
|
inlinevirtual |
Enable/Disable echo cancellation.
Reimplemented in sipXmediaFactoryImpl, and CpTopologyGraphFactoryImpl.
|
inlinevirtual |
Enable/Disable Noise Reduction.
Reimplemented in sipXmediaFactoryImpl, and CpTopologyGraphFactoryImpl.
|
inlinevirtual |
Enable AGC Status.
Reimplemented in sipXmediaFactoryImpl, and CpTopologyGraphFactoryImpl.
|
inlinevirtual |
Enable/Disable sending DTMF tones inband.
|
inlinevirtual |
Enable/Disable sending DTMF tones inband.
|
inlinevirtual |
Enable/Disable RTCP reports.
|
inlinevirtual |
Set name send as part of RTCP reports.
|
pure virtual |
Populate the codec factory, return number of rejected codecs.
Implemented in sipXmediaFactoryImpl.
|
inlinevirtual |
Set the global video preview window.
Reimplemented in sipXmediaFactoryImpl.
|
inlinevirtual |
Set the global video quality.
Reimplemented in sipXmediaFactoryImpl.
|
inlinevirtual |
Set the global video parameters.
Reimplemented in sipXmediaFactoryImpl.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Set the global CPU usage.
|
inlinevirtual |
Update the video preview window given the specified display context.
Reimplemented in sipXmediaFactoryImpl.
|
virtual |
Sets the RTP port range for this factory.
|
virtual |
Gets the next available rtp port.
|
virtual |
Release the rtp port back to the pool of available RTP ports.
bindAddress | - address on which to find available port, may be NULL |
rtpPort | - next available RTP port to attempt to bind do |
|
inlinevirtual |
Set the connection idle timeout.
|
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.
[in] | codecPaths | - array of paths to load. |
OS_SUCCESS | - if all of the paths passed in are properly stored. |
|
static |
Clear the static codec path list.
|
pure virtual |
Set the dispatcher for flowgraph independent media events/messages.
Implemented in CpTopologyGraphFactoryImpl.
|
pure virtual |
Get the speaker volume.
Implemented in sipXmediaFactoryImpl.
|
pure virtual |
Get the speaker device.
Implemented in sipXmediaFactoryImpl, and CpTopologyGraphFactoryImpl.
|
pure virtual |
Get the microphone gain.
Implemented in sipXmediaFactoryImpl.
|
pure virtual |
Get the microphone device.
Implemented in sipXmediaFactoryImpl, and CpTopologyGraphFactoryImpl.
|
pure virtual |
Get the connection id for the local audio connection.
Implemented in sipXmediaFactoryImpl.
|
inlinevirtual |
Get the connection idle timeout.
|
virtual |
Set IP address to use in SDP (spoofed address)
|
inlinevirtual |
Return status of echo cancellation.
Reimplemented in CpTopologyGraphFactoryImpl.
|
inlinevirtual |
Return status of noise reduction.
|
inlinevirtual |
Return status of AGC.
|
inlinevirtual |
Return status of out-of-band DTMF.
|
inlinevirtual |
Return status of in band DTMF.
|
protected |
Bind the the specified port and see if any data is ready to read for the designated check time.
bindAddress | - IP address on which to check port availablity |
iPort | Port number to check |
checkTimeMS | Number of ms to wait for data. Note: had a problem on x86_64 where this was not properly invoked without specifying explicitly class CpMediaInterfaceFactoryImpl scope. So for now made this a non-virtual function. |
|
staticprotected |
Ensure that there is enough capacity in our codec paths array.
Ensure that there is enough capacity in our codec paths array for newSize
elements. If there is not enough capacity, then the maximum capacity is increased above newSize, unless there are so many elements that newSize
exceeds 1/2 the maximum value of a size_t, in which case, it is just allocated to fit newSize, and no greater.
[in] | newSize | - the size to check the codec path array allocation size against. |
OS_SUCCESS | - If everything went ok, and there is enough capacity. |
OS_NO_MEMORY | - If there was an allocation error. |
|
private |
Disabled equals operator.
|
protected |
Id for the next media interface
|
protected |
Gain value stored for unmuting
|
protected |
Requested starting rtp port
|
protected |
Requested ending rtp port
|
protected |
Next available rtp port
|
protected |
List of recently freed ports
|
protected |
List of busy ports
|
protected |
Lock for port allocation
|
protected |
IP address to use for SDP c line
|
staticprotected |
Number of slots allocated in codec path array.
|
staticprotected |
Number of codec paths stored.
|
staticprotected |
dynamic array of paths to use when loading codecs.