#include <cu30codec.h>
Inheritance diagram for H323_Cu30Codec:
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 () |
|
Create a new CU30 video codec.
|
|
|
|
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. |
|
In the context of the Cu30 codec, this message means "Not all the statistics fields got through." "Please resend the statistics". Reimplemented from H323VideoCodec. |
|
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.
Implements H323Codec. |
|
Used to acquire statistics on this frame. Used in later h323 connections for minimising the bits required to transmit cu30 video. |
|
call RenderFrame() routine. |
|
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). |
|
Resize the internal variables to cope with a new frame size. |
|
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!
Implements H323Codec. |