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

G7231_File_Codec Class Reference

#include <opalvxml.h>

Inheritance diagram for G7231_File_Codec:

H323AudioCodec H323Codec List of all members.

Public Member Functions

 G7231_File_Codec (Direction dir)
unsigned GetBandwidth () const
BOOL Read (BYTE *buffer, unsigned &length, RTP_DataFrame &)
BOOL Write (const BYTE *buffer, unsigned length, const RTP_DataFrame &rtp, unsigned &frames)
BOOL IsRawDataChannelNative () const
unsigned GetAverageSignalLevel ()

Static Public Member Functions

static int GetFrameLen (int val)

Protected Attributes

int lastFrameLen

Constructor & Destructor Documentation

G7231_File_Codec::G7231_File_Codec Direction  dir  ) 
 


Member Function Documentation

unsigned G7231_File_Codec::GetAverageSignalLevel  )  [virtual]
 

Get the average signal level in the audio stream. This is called from within DetectSilence() to calculate the average signal level since the last call to DetectSilence().

The default behaviour returns UINT_MAX which disables the silence detection algorithm.

Reimplemented from H323AudioCodec.

unsigned G7231_File_Codec::GetBandwidth  )  const
 

static int G7231_File_Codec::GetFrameLen int  val  )  [static]
 

BOOL G7231_File_Codec::IsRawDataChannelNative  )  const [virtual]
 

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 FALSE.

Reimplemented from H323Codec.

BOOL G7231_File_Codec::Read BYTE *  buffer,
unsigned &  length,
RTP_DataFrame
[virtual]
 

Encode the data from the appropriate device. This will encode data for transmission. The exact size and description of the data placed in the buffer is codec dependent but should be less than OpalMediaFormat::GetFrameSize() in length.

The length parameter is filled with the actual length of the encoded data, often this will be the same as OpalMediaFormat::GetFrameSize().

This function is called every GetFrameRate() timestamp units, so MUST take less than (or equal to) that amount of time to complete. It should always return the amount of data that corresponds to the GetFrameRate() timestamp units as well.

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.

BOOL G7231_File_Codec::Write const BYTE *  buffer,
unsigned  length,
const RTP_DataFrame rtp,
unsigned &  frames
[virtual]
 

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 at least than 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.


Member Data Documentation

int G7231_File_Codec::lastFrameLen [protected]
 


The documentation for this class was generated from the following file:
Generated on Sat Mar 5 14:59:13 2005 for OpenH323 by  doxygen 1.4.1