class H323StreamedAudioCodec: public H323FramedAudioCodec

This class defines a codec class that will use the standard platform PCM output device, and the encoding/decoding is streamed.

Inheritance:


Public Methods

[more] H323StreamedAudioCodec ( const char * mediaFormat, Direction direction, unsigned samplesPerFrame, unsigned bits )
Create a new audio codec.
[more]virtual BOOL EncodeFrame ( BYTE * buffer, unsigned & length )
Encode a sample block into the buffer specified.
[more]virtual BOOL DecodeFrame ( const BYTE * buffer, unsigned length, unsigned & written )
Decode a sample block from the buffer specified.
[more]virtual int Encode (short sample) const
Encode a single sample value
[more]virtual short Decode (int sample) const
Decode a single sample value


Inherited from H323FramedAudioCodec:

Public Methods

ovirtual BOOL Read( BYTE * buffer, unsigned & length, RTP_DataFrame & rtpFrame )
ovirtual BOOL Write( const BYTE * buffer, unsigned length, const RTP_DataFrame & rtpFrame, unsigned & written )
ovirtual unsigned GetAverageSignalLevel()


Inherited from H323AudioCodec:

Public Methods

ovirtual BOOL Open( H323Connection & connection )
ovirtual void Close()
ovirtual unsigned GetFrameRate() const
ovoid SetSilenceDetectionMode( SilenceDetectionMode mode, unsigned threshold = 0, unsigned signalDeadband = 80, unsigned silenceDeadband = 3200, unsigned adaptivePeriod = 4800 )
oSilenceDetectionMode GetSilenceDetectionMode( BOOL * isInTalkBurst = NULL, unsigned * currentThreshold = NULL ) const
ovirtual BOOL DetectSilence()


Inherited from H323Codec:

Public Methods

ovirtual void OnFlowControl( long bitRateRestriction )
ovirtual void OnMiscellaneousCommand( const H245_MiscellaneousCommand_type & type )
ovirtual void OnMiscellaneousIndication( const H245_MiscellaneousIndication_type & type )
ovirtual BOOL AttachChannel( PChannel * channel, BOOL autoDelete = TRUE )
ovirtual BOOL CloseRawDataChannel()

Protected Fields

oBOOL deleteChannel


Documentation

This class defines a codec class that will use the standard platform PCM output device, and the encoding/decoding is streamed. That is each input 16 bit PCM sample is encoded to 8 bits or less of encoded data and no blocking of PCM data is required, eg G.711, G.721 etc.

An application may create a descendent off this class and override functions as required for descibing a specific codec.

o H323StreamedAudioCodec( const char * mediaFormat, Direction direction, unsigned samplesPerFrame, unsigned bits )
Create a new audio codec. This opens the standard PCM audio output device, for input and output and allows descendent codec classes to do audio I/O after decoding/encoding.
Parameters:
mediaFormat - Media format for codec
direction - Direction in which this instance runs
samplesPerFrame - Number of samples in a frame
bits - Bits per sample

ovirtual BOOL EncodeFrame( BYTE * buffer, unsigned & length )
Encode a sample block into the buffer specified. The samples have been read and are waiting in the readBuffer member variable. it is expected this function will encode exactly encodedBlockSize bytes.
Parameters:
buffer - Buffer into which encoded bytes are placed
length - Actual length of encoded data buffer

ovirtual BOOL DecodeFrame( const BYTE * buffer, unsigned length, unsigned & written )
Decode a sample block from the buffer specified. The samples must be placed into the writeBuffer member variable. It is expected that no more than frameSamples is decoded. The return value is the number of samples decoded. Zero indicates an error.
Parameters:
buffer - Buffer from which encoded data is found
length - Length of encoded data buffer
written - Number of bytes used from data buffer

ovirtual int Encode(short sample) const
Encode a single sample value

ovirtual short Decode(int sample) const
Decode a single sample value


Direct child classes:
H323_muLawCodec
H323_ALawCodec

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.