Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

H323_Cu30Codec Class Reference

#include <cu30codec.h>

Inheritance diagram for H323_Cu30Codec:

H323VideoCodec H323Codec List of all members.

openh323 interface routines.

virtual BOOL Read (BYTE *buffer, unsigned &length, RTP_DataFrame &rtpFrame)
virtual BOOL Write (const BYTE *buffer, unsigned length, const RTP_DataFrame &rtp, unsigned &written)
BOOL RecordStatistics (unsigned char *src)
BOOL Resize (int width, int height)
BOOL Redraw ()
BOOL RenderFrame ()
virtual void OnLostPartialPicture ()
virtual void OnLostPicture ()

Public Member Functions

Construction
 H323_Cu30Codec (Direction direction, PString statsDir, INT _width, INT _height, INT _statsFrames)
 ~H323_Cu30Codec ()

Detailed Description

This class is a CU30 codec.


Constructor & Destructor Documentation

H323_Cu30Codec::H323_Cu30Codec Direction  direction,
PString  statsDir,
INT  _width,
INT  _height,
INT  _statsFrames
 

Create a new CU30 video codec.

Parameters:
statsDir  Direction in which this instance runs
_height  width and height for the transmitter.
_statsFrames  Number of frames to collect stats over.

H323_Cu30Codec::~H323_Cu30Codec  ) 
 


Member Function Documentation

virtual void H323_Cu30Codec::OnLostPartialPicture  )  [protected, virtual]
 

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

This request is handled by causing the transmitting video codec to send out an intra frame. Subsequent frames will be inter, inter, inter,,,,, and then an intra frame.

Reimplemented from H323VideoCodec.

virtual void H323_Cu30Codec::OnLostPicture  )  [protected, virtual]
 

In the context of the Cu30 codec, this message means "Not all the statistics fields got through." "Please resend the statistics".

Reimplemented from H323VideoCodec.

virtual BOOL H323_Cu30Codec::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.

This function grabs, displays, and compresses a video frame into into CU30 packets. Get another frame if all packets of previous frame have been sent. Get next packet on list and send that one. Render the current frame if all of its packets have been sent.

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

Implements H323Codec.

BOOL H323_Cu30Codec::RecordStatistics unsigned char *  src  ) 
 

Used to acquire statistics on this frame. Used in later h323 connections for minimising the bits required to transmit cu30 video.

BOOL H323_Cu30Codec::Redraw  )  [protected]
 

call RenderFrame() routine.

BOOL H323_Cu30Codec::RenderFrame  )  [protected]
 

Display the current frame that the encoder/decoder has in memory. Takes the address of the current frame (set in last call to encode/decode) and then call rawDataChannel->Write(). The current frame is in YUV420P format, and consists of width*height*1.5 bytes. If there is no raw data channel, return true (success).

BOOL H323_Cu30Codec::Resize int  width,
int  height
[protected]
 

Resize the internal variables to cope with a new frame size.

virtual BOOL H323_Cu30Codec::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:
length  Buffer of encoded data
rtp  Length of encoded data buffer
written  RTP data frame Number of bytes used from data buffer

Implements H323Codec.


The documentation for this class was generated from the following file:
Generated on Tue Mar 15 11:17:57 2005 for OpenH323 by  doxygen 1.4.0