H323_H261Codec Class Reference

#include <h261codec.h>

Inheritance diagram for H323_H261Codec:

H323VideoCodec H323Codec

List of all members.

Public Member Functions

 H323_H261Codec (Direction direction, BOOL isqCIF)
 ~H323_H261Codec ()
virtual BOOL Read (BYTE *buffer, unsigned &length, RTP_DataFrame &rtpFrame)
virtual BOOL Write (const BYTE *buffer, unsigned length, const RTP_DataFrame &rtp, unsigned &written)
virtual unsigned GetFrameRate () const
void SetTxQualityLevel (int qLevel)
void SetTxMinQuality (int qlevel)
void SetTxMaxQuality (int qlevel)
void SetBackgroundFill (int fillLevel)
virtual void OnFastUpdatePicture ()
virtual void OnLostPartialPicture ()
virtual void OnLostPicture ()

Protected Member Functions

BOOL Resize (int width, int height)
BOOL Redraw ()
BOOL RenderFrame ()

Protected Attributes

BOOL doFastUpdate
PMutex fastUpdateMutex
P64Decoder * videoDecoder
P64Encoder * videoEncoder
int now
BYTE * rvts
int ndblk
int nblk
unsigned timestampDelta


Detailed Description

This class is a H.261 video codec.

Constructor & Destructor Documentation

H323_H261Codec::H323_H261Codec ( Direction  direction,
BOOL  isqCIF 
)

Create a new H261 video codec

Parameters:
direction  Direction in which this instance runs

H323_H261Codec::~H323_H261Codec (  ) 


Member Function Documentation

virtual BOOL H323_H261Codec::Read ( BYTE *  buffer,
unsigned &  length,
RTP_DataFrame rtpFrame 
) [virtual]

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

The length parameter is filled with the actual length of the encoded data, often this will be the same as the size parameter.

This function is called every GetFrameRate() timestamp units, so MUST take less than (or equal to) that amount of time to complete!

Note that 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.

Parameters:
buffer  Buffer of encoded data
length  Actual length of encoded data buffer
rtpFrame  RTP data frame

Implements H323Codec.

virtual BOOL H323_H261Codec::Write ( const BYTE *  buffer,
unsigned  length,
const RTP_DataFrame rtp,
unsigned &  written 
) [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 less than H323Capability::GetRxFramesInPacket() * 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!

Parameters:
buffer  Buffer of encoded data
length  Length of encoded data buffer
rtp  RTP data frame
written  Number of bytes used from data buffer

Implements H323Codec.

virtual unsigned H323_H261Codec::GetFrameRate (  )  const [inline, virtual]

Get the frame rate in RTP timestamp units.

Reimplemented from H323Codec.

References timestampDelta.

void H323_H261Codec::SetTxQualityLevel ( int  qLevel  )  [virtual]

Set the quality level of transmitted video data. Is irrelevant when this codec is used to receive video data. Has a value of 1 (good quality) to 31 (poor quality). Quality is improved at the expense of bit rate.

Reimplemented from H323VideoCodec.

void H323_H261Codec::SetTxMinQuality ( int  qlevel  )  [virtual]

Minimum quality limit for the transmitted video. Default is 1. Encode quality will not be set below this value.

Reimplemented from H323VideoCodec.

void H323_H261Codec::SetTxMaxQuality ( int  qlevel  )  [virtual]

Maximum quality limit for the transmitted video. Default is 24. Encode quality will not be set above this value.

Reimplemented from H323VideoCodec.

void H323_H261Codec::SetBackgroundFill ( int  fillLevel  )  [virtual]

Set the number of blocks in the background that need to be transmitted with each frame

Reimplemented from H323VideoCodec.

virtual void H323_H261Codec::OnFastUpdatePicture (  )  [virtual]

Process a FastUpdatePicture command from remote endpoint. The default behaviour does nothing.

Reimplemented from H323VideoCodec.

virtual void H323_H261Codec::OnLostPartialPicture (  )  [virtual]

Process a request for a new frame, as part of the picture has been lost.

Reimplemented from H323VideoCodec.

virtual void H323_H261Codec::OnLostPicture (  )  [virtual]

Process a request for a new frame, as all of the picture has been lost.

Reimplemented from H323VideoCodec.

BOOL H323_H261Codec::Resize ( int  width,
int  height 
) [protected]

BOOL H323_H261Codec::Redraw (  )  [protected]

BOOL H323_H261Codec::RenderFrame (  )  [protected]


Member Data Documentation

BOOL H323_H261Codec::doFastUpdate [protected]

PMutex H323_H261Codec::fastUpdateMutex [protected]

P64Decoder* H323_H261Codec::videoDecoder [protected]

P64Encoder* H323_H261Codec::videoEncoder [protected]

int H323_H261Codec::now [protected]

BYTE* H323_H261Codec::rvts [protected]

int H323_H261Codec::ndblk [protected]

int H323_H261Codec::nblk [protected]

unsigned H323_H261Codec::timestampDelta [protected]

Referenced by GetFrameRate().


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

Generated on Mon Aug 11 09:30:42 2008 for OpenH323 by  doxygen 1.5.6