Drag[en]gine Game Engine  1.21
deVideo Class Reference

Video class. More...

#include <deVideo.h>

Inheritance diagram for deVideo:
deFileResource deResource deObject

Public Types

typedef deTObjectReference< deVideoRef
 Type holding strong reference. More...
 
- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

Public Member Functions

Management
int GetWidth () const
 Width in pixels. More...
 
int GetHeight () const
 Height in pixels. More...
 
int GetComponentCount () const
 Component count. More...
 
int GetFrameCount () const
 Number of frames. More...
 
float GetFrameRate () const
 Frame rate. More...
 
int GetBitCount () const
 Bits per pixel. More...
 
float GetPlayTime () const
 Play time in seconds. More...
 
const decColorMatrix3GetColorConversionMatrix () const
 Color conversion matrix. More...
 
int GetBytesPerSample () const
 Bytes per sample or 0 if no audio. More...
 
int GetSampleCount () const
 Number of samples or 0 if no audio. More...
 
int GetChannelCount () const
 Number of channels or 0 if no audio. More...
 
int GetSampleRate () const
 Sample rate or 0 if no audio. More...
 
System Peers
deBaseGraphicVideoGetPeerGraphic () const
 Graphic system peer. More...
 
void SetPeerGraphic (deBaseGraphicVideo *peer)
 Set graphic system peer. More...
 
Special
void FinalizeConstruction (int width, int height, int componentCount, int bitCount, float frameRate, int frameCount, const decColorMatrix3 &colorConversionMatrix, int bytesPerSample, int sampleCount, int sampleRate, int channelCount)
 Finalize construction after asynchronous loading. More...
 
- 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...
 
TIME_SYSTEM GetModificationTime () const
 Modification time used to detect resources changing on disk while loaded. More...
 
void SetModificationTime (TIME_SYSTEM modificationTime)
 Set modification time used to detect resources changing on disk while loaded. More...
 
bool GetAsynchron () const
 Resource is asynchron. More...
 
void SetAsynchron (bool asynchron)
 Set if resource is asynchron. More...
 
bool GetOutdated () const
 
void MarkOutdated ()
 
 deFileResource (deFileResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime)
 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, TIME_SYSTEM modificationTime, int width, int height, int componentCount, int bitCount, float frameRate, int frameCount, const decColorMatrix3 &colorConversionMatrix, int bytesPerSample, int sampleCount, int sampleRate, int channelCount)
 Create video. More...
 
 deVideo (deVideoManager *manager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime)
 Create video for internal loading. More...
 
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.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

Constructor & Destructor Documentation

◆ deVideo() [1/2]

deVideo::deVideo ( deVideoManager manager,
deVirtualFileSystem vfs,
const char *  filename,
TIME_SYSTEM  modificationTime,
int  width,
int  height,
int  componentCount,
int  bitCount,
float  frameRate,
int  frameCount,
const decColorMatrix3 colorConversionMatrix,
int  bytesPerSample,
int  sampleCount,
int  sampleRate,
int  channelCount 
)

Create video.

◆ deVideo() [2/2]

deVideo::deVideo ( deVideoManager manager,
deVirtualFileSystem vfs,
const char *  filename,
TIME_SYSTEM  modificationTime 
)

Create video for internal loading.

Warning
For use by deResourceLoader only.

◆ ~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

◆ FinalizeConstruction()

void deVideo::FinalizeConstruction ( int  width,
int  height,
int  componentCount,
int  bitCount,
float  frameRate,
int  frameCount,
const decColorMatrix3 colorConversionMatrix,
int  bytesPerSample,
int  sampleCount,
int  sampleRate,
int  channelCount 
)

Finalize construction after asynchronous loading.

Warning
For use by deResourceLoader only.

◆ GetBitCount()

int deVideo::GetBitCount ( ) const
inline

Bits per pixel.

◆ GetBytesPerSample()

int deVideo::GetBytesPerSample ( ) const
inline

Bytes per sample or 0 if no audio.

◆ GetChannelCount()

int deVideo::GetChannelCount ( ) const
inline

Number of channels or 0 if no audio.

◆ GetColorConversionMatrix()

const decColorMatrix3& deVideo::GetColorConversionMatrix ( ) const
inline

Color conversion matrix.

◆ GetComponentCount()

int deVideo::GetComponentCount ( ) const
inline

Component count.

◆ GetFrameCount()

int deVideo::GetFrameCount ( ) const
inline

Number of frames.

◆ GetFrameRate()

float deVideo::GetFrameRate ( ) const
inline

Frame rate.

◆ GetHeight()

int deVideo::GetHeight ( ) const
inline

Height in pixels.

◆ GetPeerGraphic()

deBaseGraphicVideo* deVideo::GetPeerGraphic ( ) const
inline

Graphic system peer.

◆ GetPlayTime()

float deVideo::GetPlayTime ( ) const
inline

Play time in seconds.

◆ GetSampleCount()

int deVideo::GetSampleCount ( ) const
inline

Number of samples or 0 if no audio.

◆ GetSampleRate()

int deVideo::GetSampleRate ( ) const
inline

Sample rate or 0 if no audio.

◆ GetWidth()

int deVideo::GetWidth ( ) const
inline

Width in pixels.

◆ SetPeerGraphic()

void deVideo::SetPeerGraphic ( deBaseGraphicVideo peer)

Set graphic system peer.


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