Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
VideoBuffer Class Referenceabstract

#include <VideoPlayer.h>

Inherited by W3DVideoBuffer.

Public Types

enum  Type {
  TYPE_UNKNOWN , TYPE_R8G8B8 , TYPE_X8R8G8B8 , TYPE_R5G6B5 ,
  TYPE_X1R5G5B5 , NUM_TYPES
}
 

Public Member Functions

 VideoBuffer (Type format)
 
virtual ~VideoBuffer ()
 
virtual Bool allocate (UnsignedInt width, UnsignedInt Height)=0
 Allocate buffer.
 
virtual void free (void)=0
 Free the buffer.
 
virtual void * lock (void)=0
 Returns memory pointer to start of buffer.
 
virtual void unlock (void)=0
 Release buffer.
 
virtual Bool valid (void)=0
 Is the buffer valid to use.
 
UnsignedInt xPos (void)
 
UnsignedInt yPos (void)
 X pixel offset to draw into.
 
void setPos (UnsignedInt x, UnsignedInt y)
 Y pixel offset to draw into.
 
UnsignedInt width (void)
 Set the x and y buffer offset.
 
UnsignedInt height (void)
 Returns pixel width of visible texture.
 
UnsignedInt textureWidth (void)
 Returns pixel height of visible texture.
 
UnsignedInt textureHeight (void)
 Returns pixel width of texture.
 
UnsignedInt pitch (void)
 Returns pixel height of texture.
 
Type format (void)
 Returns buffer pitch in bytes.
 
RectClass Rect (Real x1, Real y1, Real x2, Real y2)
 Returns buffer pixel format.
 

Protected Attributes

UnsignedInt m_xPos
 X pixel buffer offset.
 
UnsignedInt m_yPos
 Y pixel buffer offset.
 
UnsignedInt m_width
 Buffer visible width.
 
UnsignedInt m_height
 Buffer height.
 
UnsignedInt m_textureWidth
 Buffer visible width.
 
UnsignedInt m_textureHeight
 Buffer height.
 
UnsignedInt m_pitch
 buffer pitch
 
Type m_format
 buffer pixel format
 

Detailed Description

Video buffer interface class. The VideoPlayer uses this buffer abstraction in order to be able to render a video stream.

Definition at line 91 of file VideoPlayer.h.

Member Enumeration Documentation

◆ Type

Enumerator
TYPE_UNKNOWN 
TYPE_R8G8B8 
TYPE_X8R8G8B8 
TYPE_R5G6B5 
TYPE_X1R5G5B5 
NUM_TYPES 

Definition at line 96 of file VideoPlayer.h.

Constructor & Destructor Documentation

◆ VideoBuffer()

VideoBuffer::VideoBuffer ( Type format)

Definition at line 103 of file VideoPlayer.cpp.

◆ ~VideoBuffer()

virtual VideoBuffer::~VideoBuffer ( )
inlinevirtual

Definition at line 122 of file VideoPlayer.h.

Member Function Documentation

◆ allocate()

virtual Bool VideoBuffer::allocate ( UnsignedInt width,
UnsignedInt Height )
pure virtual

Allocate buffer.

Implemented in W3DVideoBuffer.

◆ format()

Type VideoBuffer::format ( void )
inline

Returns buffer pitch in bytes.

Definition at line 138 of file VideoPlayer.h.

◆ free()

void VideoBuffer::free ( void )
pure virtual

Free the buffer.

Implemented in W3DVideoBuffer.

Definition at line 145 of file VideoPlayer.cpp.

◆ height()

UnsignedInt VideoBuffer::height ( void )
inline

Returns pixel width of visible texture.

Definition at line 134 of file VideoPlayer.h.

◆ lock()

virtual void * VideoBuffer::lock ( void )
pure virtual

Returns memory pointer to start of buffer.

Implemented in W3DVideoBuffer.

◆ pitch()

UnsignedInt VideoBuffer::pitch ( void )
inline

Returns pixel height of texture.

Definition at line 137 of file VideoPlayer.h.

◆ Rect()

RectClass VideoBuffer::Rect ( Real x1,
Real y1,
Real x2,
Real y2 )

Returns buffer pixel format.

Definition at line 125 of file VideoPlayer.cpp.

◆ setPos()

void VideoBuffer::setPos ( UnsignedInt x,
UnsignedInt y )
inline

Y pixel offset to draw into.

Definition at line 132 of file VideoPlayer.h.

◆ textureHeight()

UnsignedInt VideoBuffer::textureHeight ( void )
inline

Returns pixel width of texture.

Definition at line 136 of file VideoPlayer.h.

◆ textureWidth()

UnsignedInt VideoBuffer::textureWidth ( void )
inline

Returns pixel height of visible texture.

Definition at line 135 of file VideoPlayer.h.

◆ unlock()

virtual void VideoBuffer::unlock ( void )
pure virtual

Release buffer.

Implemented in W3DVideoBuffer.

◆ valid()

virtual Bool VideoBuffer::valid ( void )
pure virtual

Is the buffer valid to use.

Implemented in W3DVideoBuffer.

◆ width()

UnsignedInt VideoBuffer::width ( void )
inline

Set the x and y buffer offset.

Definition at line 133 of file VideoPlayer.h.

◆ xPos()

UnsignedInt VideoBuffer::xPos ( void )
inline

Definition at line 130 of file VideoPlayer.h.

◆ yPos()

UnsignedInt VideoBuffer::yPos ( void )
inline

X pixel offset to draw into.

Definition at line 131 of file VideoPlayer.h.

Member Data Documentation

◆ m_format

Type VideoBuffer::m_format
protected

buffer pixel format

Definition at line 117 of file VideoPlayer.h.

◆ m_height

UnsignedInt VideoBuffer::m_height
protected

Buffer height.

Definition at line 112 of file VideoPlayer.h.

◆ m_pitch

UnsignedInt VideoBuffer::m_pitch
protected

buffer pitch

Definition at line 115 of file VideoPlayer.h.

◆ m_textureHeight

UnsignedInt VideoBuffer::m_textureHeight
protected

Buffer height.

Definition at line 114 of file VideoPlayer.h.

◆ m_textureWidth

UnsignedInt VideoBuffer::m_textureWidth
protected

Buffer visible width.

Definition at line 113 of file VideoPlayer.h.

◆ m_width

UnsignedInt VideoBuffer::m_width
protected

Buffer visible width.

Definition at line 111 of file VideoPlayer.h.

◆ m_xPos

UnsignedInt VideoBuffer::m_xPos
protected

X pixel buffer offset.

Definition at line 109 of file VideoPlayer.h.

◆ m_yPos

UnsignedInt VideoBuffer::m_yPos
protected

Y pixel buffer offset.

Definition at line 110 of file VideoPlayer.h.


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