Drag[en]gine Game Engine  1.0
deVideo Class Reference

Video class. More...

#include <deVideo.h>

Inheritance diagram for deVideo:
deFileResource deResource deObject

Public Types

enum  ePixelFormat { epf444, epf422, epf420, epf4444 }
 Pixel format. More...
 

Public Member Functions

Management
int GetWidth () const
 
int GetHeight () const
 
ePixelFormat GetPixelFormat () const
 
int GetFrameCount () const
 
unsigned char * GetFrameData () const
 
int GetFrameRate () const
 
float GetPlayTime () const
 
bool GetStreaming () const
 
const decColorMatrix3GetColorConversionMatrix () const
 
System Peers
deBaseGraphicVideoGetGraphicPeer () const
 
void SetGraphicPeer (deBaseGraphicVideo *peer)
 
- Public Member Functions inherited from deFileResource
deVirtualFileSystemGetVirtualFileSystem () const
 Virtual file system or NULL if build from memory. More...
 
const decStringGetFilename () const
 Filename or empty string if build from memory. More...
 
bool GetAsynchron () const
 Resource is asynchron. More...
 
void SetAsynchron (bool asynchron)
 Set if resource is asynchron. More...
 
 deFileResource (deResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename)
 Create file resource. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deVideo (deVideoManager *manager, deVirtualFileSystem *vfs, const char *filename, int width, int height, ePixelFormat pixelFormat, int frameRate, int frameCount, bool streaming, const decColorMatrix3 &colorConversionMatrix)
 
virtual ~deVideo ()
 Clean up video object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deFileResource
virtual ~deFileResource ()
 Clean up file resource. More...
 
- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Video class.

Stores a video. Videos are sequences of images used to play short videos once or in a loop. Videos can be of streaming or non-streaming type. For non-streaming videos the data is loaded into a memory buffer shared. This is the best choice for small videos which do not require a lot of memory or are used in many places. For streaming videos no memory buffer is held. Streaming videos use a Video Decoder object to retrieve the image data. This is the best choice for large videos or videos which are used only a few times. The format of the video data can be RGB or YUV. The same data structures as in the image resource can be found. For the YUV format the mapping r=y, g=u and b=v is used.

Author
Pl├╝ss Roland
Version
1.0
Date
2010

Member Enumeration Documentation

◆ ePixelFormat

Pixel format.

Enumerator
epf444 

Pixels are stored in the 4:4:4 format.

epf422 

Pixels are stored in the 4:2:2 format.

epf420 

Pixels are stored in the 4:2:0 format.

epf4444 

Pixels are stored in the 4:4:4:4 format.

Constructor & Destructor Documentation

◆ deVideo()

deVideo::deVideo ( deVideoManager manager,
deVirtualFileSystem vfs,
const char *  filename,
int  width,
int  height,
ePixelFormat  pixelFormat,
int  frameRate,
int  frameCount,
bool  streaming,
const decColorMatrix3 colorConversionMatrix 
)

Creates a new video object.

◆ ~deVideo()

virtual deVideo::~deVideo ( )
protectedvirtual

Clean up video object.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ GetColorConversionMatrix()

const decColorMatrix3& deVideo::GetColorConversionMatrix ( ) const
inline

Retrieves the color conversion matrix.

◆ GetFrameCount()

int deVideo::GetFrameCount ( ) const
inline

Retrieves the number of frames.

◆ GetFrameData()

unsigned char* deVideo::GetFrameData ( ) const
inline

Retrieves the frame data if non-streaming or NULL if streaming.

◆ GetFrameRate()

int deVideo::GetFrameRate ( ) const
inline

Retrieves the frame rate.

◆ GetGraphicPeer()

deBaseGraphicVideo* deVideo::GetGraphicPeer ( ) const
inline

Retrieves the graphic system peer.

References SetGraphicPeer().

◆ GetHeight()

int deVideo::GetHeight ( ) const
inline

Retrieves the height in pixels.

◆ GetPixelFormat()

ePixelFormat deVideo::GetPixelFormat ( ) const
inline

Retrieves the pixel format.

◆ GetPlayTime()

float deVideo::GetPlayTime ( ) const
inline

Retrieves the play time in seconds.

◆ GetStreaming()

bool deVideo::GetStreaming ( ) const
inline

Determines if the video source is a streaming video.

◆ GetWidth()

int deVideo::GetWidth ( ) const
inline

Retrieves the width in pixels.

◆ SetGraphicPeer()

void deVideo::SetGraphicPeer ( deBaseGraphicVideo peer)

Sets the graphic system peer.

Referenced by GetGraphicPeer().


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