Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

OpalSilenceDetector Class Reference

#include <silencedetect.h>

Inheritance diagram for OpalSilenceDetector:

OpalLineSilenceDetector OpalPCM16SilenceDetector List of all members.

Basic operations

const PNotifier & GetReceiveHandler () const
void SetParameters (const Params &newParam)
Mode GetStatus (BOOL *isInTalkBurst, unsigned *currentThreshold) const
virtual unsigned GetAverageSignalLevel (const BYTE *buffer, PINDEX size)=0
 PDECLARE_NOTIFIER (RTP_DataFrame, OpalSilenceDetector, ReceivedPacket)
PNotifier receiveHandler
Params param
BOOL inTalkBurst
unsigned lastTimestamp
unsigned receivedTime
unsigned levelThreshold
unsigned signalMinimum
unsigned silenceMaximum
unsigned signalReceivedTime
unsigned silenceReceivedTime

Public Types

enum  Mode { NoSilenceDetection, FixedSilenceDetection, AdaptiveSilenceDetection, NumModes }

Public Member Functions

Construction
 OpalSilenceDetector ()

Classes

struct  Params

Member Enumeration Documentation

enum OpalSilenceDetector::Mode
 

Enumeration values:
NoSilenceDetection 
FixedSilenceDetection 
AdaptiveSilenceDetection 
NumModes 


Constructor & Destructor Documentation

OpalSilenceDetector::OpalSilenceDetector  ) 
 

Create a new connection.


Member Function Documentation

virtual unsigned OpalSilenceDetector::GetAverageSignalLevel const BYTE *  buffer,
PINDEX  size
[pure virtual]
 

Get the average signal level in the stream. This is called from within the silence detection algorithm to calculate the average signal level of the last data frame read from the stream.

The default behaviour returns UINT_MAX which indicates that the average signal has no meaning for the stream.

Parameters:
buffer  RTP payload being detected
size  Size of payload buffer

Implemented in OpalPCM16SilenceDetector, and OpalLineSilenceDetector.

const PNotifier& OpalSilenceDetector::GetReceiveHandler  )  const [inline]
 

Mode OpalSilenceDetector::GetStatus BOOL *  isInTalkBurst,
unsigned *  currentThreshold
const
 

Get silence detection status

The inTalkBurst value is TRUE if packet transmission is enabled and FALSE if it is being suppressed due to silence.

The currentThreshold value is the value from 0 to 32767 which is used as the threshold value for 16 bit PCM data.

OpalSilenceDetector::PDECLARE_NOTIFIER RTP_DataFrame  ,
OpalSilenceDetector  ,
ReceivedPacket 
[protected]
 

void OpalSilenceDetector::SetParameters const Params newParam  ) 
 

Set the silence detector parameters. This enables, disables the silence detector as well as adjusting its "agression". The deadband periods are in audio samples of 8kHz.

Parameters:
newParam  New parameters for silence detector


Member Data Documentation

BOOL OpalSilenceDetector::inTalkBurst [protected]
 

unsigned OpalSilenceDetector::lastTimestamp [protected]
 

unsigned OpalSilenceDetector::levelThreshold [protected]
 

Params OpalSilenceDetector::param [protected]
 

unsigned OpalSilenceDetector::receivedTime [protected]
 

PNotifier OpalSilenceDetector::receiveHandler [protected]
 

unsigned OpalSilenceDetector::signalMinimum [protected]
 

unsigned OpalSilenceDetector::signalReceivedTime [protected]
 

unsigned OpalSilenceDetector::silenceMaximum [protected]
 

unsigned OpalSilenceDetector::silenceReceivedTime [protected]
 


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 09:23:34 2006 for OPAL by  doxygen 1.4.2