Ocean
|
This class implements the abstract base class for all device players. More...
Public Types | |
enum | TransformationResult : uint32_t { TR_DOES_NOT_EXIST = 0u , TR_INTERPOLATED , TR_PRECISE } |
Definition of individual transformation results. More... | |
Public Member Functions | |
DevicePlayer ()=default | |
Creates a new device player. More... | |
virtual | ~DevicePlayer () |
Destructs the device player. More... | |
virtual bool | initialize (const std::string &filename)=0 |
Initializes the player with a recording. More... | |
virtual bool | start (const float speed=1.0f)=0 |
Starts the replay. More... | |
virtual bool | stop ()=0 |
Stops the replay. More... | |
virtual Timestamp | playNextFrame ()=0 |
Plays the next frame of the recording, the player must be started with stop-motion mode ('SPEED_USE_STOP_MOTION'). More... | |
virtual double | duration () const =0 |
Returns the duration of the content when played with default speed. More... | |
virtual Media::FrameMediumRefs | frameMediums () |
Returns all frame media objects which have been created based on the recording. More... | |
virtual TransformationResult | transformation (const std::string &name, const Timestamp ×tamp, HomogenousMatrixD4 &matrix)=0 |
Returns a specific transformation which is expected to be part of the recording. More... | |
virtual bool | isStarted () const =0 |
Returns whether this player is currently started. More... | |
virtual bool | isValid () const |
Returns whether this player holds a valid recording. More... | |
Static Public Attributes | |
static constexpr float | SPEED_USE_STOP_MOTION = 0.0f |
Definition of a speed value for the stop-motion replay mode. More... | |
Protected Attributes | |
std::string | filename_ |
The filename of the recording which is used. More... | |
Lock | lock_ |
The player's lock. More... | |
This class implements the abstract base class for all device players.
The device player can be used to re-play a previously captured data and exposing the data through devices.
enum Ocean::Devices::DevicePlayer::TransformationResult : uint32_t |
Definition of individual transformation results.
|
default |
Creates a new device player.
|
virtual |
Destructs the device player.
|
pure virtual |
Returns the duration of the content when played with default speed.
|
virtual |
Returns all frame media objects which have been created based on the recording.
|
pure virtual |
Initializes the player with a recording.
filename | The name of the file to be used in the player, must be valid |
|
pure virtual |
Returns whether this player is currently started.
|
virtual |
Returns whether this player holds a valid recording.
|
pure virtual |
Plays the next frame of the recording, the player must be started with stop-motion mode ('SPEED_USE_STOP_MOTION').
In case the recording holds several media objects, the fist media objects is used to identify the next frame.
This function will read all records which have been recorded before or at the same time as the next frame of the first media object.
If the recording does not have any media object nothing happens.
|
pure virtual |
Starts the replay.
The recording can be payed with individual speed, e.g., real-time, slower than real-time, faster than real-time.
Further, the player support a stop-motion mode in which the player will play one frame by another.
speed | The speed at which the recording will be played, e.g., 2 means two times faster than normal, with range (0, infinity), 'SPEED_USE_STOP_MOTION' to play the recording in a stop-motion (frame by frame) mode |
|
pure virtual |
Stops the replay.
|
pure virtual |
Returns a specific transformation which is expected to be part of the recording.
This function is intended as a helper function to simplify access to important transformations which otherwise would be accessed through the player's tracking devices.
name | The name of the transformation, must be valid |
timestamp | The timestamp for which the transformation is evaluated, must be valid |
matrix | The resulting transformation matrix |
|
protected |
The filename of the recording which is used.
|
mutableprotected |
The player's lock.
|
staticconstexpr |
Definition of a speed value for the stop-motion replay mode.