sipxmedialib  Version 3.3
Private Member Functions | Private Attributes | List of all members
MpAudioInputConnection Class Reference

Private class container for MpInputDeviceDriver pointer and window of buffers. More...

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

Public Member Functions

Creators
 MpAudioInputConnection (MpInputDeviceHandle deviceId, MpInputDeviceDriver &deviceDriver, unsigned int frameBufferLength, MpBufPool &bufferPool, uint32_t samplesPerFrame, uint32_t samplesPerSec)
 Default constructor. More...
 
virtual ~MpAudioInputConnection ()
 Destructor. More...
 
Manipulators
OsStatus setup (uint32_t samplesPerFrame, uint32_t samplesPerSec)
 
OsStatus enable ()
 
OsStatus disable ()
 
OsStatus pushFrame (unsigned int numSamples, MpAudioSample *samples, MpFrameTime frameTime)
 
void setInUse ()
 
void clearInUse ()
 
Accessors
OsStatus getFrame (MpFrameTime &frameTime, MpBufPtr &buffer, unsigned &numFramesBefore, unsigned &numFramesAfter) const
 
MpInputDeviceDrivergetDeviceDriver () const
 
unsigned getTimeDerivatives (unsigned nDerivatives, double *&derivativeBuf) const
 
MpFrameTime getCurrentFrameTime () const
 
Inquiry
UtlBoolean isInUse () const
 

Private Member Functions

 MpAudioInputConnection (const MpAudioInputConnection &rMpAudioInputConnection)
 Copy constructor (not implemented for this class) More...
 
MpAudioInputConnectionoperator= (const MpAudioInputConnection &rhs)
 Assignment operator (not implemented for this class) More...
 

Private Attributes

unsigned int mLastPushedFrame
 Index of last pushed frame in mppFrameBufferArray. More...
 
unsigned int mFrameBufferLength
 Length of mppFrameBufferArray. More...
 
unsigned int mFrameBuffersUsed
 Actual number of buffers with data. More...
 
MpInputDeviceFrameDatamppFrameBufferArray
 
MpInputDeviceDrivermpInputDeviceDriver
 
MpBufPoolmpBufferPool
 
UtlBoolean mInUse
 Use indicator to synchronize disable and remove. More...
 
int mEnableCounter
 Reference counter for enable() and disable() calls. More...
 
uint32_t mSamplesPerFrame
 Samples per frame setting for enable() More...
 
uint32_t mSamplesPerSec
 Samples per second setting for enable() More...
 

Detailed Description

Private class container for MpInputDeviceDriver pointer and window of buffers.

Constructor & Destructor Documentation

MpAudioInputConnection ( MpInputDeviceHandle  deviceId,
MpInputDeviceDriver deviceDriver,
unsigned int  frameBufferLength,
MpBufPool bufferPool,
uint32_t  samplesPerFrame,
uint32_t  samplesPerSec 
)
inline

Default constructor.

virtual ~MpAudioInputConnection ( )
inlinevirtual

Destructor.

MpAudioInputConnection ( const MpAudioInputConnection rMpAudioInputConnection)
private

Copy constructor (not implemented for this class)

Member Function Documentation

OsStatus setup ( uint32_t  samplesPerFrame,
uint32_t  samplesPerSec 
)
inline
OsStatus enable ( void  )
inline
OsStatus disable ( void  )
inline
OsStatus pushFrame ( unsigned int  numSamples,
MpAudioSample samples,
MpFrameTime  frameTime 
)
inline
void setInUse ( )
inline
void clearInUse ( )
inline
OsStatus getFrame ( MpFrameTime frameTime,
MpBufPtr buffer,
unsigned &  numFramesBefore,
unsigned &  numFramesAfter 
) const
inline
MpInputDeviceDriver* getDeviceDriver ( ) const
inline
unsigned getTimeDerivatives ( unsigned  nDerivatives,
double *&  derivativeBuf 
) const
inline
MpFrameTime getCurrentFrameTime ( ) const
inline
UtlBoolean isInUse ( ) const
inline
MpAudioInputConnection& operator= ( const MpAudioInputConnection rhs)
private

Assignment operator (not implemented for this class)

Member Data Documentation

unsigned int mLastPushedFrame
private

Index of last pushed frame in mppFrameBufferArray.

unsigned int mFrameBufferLength
private

Length of mppFrameBufferArray.

unsigned int mFrameBuffersUsed
private

Actual number of buffers with data.

MpInputDeviceFrameData* mppFrameBufferArray
private
MpInputDeviceDriver* mpInputDeviceDriver
private
MpBufPool* mpBufferPool
private
UtlBoolean mInUse
private

Use indicator to synchronize disable and remove.

int mEnableCounter
private

Reference counter for enable() and disable() calls.

uint32_t mSamplesPerFrame
private

Samples per frame setting for enable()

uint32_t mSamplesPerSec
private

Samples per second setting for enable()