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

#include <VideoPlayer.h>

Inherits VideoPlayerInterface.

Inherited by BinkVideoPlayer.

Public Member Functions

virtual void init (void)
 Initialize video playback code.
 
virtual void reset (void)
 Reset video playback.
 
virtual void update (void)
 Services all audio tasks. Should be called frequently.
 
virtual void deinit (void)
 Close down player.
 
 VideoPlayer ()
 
 ~VideoPlayer ()
 
virtual void loseFocus (void)
 Should be called when application loses focus.
 
virtual void regainFocus (void)
 Should be called when application regains focus.
 
virtual VideoStreamInterfaceopen (AsciiString movieTitle)
 Open video file for playback.
 
virtual VideoStreamInterfaceload (AsciiString movieTitle)
 Load video file in to memory for playback.
 
virtual VideoStreamInterfacefirstStream (void)
 Return the first open/loaded video stream.
 
virtual void closeAllStreams (void)
 Close all open streams.
 
virtual void addVideo (Video *videoToAdd)
 Add a video to the list of videos we can play.
 
virtual void removeVideo (Video *videoToRemove)
 Remove a video to the list of videos we can play.
 
virtual Int getNumVideos (void)
 Retrieve info about the number of videos currently listed.
 
virtual const VideogetVideo (AsciiString movieTitle)
 Retrieve info about a movie based on internal name.
 
virtual const VideogetVideo (Int index)
 Retrieve info about a movie based on index.
 
virtual const FieldParsegetFieldParse (void) const
 Return the field parse info.
 
virtual void notifyVideoPlayerOfNewProvider (Bool nowHasValid)
 Notify the video player that they can now ask for an audio handle, or they need to give theirs up.
 
void remove (VideoStream *stream)
 remove stream from active list
 
- Public Member Functions inherited from VideoPlayerInterface
virtual ~VideoPlayerInterface ()
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Attributes

VecVideo mVideosAvailableForPlay
 
VideoStreamm_firstStream
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Static Protected Attributes

static const FieldParse m_videoFieldParseTable []
 

Detailed Description

Common video playback code.

Definition at line 268 of file VideoPlayer.h.

Constructor & Destructor Documentation

◆ VideoPlayer()

VideoPlayer::VideoPlayer ( )

Definition at line 157 of file VideoPlayer.cpp.

◆ ~VideoPlayer()

VideoPlayer::~VideoPlayer ( )

Definition at line 167 of file VideoPlayer.cpp.

Member Function Documentation

◆ addVideo()

void VideoPlayer::addVideo ( Video * videoToAdd)
virtual

Add a video to the list of videos we can play.

Implements VideoPlayerInterface.

Definition at line 313 of file VideoPlayer.cpp.

◆ closeAllStreams()

void VideoPlayer::closeAllStreams ( void )
virtual

Close all open streams.

Implements VideoPlayerInterface.

Definition at line 272 of file VideoPlayer.cpp.

◆ deinit()

void VideoPlayer::deinit ( void )
virtual

Close down player.

Implements VideoPlayerInterface.

Reimplemented in BinkVideoPlayer.

Definition at line 193 of file VideoPlayer.cpp.

◆ firstStream()

VideoStreamInterface * VideoPlayer::firstStream ( void )
virtual

Return the first open/loaded video stream.

Implements VideoPlayerInterface.

Definition at line 263 of file VideoPlayer.cpp.

◆ getFieldParse()

virtual const FieldParse * VideoPlayer::getFieldParse ( void ) const
inlinevirtual

Return the field parse info.

Implements VideoPlayerInterface.

Definition at line 302 of file VideoPlayer.h.

◆ getNumVideos()

Int VideoPlayer::getNumVideos ( void )
virtual

Retrieve info about the number of videos currently listed.

Implements VideoPlayerInterface.

Definition at line 342 of file VideoPlayer.cpp.

◆ getVideo() [1/2]

const Video * VideoPlayer::getVideo ( AsciiString movieTitle)
virtual

Retrieve info about a movie based on internal name.

Implements VideoPlayerInterface.

Definition at line 350 of file VideoPlayer.cpp.

◆ getVideo() [2/2]

const Video * VideoPlayer::getVideo ( Int index)
virtual

Retrieve info about a movie based on index.

Implements VideoPlayerInterface.

Definition at line 363 of file VideoPlayer.cpp.

◆ init()

void VideoPlayer::init ( void )
virtual

Initialize video playback code.

Implements VideoPlayerInterface.

Reimplemented in BinkVideoPlayer.

Definition at line 180 of file VideoPlayer.cpp.

◆ load()

VideoStreamInterface * VideoPlayer::load ( AsciiString movieTitle)
virtual

Load video file in to memory for playback.

Implements VideoPlayerInterface.

Reimplemented in BinkVideoPlayer.

Definition at line 254 of file VideoPlayer.cpp.

◆ loseFocus()

void VideoPlayer::loseFocus ( void )
virtual

Should be called when application loses focus.

Implements VideoPlayerInterface.

Reimplemented in BinkVideoPlayer.

Definition at line 227 of file VideoPlayer.cpp.

◆ notifyVideoPlayerOfNewProvider()

virtual void VideoPlayer::notifyVideoPlayerOfNewProvider ( Bool nowHasValid)
inlinevirtual

Notify the video player that they can now ask for an audio handle, or they need to give theirs up.

Implements VideoPlayerInterface.

Reimplemented in BinkVideoPlayer.

Definition at line 304 of file VideoPlayer.h.

◆ open()

VideoStreamInterface * VideoPlayer::open ( AsciiString movieTitle)
virtual

Open video file for playback.

Implements VideoPlayerInterface.

Reimplemented in BinkVideoPlayer.

Definition at line 245 of file VideoPlayer.cpp.

◆ regainFocus()

void VideoPlayer::regainFocus ( void )
virtual

Should be called when application regains focus.

Implements VideoPlayerInterface.

Reimplemented in BinkVideoPlayer.

Definition at line 236 of file VideoPlayer.cpp.

◆ remove()

void VideoPlayer::remove ( VideoStream * stream)

remove stream from active list

Definition at line 286 of file VideoPlayer.cpp.

◆ removeVideo()

void VideoPlayer::removeVideo ( Video * videoToRemove)
virtual

Remove a video to the list of videos we can play.

Implements VideoPlayerInterface.

Definition at line 329 of file VideoPlayer.cpp.

◆ reset()

void VideoPlayer::reset ( void )
virtual

Reset video playback.

Implements VideoPlayerInterface.

Reimplemented in BinkVideoPlayer.

Definition at line 201 of file VideoPlayer.cpp.

◆ update()

void VideoPlayer::update ( void )
virtual

Services all audio tasks. Should be called frequently.

Implements VideoPlayerInterface.

Reimplemented in BinkVideoPlayer.

Definition at line 210 of file VideoPlayer.cpp.

Member Data Documentation

◆ m_firstStream

VideoStream* VideoPlayer::m_firstStream
protected

Definition at line 272 of file VideoPlayer.h.

◆ m_videoFieldParseTable

const FieldParse VideoPlayer::m_videoFieldParseTable
staticprotected
Initial value:
=
{
{ "Filename", INI::parseAsciiString, NULL, offsetof( Video, m_filename) },
{ "Comment", INI::parseAsciiString, NULL, offsetof( Video, m_commentForWB) },
{ NULL, NULL, NULL, 0 },
}
#define NULL
Definition BaseType.h:92
static void parseAsciiString(INI *ini, void *instance, void *store, const void *userData)
Definition INI.cpp:653

Definition at line 506 of file VideoPlayer.h.

◆ mVideosAvailableForPlay

VecVideo VideoPlayer::mVideosAvailableForPlay
protected

Definition at line 271 of file VideoPlayer.h.


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