IPlayer Class Referenceabstract

The main player classA player is responsible for the playback of a specific scenario. This player scenario is provided at initialisation stage and should not be changed until the player terminates. The player idea of calling a "play" function forces the use of threads in order to avoid CPU locking. Thus we prefer the idea of having a "short-time" function that is to be called repeatedly until the player terminates. This is the role of the IPlayer::loop function, that should be called repeatedly by the outside application. More...

Inherits IKernelObject.

Inherited by TKernelObject< OpenViBE::Kernel::IPlayer >.

Public Member Functions

virtual OpenViBE::boolean stop (void)=0
 Stops player execution. More...
 
virtual OpenViBE::boolean pause (void)=0
 Pauses player execution. More...
 
virtual OpenViBE::boolean step (void)=0
 Executes one more step and pauses. More...
 
virtual OpenViBE::boolean play (void)=0
 Makes player run normal speed. More...
 
virtual OpenViBE::boolean forward (void)=0
 Makes player run as fast as possible. More...
 
virtual
OpenViBE::Kernel::EPlayerStatus 
getStatus (void) const =0
 Gets current player status. More...
 
virtual OpenViBE::boolean loop (const OpenViBE::uint64 ui64ElapsedTime)=0
 "short time" function to be called repeatedly by the outstide application More...
 

Detailed Description

The main player class

A player is responsible for the playback of a specific scenario. This player scenario is provided at initialisation stage and should not be changed until the player terminates. The player idea of calling a "play" function forces the use of threads in order to avoid CPU locking. Thus we prefer the idea of having a "short-time" function that is to be called repeatedly until the player terminates. This is the role of the IPlayer::loop function, that should be called repeatedly by the outside application.

Author
Yann Renard (INRIA/IRISA)
Date
2006-09-26
Todo:
Refactor this base class to propose an interface more OpenViBE compliant (use IDs, intialize/unitialize pairs etc...)

Member Function Documentation

virtual OpenViBE::boolean stop ( void  )
pure virtual

Stops player execution.

Returns
true in case of success.
false in case of error.
virtual OpenViBE::boolean pause ( void  )
pure virtual

Pauses player execution.

Returns
true in case of success.
false in case of error.
virtual OpenViBE::boolean step ( void  )
pure virtual

Executes one more step and pauses.

Returns
true in case of success.
false in case of error.
virtual OpenViBE::boolean play ( void  )
pure virtual

Makes player run normal speed.

Returns
true in case of success.
false in case of error.
virtual OpenViBE::boolean forward ( void  )
pure virtual

Makes player run as fast as possible.

Returns
true in case of success.
false in case of error.
virtual OpenViBE::Kernel::EPlayerStatus getStatus ( void  ) const
pure virtual

Gets current player status.

Returns
current player status
virtual OpenViBE::boolean loop ( const OpenViBE::uint64  ui64ElapsedTime)
pure virtual

"short time" function to be called repeatedly by the outstide application

Parameters
ui64ElapsedTime[in] : real elapsed time given in seconds 32:32
Returns
true if the execution went successfully.
false in case their was a problem or the execution terminated.