#include <lid.h>
Inheritance diagram for H323_LIDCodec:
Public Member Functions | |
H323_LIDCodec (const char *mediaFormat, Direction direction, unsigned numFrames, PINDEX codecTableIndex) | |
virtual BOOL | Read (BYTE *buffer, unsigned &length, RTP_DataFrame &rtpFrame) |
virtual BOOL | Write (const BYTE *buffer, unsigned length, const RTP_DataFrame &frame, unsigned &written) |
virtual BOOL | IsRawDataChannelNative () const |
virtual BOOL | DetectSilence () |
virtual unsigned | GetAverageSignalLevel () |
PINDEX | GetCodecTableIndex () const |
Protected Attributes | |
PINDEX | codecTableIndex |
unsigned | packetSize |
unsigned | missedCount |
BYTE | lastSID [4] |
BOOL | lastFrameWasSignal |
|
Create a new LID based codec.
|
|
Check frame for a talk burst. This does the deadband calculations on the average signal levels returned by the GetAverageSignalLevel() function and based on the levelThreshold, signalDeadbandFrames and silenceDeadbandFrames member variables. Reimplemented from H323AudioCodec. |
|
Calculate the energy in the audio stream. This is called from within DetectSilence() to calculate the average energy since the last call to DetectSilence(). Reimplemented from H323AudioCodec. |
|
|
|
Return flag indicating raw channel is native. For audio codecs, FALSE typically means that the format is PCM-16. For video codecs, FALSE typically means that the format is YUV411P. The default behaviour returns TRUE. Reimplemented from H323Codec. |
|
Encode the data from the appropriate device. This will encode a frame of data for transmission. The exact size and description of the data placed in the buffer is codec dependent but should be less than H323Capability::GetTxFramesInPacket() * OpalMediaFormat::GetFrameSize() in length. The length parameter is filled with the actual length of the encoded data, often this will be the same as the size parameter. This function is called every GetFrameRate() timestamp units, so MUST take less than (or equal to) that amount of time to complete! Note that a returned length of zero indicates that time has passed but there is no data encoded. This is typically used for silence detection in an audio codec.
Implements H323Codec. |
|
Decode the data and output it to appropriate device. This will decode a single frame of received data. The exact size and description of the data required in the buffer is codec dependent but should be less than H323Capability::GetRxFramesInPacket() * OpalMediaFormat::GetFrameSize() in length. It is expected this function anunciates the data. That is, for example with audio data, the sound is output on a speaker. This function is called every GetFrameRate() timestamp units, so MUST take less than that amount of time to complete!
Implements H323Codec. |
|
|
|
|
|
|
|
|
|
|