Drag[en]gine Game Engine  1.0
deVideoPlayer Class Reference

Play back video resources. More...

#include <deVideoPlayer.h>

Inheritance diagram for deVideoPlayer:
deResource deObject

Public Types

enum  sPlayState { epsStopped, epsPlaying, epsPaused }
 Play state. More...
 

Public Member Functions

Management
deVideoGetVideo () const
 Video or NULL if not set. More...
 
void SetVideo (deVideo *video)
 Set video or NULL if not set. More...
 
bool GetLooping () const
 Video is looping instead of being played back once. More...
 
void SetLooping (bool looping)
 Set if video is looping instead of being played back once. More...
 
float GetPlayFrom () const
 Start play position in seconds. More...
 
float GetPlayTo () const
 End play position in seconds. More...
 
void SetPlayRange (float fromTime, float toTime)
 Set play range. More...
 
float GetPlaySpeed () const
 Play speed. More...
 
void SetPlaySpeed (float playSpeed)
 Set play speed. More...
 
float GetPlayPosition () const
 Current play position in seconds. More...
 
void SetPlayPosition (float position)
 Set current play position in seconds. More...
 
sPlayState GetPlayState () const
 play state. More...
 
bool GetPlaying () const
 Video is playing back. More...
 
bool GetPaused () const
 Video is paused. More...
 
bool GetStopped () const
 Video is stopped. More...
 
void SetPlayState (sPlayState playState)
 Set play state. More...
 
void Play ()
 Start playing back if not already playing back. More...
 
void Stop ()
 Stops playing back if not stopped. More...
 
void Pause ()
 Pause playing back if not paused. More...
 
void Update (float elapsed)
 Update video player. More...
 
Graphic System
deBaseVideoDecoderGetDecoder () const
 Video decoder or NULL if not present. More...
 
void ObtainDecoder ()
 Obtain video decoder if decoder is absent. More...
 
void ReleaseDecoder ()
 Release video decoder if decoder is present. More...
 
System Peers
deBaseGraphicVideoPlayerGetGraphicPeer () const
 Graphic system peer. More...
 
void SetGraphicPeer (deBaseGraphicVideoPlayer *peer)
 Set graphic system peer. 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

 deVideoPlayer (deVideoPlayerManager *manager)
 Create video player. More...
 
virtual ~deVideoPlayer ()
 Clean up video player. More...
 

Additional Inherited Members

- 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

Play back video resources.

Video sources can be streaming or non-streaming at the discretion of the graphic module. The graphic module can obtain and release a decoder for the video player to retrieve video frames. The decoder is to be used by the graphic module only and can be freed any time by the graphic module.

Member Enumeration Documentation

◆ sPlayState

Play state.

Enumerator
epsStopped 

Playback is stopped.

epsPlaying 

Video is being played back.

epsPaused 

Playback is paused.

Constructor & Destructor Documentation

◆ deVideoPlayer()

deVideoPlayer::deVideoPlayer ( deVideoPlayerManager manager)

Create video player.

◆ ~deVideoPlayer()

virtual deVideoPlayer::~deVideoPlayer ( )
protectedvirtual

Clean up video player.

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

◆ GetDecoder()

deBaseVideoDecoder* deVideoPlayer::GetDecoder ( ) const
inline

Video decoder or NULL if not present.

References ObtainDecoder(), and ReleaseDecoder().

◆ GetGraphicPeer()

deBaseGraphicVideoPlayer* deVideoPlayer::GetGraphicPeer ( ) const
inline

Graphic system peer.

References SetGraphicPeer().

◆ GetLooping()

bool deVideoPlayer::GetLooping ( ) const
inline

Video is looping instead of being played back once.

References SetLooping().

◆ GetPaused()

bool deVideoPlayer::GetPaused ( ) const
inline

Video is paused.

References epsPaused.

◆ GetPlayFrom()

float deVideoPlayer::GetPlayFrom ( ) const
inline

Start play position in seconds.

◆ GetPlaying()

bool deVideoPlayer::GetPlaying ( ) const
inline

Video is playing back.

References epsPlaying.

◆ GetPlayPosition()

float deVideoPlayer::GetPlayPosition ( ) const
inline

Current play position in seconds.

References SetPlayPosition().

◆ GetPlaySpeed()

float deVideoPlayer::GetPlaySpeed ( ) const
inline

Play speed.

References SetPlaySpeed().

◆ GetPlayState()

sPlayState deVideoPlayer::GetPlayState ( ) const
inline

play state.

◆ GetPlayTo()

float deVideoPlayer::GetPlayTo ( ) const
inline

End play position in seconds.

References SetPlayRange().

◆ GetStopped()

bool deVideoPlayer::GetStopped ( ) const
inline

Video is stopped.

References epsStopped, Pause(), Play(), SetPlayState(), Stop(), and Update().

◆ GetVideo()

deVideo* deVideoPlayer::GetVideo ( ) const
inline

Video or NULL if not set.

References SetVideo().

◆ ObtainDecoder()

void deVideoPlayer::ObtainDecoder ( )

Obtain video decoder if decoder is absent.

Referenced by GetDecoder().

◆ Pause()

void deVideoPlayer::Pause ( )

Pause playing back if not paused.

Referenced by GetStopped().

◆ Play()

void deVideoPlayer::Play ( )

Start playing back if not already playing back.

Referenced by GetStopped().

◆ ReleaseDecoder()

void deVideoPlayer::ReleaseDecoder ( )

Release video decoder if decoder is present.

Referenced by GetDecoder().

◆ SetGraphicPeer()

void deVideoPlayer::SetGraphicPeer ( deBaseGraphicVideoPlayer peer)

Set graphic system peer.

Referenced by GetGraphicPeer().

◆ SetLooping()

void deVideoPlayer::SetLooping ( bool  looping)

Set if video is looping instead of being played back once.

Referenced by GetLooping().

◆ SetPlayPosition()

void deVideoPlayer::SetPlayPosition ( float  position)

Set current play position in seconds.

Referenced by GetPlayPosition().

◆ SetPlayRange()

void deVideoPlayer::SetPlayRange ( float  fromTime,
float  toTime 
)

Set play range.

Referenced by GetPlayTo().

◆ SetPlaySpeed()

void deVideoPlayer::SetPlaySpeed ( float  playSpeed)

Set play speed.

Referenced by GetPlaySpeed().

◆ SetPlayState()

void deVideoPlayer::SetPlayState ( sPlayState  playState)

Set play state.

Referenced by GetStopped().

◆ SetVideo()

void deVideoPlayer::SetVideo ( deVideo video)

Set video or NULL if not set.

Referenced by GetVideo().

◆ Stop()

void deVideoPlayer::Stop ( )

Stops playing back if not stopped.

Referenced by GetStopped().

◆ Update()

void deVideoPlayer::Update ( float  elapsed)

Update video player.

Advances the play position if playing back.

Referenced by GetStopped().


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