|
Ocean
|
This class implements the abstract base class for all device players. More...
#include <DevicePlayer.h>
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. | |
| virtual | ~DevicePlayer () |
| Destructs the device player. | |
| virtual bool | initialize (const std::string &filename)=0 |
| Initializes the player with a recording. | |
| virtual bool | start (const float speed=1.0f)=0 |
| Starts the replay. | |
| virtual bool | stop ()=0 |
| Stops the replay. | |
| virtual Timestamp | playNextFrame ()=0 |
| Plays the next frame of the recording, the player must be started with stop-motion mode ('SPEED_USE_STOP_MOTION'). | |
| virtual double | duration () const =0 |
| Returns the duration of the content when played with default speed. | |
| virtual Media::FrameMediumRefs | frameMediums () |
| Returns all frame media objects which have been created based on the recording. | |
| 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. | |
| virtual bool | isStarted () const =0 |
| Returns whether this player is currently started. | |
| virtual bool | isValid () const |
| Returns whether this player holds a valid recording. | |
Static Public Attributes | |
| static constexpr float | SPEED_USE_STOP_MOTION = 0.0f |
| Definition of a speed value for the stop-motion replay mode. | |
Protected Attributes | |
| std::string | filename_ |
| The filename of the recording which is used. | |
| Lock | lock_ |
| The player's lock. | |
This class implements the abstract base class for all device players.
The device player can be used to replay 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.
Implemented in Ocean::Devices::Serialization::SerializerDevicePlayer.
|
virtual |
Returns all frame media objects which have been created based on the recording.
Reimplemented in Ocean::Devices::Serialization::SerializerDevicePlayer.
|
pure virtual |
Initializes the player with a recording.
| filename | The name of the file to be used in the player, must be valid |
Implemented in Ocean::Devices::Serialization::SerializerDevicePlayer.
|
pure virtual |
Returns whether this player is currently started.
Implemented in Ocean::Devices::Serialization::SerializerDevicePlayer.
|
virtual |
Returns whether this player holds a valid recording.
Reimplemented in Ocean::Devices::Serialization::SerializerDevicePlayer.
|
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 first media object 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.
Implemented in Ocean::Devices::Serialization::SerializerDevicePlayer.
|
pure virtual |
Starts the replay.
The recording can be played with individual speed, e.g., real-time, slower than real-time, faster than real-time.
Further, the player supports a stop-motion mode in which the player will play frame by frame.
| speed | The speed at which the recording will be played, e.g., 2 means two times faster than normal, with range (0, infinity) for normal playback, or 'SPEED_USE_STOP_MOTION' to play the recording in a stop-motion (frame by frame) mode |
Implemented in Ocean::Devices::Serialization::SerializerDevicePlayer.
|
pure virtual |
Stops the replay.
Implemented in Ocean::Devices::Serialization::SerializerDevicePlayer.
|
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 |
Implemented in Ocean::Devices::Serialization::SerializerDevicePlayer.
|
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.