OPAL  Version 3.18.8
IAX2FullFrameVoice Class Reference

#include <frame.h>

Inheritance diagram for IAX2FullFrameVoice:
Collaboration diagram for IAX2FullFrameVoice:

Public Types

enum  AudioSc {
  g7231 = 1, gsm = 2, g711ulaw = 4, g711alaw = 8,
  mp3 = 0x10, adpcm = 0x20, pcm = 0x40, lpc10 = 0x80,
  g729 = 0x100, speex = 0x200, ilbc = 0x400, supportedCodecs = 11
}
 
- Public Types inherited from IAX2FullFrame
enum  ConnectionRequired { callActive, callIrrelevant }
 
- Public Types inherited from IAX2Frame
enum  IAX2FrameType {
  undefType = 0, dtmfType = 1, voiceType = 2, videoType = 3,
  controlType = 4, nullType = 5, iax2ProtocolType = 6, textType = 7,
  imageType = 8, htmlType = 9, cngType = 10, numFrameTypes = 11
}
 

Public Member Functions

 IAX2FullFrameVoice (const IAX2Frame &srcFrame)
 
 IAX2FullFrameVoice (const IAX2FullFrame &srcFrame)
 
 IAX2FullFrameVoice (IAX2CallProcessor *processor, PBYTEArray &sound, PINDEX usersTimeStamp=0)
 
virtual ~IAX2FullFrameVoice ()
 
virtual PString GetSubClassName () const
 
virtual BYTE GetFullFrameType ()
 
- Public Member Functions inherited from IAX2FullFrame
 IAX2FullFrame (const IAX2Frame &srcFrame)
 
 IAX2FullFrame (IAX2EndPoint &_endpoint)
 
virtual ~IAX2FullFrame ()
 
PBoolean IsAckFrame ()
 
PBoolean IsPingFrame ()
 
PBoolean IsNewFrame ()
 
PBoolean IsLagRqFrame ()
 
PBoolean IsLagRpFrame ()
 
PBoolean IsPongFrame ()
 
PBoolean IsAuthReqFrame ()
 
PBoolean IsVnakFrame ()
 
PBoolean IsRegReqFrame ()
 
PBoolean IsRegAuthFrame ()
 
PBoolean IsRegAckFrame ()
 
PBoolean IsRegRelFrame ()
 
PBoolean IsRegRejFrame ()
 
PBoolean IsCallTokenFrame ()
 
PBoolean FrameIncrementsInSeqNo ()
 
virtual PBoolean IsFullFrame ()
 
PBoolean IsHangupFrame ()
 
void ZeroAllValues ()
 
virtual PBoolean ProcessNetworkPacket ()
 
virtual PBoolean TransmitPacket (PUDPSocket &sock)
 
PString GetFullFrameName () const
 
void MarkDeleteNow ()
 
void MarkVnakSendNow ()
 
virtual BYTE * GetMediaDataPointer ()
 
virtual PINDEX GetMediaDataSize ()
 
PINDEX GetSubClass () const
 
void SetSubClass (PINDEX newValue)
 
virtual PBoolean WriteHeader ()
 
void ModifyFrameHeaderSequenceNumbers (PINDEX inNo, PINDEX outNo)
 
void ModifyFrameTimeStamp (PINDEX newTimeStamp)
 
virtual PBoolean InformationElementsPresent ()
 
PBoolean SendFrameNow ()
 
PBoolean DeleteFrameNow ()
 
IAX2SequenceNumbersGetSequenceInfo ()
 
virtual void PrintOn (ostream &strm) const
 
void MarkAsResent ()
 
PBoolean operator*= (IAX2FullFrame &other)
 
virtual PINDEX GetEncryptionOffset ()
 
- Public Member Functions inherited from IAX2Frame
 IAX2Frame (IAX2EndPoint &_endpoint)
 
virtual ~IAX2Frame ()
 
PBoolean ReadNetworkPacket (PUDPSocket &sock)
 
PBoolean IsVideo () const
 
PBoolean IsAudio () const
 
PINDEX DataSize ()
 
IAX2RemoteGetRemoteInfo ()
 
const BYTE * GetDataPointer ()
 
IAX2FrameBuildAppropriateFrameType (IAX2Encryption &encryptionInfo)
 
IAX2FrameBuildAppropriateFrameType ()
 
PINDEX GetUnReadBytes ()
 
virtual void BuildTimeStamp (const PTimeInterval &callStartTick)
 
IAX2EndPointGetEndpoint ()
 
PString IdString () const
 
DWORD GetTimeStamp ()
 
void SetTimeStamp (DWORD newValue)
 
IAX2FrameType GetFrameType ()
 
PBoolean CanRetransmitFrame () const
 
PString GetConnectionToken () const
 
void SetConnectionToken (PString newToken)
 
void BuildConnectionToken ()
 
PBoolean EncryptContents (IAX2Encryption &encData)
 

Static Public Member Functions

static PString GetSubClassName (unsigned testValue)
 
static PString GetOpalNameOfCodec (PINDEX testValue)
 
static unsigned short OpalNameToIax2Value (const PString opalName)
 
- Static Public Member Functions inherited from IAX2Frame
static DWORD CalcTimeStamp (const PTimeInterval &callStartTick)
 

Additional Inherited Members

- Protected Types inherited from IAX2FullFrame
enum  RetryTime { minRetryTime = 1000, maxRetryTime = 010000, maxRetries = 3 }
 
- Protected Member Functions inherited from IAX2FullFrame
virtual PBoolean CallMustBeActive ()
 
void UnCompressSubClass (BYTE a)
 
int CompressSubClass ()
 
void ClearListFlags ()
 
virtual void InitialiseHeader (IAX2Processor *processor)
 
void OnTransmissionTimeout (PTimer &, INT)
 
- Protected Member Functions inherited from IAX2Frame
PBoolean DecryptContents (IAX2Encryption &encryption)
 
PBoolean Read1Byte (BYTE &res)
 
PBoolean Read2Bytes (PINDEX &res)
 
PBoolean Read2Bytes (WORD &res)
 
PBoolean Read4Bytes (DWORD &res)
 
void Write1Byte (BYTE newVal)
 
void Write1Byte (PINDEX newVal)
 
void Write2Bytes (PINDEX newVal)
 
void Write4Bytes (unsigned int newVal)
 
void ZeroAllValues ()
 
- Protected Attributes inherited from IAX2FullFrame
PTimer transmissionTimer
 
int subClass
 
PTimeInterval retryDelta
 
PTimeInterval timeOffset
 
PINDEX retries
 
IAX2SequenceNumbers sequence
 
PBoolean sendFrameNow
 
PBoolean deleteFrameNow
 
PBoolean packetResent
 
PBoolean callMustBeActive
 
PBoolean isAckFrame
 
- Protected Attributes inherited from IAX2Frame
IAX2Remote remote
 
IAX2FrameType frameType
 
IAX2EndPointendpoint
 
PBYTEArray data
 
PBoolean isFullFrame
 
PBoolean isVideo
 
PBoolean isAudio
 
PINDEX currentReadIndex
 
PINDEX currentWriteIndex
 
DWORD timeStamp
 
PBoolean canRetransmitFrame
 
PString connectionToken
 
DWORD presetTimeStamp
 

Detailed Description

Used for transmitting voice packets in a relaible fashion. Typically, one is sent at the start of the call, and then at regular intervals in the call to keep the timestamps in sync.

This class has the ability to build audio codecs, and report on available formats.

The contents the data section is the compressed audio frame.

Member Enumeration Documentation

enum comtaining the possible (uncompressed) subclass value for these voice frames

Enumerator
g7231 

G.723.1 audio format in this frame

gsm 

GSM audio format in this frame

g711ulaw 

G.711 uLaw audio format in this frame

g711alaw 

G.711 ALaw audio format in this frame

mp3 

MPeg 3 audio format in this frame

adpcm 

ADPCM audio format in this frame

pcm 

PCM audio format in this frame

lpc10 

LPC10 audio format in this frame

g729 

G.729 audio format in this frame

speex 

Speex audio format in this frame

ilbc 

ILBC audio format in this frame

supportedCodecs 

The number of codecs defined by this enum

Constructor & Destructor Documentation

IAX2FullFrameVoice::IAX2FullFrameVoice ( const IAX2Frame srcFrame)

Construction from a supplied dataframe. In this case, this class is filled from an incoming data packet

IAX2FullFrameVoice::IAX2FullFrameVoice ( const IAX2FullFrame srcFrame)

Construction from a supplied dataframe. In this case, this class is filled from an incoming data packet

IAX2FullFrameVoice::IAX2FullFrameVoice ( IAX2CallProcessor processor,
PBYTEArray &  sound,
PINDEX  usersTimeStamp = 0 
)

Construction from an encoded audio array (stored in a PBYTEArray), in preparation to sending to remote node. The constructor will not delete the supplied PBYTEArray structure.

The full frame will use the specified timeStamp, if it is > 0. If the specified timeStamp == 0, the timeStamp will be calculated from when the call started.

virtual IAX2FullFrameVoice::~IAX2FullFrameVoice ( )
virtual

Declare an empty destructor

Member Function Documentation

virtual BYTE IAX2FullFrameVoice::GetFullFrameType ( )
inlinevirtual

Return the IAX2FullFrame type represented here (voice, protocol, session etc

Reimplemented from IAX2FullFrame.

References IAX2Frame::voiceType.

static PString IAX2FullFrameVoice::GetOpalNameOfCodec ( PINDEX  testValue)
static

Get text description of the subclass contents, given the supplied argument. The name returned is that recoginised by the OPAL library.

virtual PString IAX2FullFrameVoice::GetSubClassName ( ) const
virtual

Get text description of the subclass contents

Reimplemented from IAX2FullFrame.

static PString IAX2FullFrameVoice::GetSubClassName ( unsigned  testValue)
static

Get text description of the subclass contents, given the supplied argument

static unsigned short IAX2FullFrameVoice::OpalNameToIax2Value ( const PString  opalName)
static

Turn the OPAL string (which describes the codec) into a AudioSc value. If there is no conversion found, return 0.


The documentation for this class was generated from the following file: