OPAL  Version 3.14.3
IAX2MiniFrame Class Reference

#include <frame.h>

Inheritance diagram for IAX2MiniFrame:
Collaboration diagram for IAX2MiniFrame:

Public Member Functions

 IAX2MiniFrame (const IAX2Frame &srcFrame)
 
 IAX2MiniFrame (IAX2EndPoint &_endpoint)
 
 IAX2MiniFrame (IAX2Processor *con, PBYTEArray &sound, PBoolean isAudio, DWORD usersTimeStamp=0)
 
virtual ~IAX2MiniFrame ()
 
virtual PBoolean ProcessNetworkPacket ()
 
virtual PBoolean WriteHeader ()
 
virtual void PrintOn (ostream &strm) const
 
virtual BYTE * GetMediaDataPointer ()
 
virtual PINDEX GetMediaDataSize ()
 
void AlterTimeStamp (PINDEX newValue)
 
virtual void InitialiseHeader (IAX2Processor *processor)
 
virtual PINDEX GetEncryptionOffset ()
 
- Public Member Functions inherited from IAX2Frame
 IAX2Frame (IAX2EndPoint &_endpoint)
 
virtual ~IAX2Frame ()
 
PBoolean ReadNetworkPacket (PUDPSocket &sock)
 
virtual PBoolean IsFullFrame ()
 
PBoolean IsVideo () const
 
PBoolean IsAudio () const
 
PINDEX DataSize ()
 
IAX2RemoteGetRemoteInfo ()
 
const BYTE * GetDataPointer ()
 
IAX2FrameBuildAppropriateFrameType (IAX2Encryption &encryptionInfo)
 
IAX2FrameBuildAppropriateFrameType ()
 
PINDEX GetUnReadBytes ()
 
virtual PBoolean TransmitPacket (PUDPSocket &sock)
 
virtual void BuildTimeStamp (const PTimeInterval &callStartTick)
 
IAX2EndPointGetEndpoint ()
 
PString IdString () const
 
DWORD GetTimeStamp ()
 
void SetTimeStamp (DWORD newValue)
 
virtual PBoolean CallMustBeActive ()
 
IAX2FrameType GetFrameType ()
 
PBoolean CanRetransmitFrame () const
 
PString GetConnectionToken () const
 
void SetConnectionToken (PString newToken)
 
void BuildConnectionToken ()
 
PBoolean EncryptContents (IAX2Encryption &encData)
 

Protected Member Functions

void ZeroAllValues ()
 
- 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 ()
 

Additional Inherited Members

- 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
}
 
- Static Public Member Functions inherited from IAX2Frame
static DWORD CalcTimeStamp (const PTimeInterval &callStartTick)
 
- 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

Class to manage a mini frame, which is sent unreliable to the remote endpoint

Constructor & Destructor Documentation

IAX2MiniFrame::IAX2MiniFrame ( const IAX2Frame srcFrame)

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

IAX2MiniFrame::IAX2MiniFrame ( IAX2EndPoint _endpoint)

Construction from an endpoint, to create an empty frame.

IAX2MiniFrame::IAX2MiniFrame ( IAX2Processor con,
PBYTEArray &  sound,
PBoolean  isAudio,
DWORD  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.

TimeStamp will be calculated from time since call started, if the users timestamp is 0. If the users timeStamp is non zero, the frames timestamp will be this.

virtual IAX2MiniFrame::~IAX2MiniFrame ( )
virtual

Destructor

Member Function Documentation

void IAX2MiniFrame::AlterTimeStamp ( PINDEX  newValue)

Fix the timestamp in this class, after being shrunk in the MiniFrames

virtual PINDEX IAX2MiniFrame::GetEncryptionOffset ( )
virtual

Get the offset to the beginning of the encrypted region

Reimplemented from IAX2Frame.

virtual BYTE* IAX2MiniFrame::GetMediaDataPointer ( )
virtual

Pointer to the beginning of the media (after the header) in this packet

Reimplemented from IAX2Frame.

virtual PINDEX IAX2MiniFrame::GetMediaDataSize ( )
virtual

Number of bytes in the media section of this packet.

Reimplemented from IAX2Frame.

virtual void IAX2MiniFrame::InitialiseHeader ( IAX2Processor processor)
virtual

Given the supplied Connection class, write the first 12 bytes of the frame. This method is called by the frame constructors, in preparation for transmission. This method is never called when processing a received frame.

Whenever a frame is transmitted, this method will be called.

Reimplemented from IAX2Frame.

virtual void IAX2MiniFrame::PrintOn ( ostream &  strm) const
virtual

Pretty print this frame data to the designated stream

Reimplemented from IAX2Frame.

virtual PBoolean IAX2MiniFrame::ProcessNetworkPacket ( )
virtual

Process the incoming frame some more, but process it as this frame type demands

Reimplemented from IAX2Frame.

virtual PBoolean IAX2MiniFrame::WriteHeader ( )
virtual

Write the header to the internal data area

Reimplemented from IAX2Frame.

void IAX2MiniFrame::ZeroAllValues ( )
protected

Initialise valus in this class to some preset value


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