This class implements a simple buffer holding several frames combined with their timestamps and optional camera calibrations.
More...
#include <FrameCollection.h>
This class implements a simple buffer holding several frames combined with their timestamps and optional camera calibrations.
◆ FrameCameraPair
Definition of a pair combining a frame with a camera profile.
◆ RingMap
Definition of a ring map mapping timestamps to frame pairs.
◆ FrameCollection() [1/4]
Ocean::Media::FrameCollection::FrameCollection |
( |
| ) |
|
|
default |
Creates an empty frame collection able to hold one frame.
◆ FrameCollection() [2/4]
Ocean::Media::FrameCollection::FrameCollection |
( |
FrameCollection && |
frameCollection | ) |
|
|
default |
Move constructor.
- Parameters
-
frameCollection | Frame collection to move |
◆ FrameCollection() [3/4]
Ocean::Media::FrameCollection::FrameCollection |
( |
const FrameCollection & |
frameCollection | ) |
|
|
default |
Copy constructor.
- Parameters
-
frameCollection | Frame collection to copy |
◆ FrameCollection() [4/4]
Ocean::Media::FrameCollection::FrameCollection |
( |
const size_t |
capacity | ) |
|
|
explicit |
Creates a new frame collection.
- Parameters
-
capacity | Number of maximal frames this object can store [1, infinity) |
◆ ~FrameCollection()
Ocean::Media::FrameCollection::~FrameCollection |
( |
| ) |
|
Destructs a frame collection.
◆ capacity()
size_t Ocean::Media::FrameCollection::capacity |
( |
| ) |
const |
|
inline |
Returns the capacity of this frame collection object.
- Returns
- The frame collection object's capacity, with range [0, infinity)
◆ clear()
void Ocean::Media::FrameCollection::clear |
( |
| ) |
|
Removes all frames from this frame collection.
The capacity will be kept.
◆ get()
Returns the frame with a specific timestamp.
If no frame with the given timestamp exists, the most recent frame will be returned.
- Parameters
-
timestamp | The timestamp of the frame to return |
anyCamera | Optional resulting camera if known; nullptr if not of interest |
- Returns
- Frame with the specific timestamp
◆ has()
bool Ocean::Media::FrameCollection::has |
( |
const Timestamp |
timestamp | ) |
const |
Returns whether a frame with specific timestamp is currently stored inside the frame collection.
- Parameters
-
timestamp | The timestamp to be checked |
- Returns
- True, if so
◆ isNull()
bool Ocean::Media::FrameCollection::isNull |
( |
| ) |
const |
|
inline |
Returns whether the frame collection is empty.
- Returns
- True, if so
◆ operator bool()
Ocean::Media::FrameCollection::operator bool |
( |
| ) |
const |
|
inlineexplicit |
Returns whether the frame collection is not empty.
- Returns
- True, if so
◆ operator=() [1/2]
Default assign operator.
- Parameters
-
frameCollection | Frame collection to assign |
◆ operator=() [2/2]
Default move operator.
- Parameters
-
frameCollection | Frame collection to move |
◆ recent()
Returns the most recent frame.
- Parameters
-
anyCamera | Optional resulting camera if known; nullptr if not of interest |
- Returns
- Most recent frame
◆ set() [1/2]
Sets a new frame and overwrites the oldest frame.
- Parameters
-
frame | The frame to set, a copy will be created |
anyCamera | Optional camera profile associated with the given frame, nullptr if unknown |
- Returns
- Reference to the stored frame, if succeeded
◆ set() [2/2]
Sets a new frame and overwrites the oldest frame.
- Parameters
-
frame | The frame to set |
anyCamera | Optional camera profile associated with the given frame, nullptr if unknown |
- Returns
- Reference to the stored frame, if succeeded
◆ setCapacity()
bool Ocean::Media::FrameCollection::setCapacity |
( |
const size_t |
capacity | ) |
|
Sets or changes the capacity of this frame collection.
In case the capacity is reduced, the oldest frames will be removed
- Parameters
-
capacity | The capacity to set, with range [1, infinity) |
- Returns
- True, if succeeded
◆ ringMap_
The ring map mapping timestamps to frame/camera pairs.
The documentation for this class was generated from the following file: