class H323FramedAudioCodec |
This class defines a codec class that will use the standard platform PCM output device, and the encoding/decoding has fixed blocks.
![]() | H323FramedAudioCodec ( const char* mediaFormat, Direction direction ) Create a new audio codec. |
![]() | Read ( BYTE* buffer, unsigned & length, RTP_DataFrame & rtpFrame ) Encode the data from the appropriate device. |
![]() | Write ( const BYTE* buffer, unsigned length, const RTP_DataFrame & rtpFrame, unsigned & written ) Decode the data and output it to appropriate device. |
![]() | GetAverageSignalLevel () Get the average signal level in the audio stream. |
![]() | EncodeFrame ( BYTE* buffer, unsigned & length ) Encode a sample block into the buffer specified. |
![]() | DecodeFrame ( const BYTE* buffer, unsigned length, unsigned & written ) Decode a sample block from the buffer specified. |
This class defines a codec class that will use the standard platform PCM output device, and the encoding/decoding has fixed blocks. That is each input block of n samples is encoded to exactly the same sized compressed data, eg G.711, GSM etc.An application may create a descendent off this class and override functions as required for descibing a specific codec.
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.
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!
Alphabetic index HTML hierarchy of classes or Java