OpenViBE Documentation 3.6.0
|
The main player class. More...
#include <ovIPlayer.h>
Public Member Functions | |
virtual bool | setScenario (const CIdentifier &id, const CNameValuePairList *localConfigTokens=nullptr)=0 |
Attaches a scenario to this player. More... | |
virtual IConfigurationManager & | getRuntimeConfigurationManager () const =0 |
returns a reference to the runtime configuration manager More... | |
virtual IScenarioManager & | getRuntimeScenarioManager () const =0 |
returns a reference to the runtime scenario manager More... | |
virtual CIdentifier | getRuntimeScenarioIdentifier () const =0 |
returns the cidentifier of the associated runtime scenario More... | |
virtual EPlayerReturnCodes | initialize ()=0 |
Initializes this player. More... | |
virtual bool | uninitialize ()=0 |
Uninitializes this player. More... | |
virtual bool | stop ()=0 |
Stops player execution. More... | |
virtual bool | pause ()=0 |
Pauses player execution. More... | |
virtual bool | step ()=0 |
Executes one more step and pauses. More... | |
virtual bool | play ()=0 |
Makes player run normal speed. More... | |
virtual bool | forward ()=0 |
Makes player run as fast as possible. More... | |
virtual EPlayerStatus | getStatus () const =0 |
Gets current player status. More... | |
virtual bool | setFastForwardMaximumFactor (double factor)=0 |
Sets maximum fast forward factor coefficient. More... | |
virtual double | getFastForwardMaximumFactor () const =0 |
Gets the maximum fast forward factor coefficient. More... | |
virtual double | getCPUUsage () const =0 |
Gets an estimate of the actual time ratio spent in the player's loop. More... | |
virtual bool | loop (uint64_t elapsedTime, uint64_t maximumTimeToReach=uint64_t(-1))=0 |
"short time" function to be called repeatedly by the outstide application More... | |
virtual uint64_t | getCurrentSimulatedTime () const =0 |
Public Member Functions inherited from OpenViBE::IObject | |
virtual CIdentifier | getClassIdentifier () const =0 |
Returns the final class identifier of the concrete class. More... | |
virtual bool | isDerivedFromClass (const CIdentifier &classId) const |
Checks if this object is compatible with a class identifier. More... | |
virtual bool | acceptVisitor (IObjectVisitor &visitor) |
Requests this object to accept a visitor. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from OpenViBE::IObject | |
virtual | ~IObject () |
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.
|
pure virtual |
Attaches a scenario to this player.
id | [in] : the scenario identifier to attach to this player. The scenario itself is found from the scenario manager. |
localConfigTokens | [in] : An optional map that contains configuration tokens to add. |
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
returns a reference to the runtime configuration manager
When initialized, a player creates a runtime configuration manager which will be used for scenario and runtime related specific configuration. The use of this features includes the loading of a delayed configuration file for instance. The reference should be valid up to the duration of the player itself.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
returns a reference to the runtime scenario manager
When a scenario is loaded, a copy is made and stored in the runtime scenario manager. This function allows getting the runtime scenario manager that contains the current executed scenario.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
returns the cidentifier of the associated runtime scenario
When initialized, a player copy the scenario in the runtime configuration manager this method allows getting the identifier of said copied scenario
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
Initializes this player.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
Uninitializes this player.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
Stops player execution.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
Pauses player execution.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
Executes one more step and pauses.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
Makes player run normal speed.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
Makes player run as fast as possible.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
|
pure virtual |
Sets maximum fast forward factor coefficient.
factor | : the maximum speed multiplier to be applied when playing in EPlayerStatus::Forward mode |
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
Gets the maximum fast forward factor coefficient.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
Gets an estimate of the actual time ratio spent in the player's loop.
Implemented in OpenViBE::Kernel::CPlayer.
|
pure virtual |
"short time" function to be called repeatedly by the outstide application
elapsedTime | [in] : real elapsed time given in seconds 32:32 |
maximumTimeToReach | [in] : maximum time to reach given in seconds 32:32 |
The maximumTimeToReach parameter guarantees that the player does not run beyond the specified time when ran in fast forward mode. It defaults to uint64_t
(-1) which represents the largest OpenViBE time.
Implemented in OpenViBE::Kernel::CPlayer.