SDK Stream Features

enum Metavision::CameraErrorCode::Enum

Values:

enumerator CameraError

Base Metavision SDK Stream camera error.

enumerator FailedInitialization

Camera failed initialization.

enumerator CameraNotFound

Failed initialization due to a camera not found.

enumerator InternalInitializationError

Metavision SDK Stream Internal Initialization problem.

enumerator RuntimeError

Camera runtime errors.

enumerator CameraNotInitialized

Error due to a non initialized camera.

enumerator InvalidRawfile

Invalid RAW file.

enumerator DataTransferFailed

Error while retrieving data from source.

enumerator UnsupportedFeature

Error while trying to use a feature unsupported by the camera.

enumerator FirmwareIsNotUpToDate

Device firmware is not up to date.

enumerator DeprecatedFeature

Error while trying to use a deprecated feature.

enumerator InvalidArgument

Errors related to invalid arguments.

enumerator FileDoesNotExist

File does not exist.

enumerator NotARegularFile

File is not a regular file.

enumerator WrongExtension

File extension is not the one expected.

enumerator CouldNotOpenFile

Could not open file.

enumerator ConnectionError

Errors related to connectivity.

class CameraException : public Metavision::BaseException

Class for all exceptions thrown by Metavision SDK Stream.

Public Functions

CameraException(CameraErrorCodeType e)

Creates an exception of type e with default error message.

See also

CameraErrorCode

Parameters

e – Camera error code

CameraException(CameraErrorCodeType e, std::string additional_info)

Creates an exception of type e with an error description in additional_info.

See also

CameraErrorCode

Parameters
  • e – Camera error code

  • additional_info – error description

class CameraGeneration

Facility class to handle camera generation.

Public Functions

virtual ~CameraGeneration()

Destructor.

Deletes a CameraGeneration class instance.

short version_major() const

Returns the major version of the camera’s generation.

short version_minor() const

Returns the minor version of the camera’s generation.

std::string name() const

Returns the name corresponding to the camera’s generation.

bool operator==(const CameraGeneration &c) const

overrides “equal to” operator

bool operator!=(const CameraGeneration &c) const

overrides “not equal to” operator

bool operator<(const CameraGeneration &c) const

overrides “less than” operator

bool operator<=(const CameraGeneration &c) const

overrides “less than or equal to” operator

bool operator>(const CameraGeneration &c) const

overrides “greater than” operator

bool operator>=(const CameraGeneration &c) const

overrides “greater than or equal to” operator

Private &get_pimpl()

For internal use.

class CD

Facility class to handle CD events.

Public Functions

virtual ~CD()

Destructor.

Deletes a CD class instance.

CallbackId add_callback(const EventsCDCallback &cb)

Subscribes to CD events.

Registers a callback that will be called each time a buffer of eventCD has been decoded.

See also

EventsCDCallback

Parameters

cb – Callback to call each time a buffer of eventCD has been decoded

Returns

ID of the added callback

bool remove_callback(CallbackId callback_id)

Removes a previously registered callback.

See also

add_callback

Parameters

callback_id – Callback ID

Returns

true if the callback has been unregistered correctly, false otherwise.

Private &get_pimpl()

For internal use.

class DATEventFileReader : public Metavision::EventFileReader

Public Functions

virtual bool seekable() const override

Queries whether the event file supports seeking.

Returns

true if seek is supported, false otherwise

class ERCCounter

Facility class to handle ERCCounter events.

Public Functions

virtual ~ERCCounter()

Destructor.

Deletes a ERCCounter class instance.

CallbackId add_callback(const EventsERCCounterCallback &cb)

Subscribes to CDCount events.

Registers a callback that will be called each time a buffer of EventERCCounter has been decoded.

See also

EventsERCCounterCallback

Parameters

cb – Callback to call each time a buffer of EventERCCounter has been decoded

Returns

ID of the added callback

bool remove_callback(CallbackId callback_id)

Removes a previously registered callback.

See also

add_callback

Parameters

callback_id – Callback ID

Returns

true if the callback has been unregistered correctly, false otherwise.

Private &get_pimpl()

For internal use.

class EventFileReader

Abstract class used for reading event based file.

Subclassed by Metavision::DATEventFileReader, Metavision::HDF5EventFileReader, Metavision::RAWEventFileReader

Public Types

template<typename EventType>
using EventsBufferReadCallback = std::function<void(const EventType*, const EventType*)>

Alias for the “reading callback” used when a buffer of events has been read.

The callback will be called with two pointers which represent the range of events that were just read

Template Parameters

EventType – Type of event read

template<typename EventFrameType>
using EventFrameReadCallback = std::function<void(const EventFrameType&)>

Alias for the “reading callback” used when an event frame has been read.

The callback will be called with a reference to the event frame that was read

Template Parameters

EventFrameType – Type of event frame read

using SeekCompletionCallback = std::function<void(timestamp)>

Alias for the “seeking callback” used when a seek operation successfully completed.

The callback will be called with a timestamp representing the actual timestamp at which the reader has seeked to

Public Functions

EventFileReader(const std::filesystem::path &path)

Builds an EventFileReader.

Parameters

path – Path to the event based file to read

virtual ~EventFileReader()

Destructs an EventFileReader.

const std::filesystem::path &get_path() const

Gets the path of the event based file.

Returns

Path of the file

size_t add_read_callback(const EventsBufferReadCallback<EventCD> &cb)

Adds a “reading callback” called when a buffer of events has been read.

Parameters

cb – Callback to be called

Returns

Id of the added callback, see remove_callback

size_t add_read_callback(const EventsBufferReadCallback<EventExtTrigger> &cb)

Adds a “reading callback” called when a buffer of events has been read This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

size_t add_read_callback(const EventsBufferReadCallback<EventERCCounter> &cb)

Adds a “reading callback” called when a buffer of events has been read This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

size_t add_read_callback(const EventFrameReadCallback<RawEventFrameHisto> &cb)

Adds a “reading callback” called when a histogram has been read This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

size_t add_read_callback(const EventFrameReadCallback<RawEventFrameDiff> &cb)

Adds a “reading callback” called when a diff histogram has been read This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

size_t add_read_callback(const EventFrameReadCallback<PointCloud> &cb)

Adds a “reading callback” called when a pointcloud has been read This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool has_read_callbacks() const

Checks if “reading callbacks” have been added.

Returns

true if callbacks have been added, false otherwise

bool read()

Reads block of events from the input stream.

Returns

true if some events could be read, false otherwise

virtual bool seekable() const = 0

Queries whether the event file supports seeking.

Returns

true if seek is supported, false otherwise

size_t add_seek_callback(const SeekCompletionCallback &cb)

Adds a “seeking callback” called when a seek operation successfully completed.

Parameters

cb – Callback to be called

Returns

Id of the added callback, see remove_callback

bool has_seek_callbacks() const

Checks if “seeking callbacks” have been added.

Returns

true if callbacks have been added, false otherwise

bool get_seek_range(timestamp &min_t, timestamp &max_t) const

Gets the allowed seek range timestamps.

Parameters
  • min_t – Reference to the minimum timestamp to seek to

  • max_t – Reference to the maximum timestamp to seek to

Returns

true if the seek range could be determined, false otherwise

timestamp get_duration() const

Gets the duration of the file.

Returns

Duration or -1 if not available

bool seek(timestamp t)

Seeks to a specified timestamp.

Parameters

t – Timestamp to seek to

Returns

true if the seek was successful, false otherwise

void remove_callback(size_t id)

Removes one callback.

Parameters

id – Id of the callback to remove (see add_read_callback, add_seek_callback)

std::unordered_map<std::string, std::string> get_metadata_map() const

Gets the metadata map of the file.

Returns

Metadata, if available

Private &get_pimpl()

For internal use.

class EventFileWriter

Abstract class used for reading event based file.

Subclassed by Metavision::HDF5EventFileWriter, Metavision::RAWEventFileLogger, Metavision::RAWEvt2EventFileWriter

Public Functions

EventFileWriter(const std::filesystem::path &path = std::filesystem::path())

Builds an EventFileWriter.

Parameters

path – Path to the event based file to write

virtual ~EventFileWriter()

Destructs an EventFileWriter.

void open(const std::filesystem::path &path)

Open the writer with specified path.

Parameters

path – Path to the file to write

void close()

Close the writer.

bool is_open() const

Check that the writer is currently opened and ready to write data.

Returns

true if the writer is opened and ready, false otherwise

void flush()

Try to flush any data not yet written to disk.

The underlying implementation will do its best to flush any data not yet written but it’s not guaranteed that all data will be written after this call (a library or the OS might prevent completely flushing that data at this point). If no more data will be added, closing the writer is the only way to make sure the data is fully written to disk.

const std::filesystem::path &get_path() const

Gets the path of the event based file.

Returns

Path of the file

void add_metadata(const std::string &key, const std::string &value)

Adds metadata to the file.

Warning

Calling this function after some data has been added may throw an exception in some implementation

Parameters
  • key – Metatadata key to be added

  • value – Metadata value to be added

void add_metadata_map_from_camera(const Camera &camera)

Adds metadata to the file from a Camera instance.

Warning

Calling this function after some data has been added may throw an exception in some implementation

Parameters

camera – Camera instance to build metadata from

void remove_metadata(const std::string &key)

Removes metadata from the file.

Parameters

key – Metadata key to be removed

bool add_events(const EventCD *begin, const EventCD *end)

Adds a buffer of events to be written.

Warning

The events must be chronologically ordered inside the buffer, and in between calls. An exception will be thrown if the first event of the added buffer is older than the timestamp of the last event of the last added buffer.

Parameters
  • begin – Pointer to the beginning of the buffer

  • end – Pointer to the end of the buffer

bool add_events(const EventExtTrigger *begin, const EventExtTrigger *end)

Adds a buffer of events to be written This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Private &get_pimpl()

For internal use.

class ExtTrigger

Facility class to handle External Triggers events.

Public Functions

virtual ~ExtTrigger()

Destructor.

Deletes an ExtTrigger class instance.

CallbackId add_callback(const EventsExtTriggerCallback &cb)

Subscribes to external trigger events.

Registers a callback that will be called each time a buffer of external trigger event has been decoded.

See also

EventsExtTriggerCallback

Parameters

cb – Callback to call each time a buffer of ext trigger event has been decoded

Returns

ID of the added callback

bool remove_callback(CallbackId callback_id)

Removes a previously registered callback.

See also

add_callback

Parameters

callback_id – Callback ID

Returns

true if the callback has been unregistered correctly, false otherwise.

Private &get_pimpl()

For internal use.

class FileConfigHints

Class represented by a map of string key/value pair, used to control how a file is read by the Camera class.

Note

Some keys can be ignored when not applicable to the file format

Public Functions

inline explicit FileConfigHints()

Constructor.

By default, if applicable, the file will be read using a maximum memory footprint of 12Mo, with real time playback speed and time shifting enabled

inline bool real_time_playback() const

Gets the real-time playback status.

Returns

true if enabled, false otherwise

inline FileConfigHints &real_time_playback(bool enabled)

Named constructor for the real time playback status.

Parameters

enabled – true if the setting should be enabled, false otherwise

Returns

FileConfigHints& Reference to the modified config

inline bool time_shift() const

Gets the timeshift status.

Returns

true if enabled, false otherwise

inline FileConfigHints &time_shift(bool enabled)

Named constructor for the time shift status.

Parameters

enabled – true if the setting should be enabled, false otherwise

Returns

FileConfigHints& Reference to the modified config

inline size_t max_memory() const

Gets the maximum memory used (if applicable) setting.

Returns

Maximum memory used

inline FileConfigHints &max_memory(std::size_t max_memory)

Named constructor for the max memory setting.

Parameters

max_memory – Maximum memory that should be used when reading the file (if applicable)

Returns

FileConfigHints& Reference to the modified config

inline size_t max_read_per_op() const

Gets the maximum read size (if applicable) setting.

Returns

Maximum read size in bytes

inline FileConfigHints &max_read_per_op(std::size_t max_read_per_op)

Named constructor for the max read size per read operation.

Parameters

max_read_per_op – Maximum size of data read per read operation

Returns

FileConfigHints& Reference to the modified config

template<typename T>
inline void set(const std::string &key, const T &value)

Sets a value for a named key in the config dictionary.

Parameters
  • key – Key of the config

  • value – Value of the config

inline void set(const std::string &key, const std::string &value)

Sets a value for a named key in the config dictionary This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename T>
inline T get(const std::string &key, const T &def = T()) const

Gets the (typed) value for a named key in the config dictionary if it exists and can be extracted from the corresponding value safely or the provided default value.

Template Parameters

T – type of the value to return as

Parameters
  • key – Name of the config key

  • def – Default value if the config key is not found

Returns

Value of the config

class FrameDiff

Facility class to handle RawEventFrameDiff.

Public Functions

virtual ~FrameDiff()

Destructor.

Deletes a FrameDiff class instance.

CallbackId add_callback(const RawEventFrameDiffCallback &cb)

Subscribes to FrameDiff events.

Registers a callback that will be called each time a RawEventFrameDiff has been decoded.

See also

RawEventFrameDiffCallback

Parameters

cb – Callback to call each time a RawEventFrameDiff has been decoded

Returns

ID of the added callback

bool remove_callback(CallbackId callback_id)

Removes a previously registered callback.

See also

add_callback

Parameters

callback_id – Callback ID

Returns

true if the callback has been unregistered correctly, false otherwise.

Private &get_pimpl()

For internal use.

class FrameHisto

Facility class to handle RawEventFrameHisto.

Public Functions

virtual ~FrameHisto()

Destructor.

Deletes a FrameHisto class instance.

CallbackId add_callback(const RawEventFrameHistoCallback &cb)

Subscribes to Histogram events.

Registers a callback that will be called each time a RawEventFrameHisto has been decoded.

See also

RawEventFrameHistoCallback

Parameters

cb – Callback to call each time a RawEventFrameHisto has been decoded

Returns

ID of the added callback

bool remove_callback(CallbackId callback_id)

Removes a previously registered callback.

See also

add_callback

Parameters

callback_id – Callback ID

Returns

true if the callback has been unregistered correctly, false otherwise.

Private &get_pimpl()

For internal use.

class HDF5EventFileReader : public Metavision::EventFileReader

Public Functions

virtual bool seekable() const override

Queries whether the event file supports seeking.

Returns

true if seek is supported, false otherwise

class HDF5EventFileWriter : public Metavision::EventFileWriter
class OfflineStreamingControl

Facility class to control offline streaming features.

Public Functions

bool is_ready() const

Checks if all features of the offline streaming control are ready.

Note

You should make sure this function returns true before making any other calls

Returns

true if all features are ready, false otherwise

bool seek(Metavision::timestamp ts)

Seek to a specified timestamp.

Parameters

ts – Timestamp to seek to

Returns

True if seeking succeeded, false otherwise

Metavision::timestamp get_seek_start_time() const

Gets the first reachable timestamp that can be seeked to.

Returns

Metavision::timestamp First timestamp to seek to

Metavision::timestamp get_seek_end_time() const

Gets the last reachable timestamp that can be seeked to.

Returns

Metavision::timestamp Last timestamp to seek to

Metavision::timestamp get_duration() const

Gets the duration of the recording.

Returns

Metavision::timestamp Duration of the recording

Private &get_pimpl()

For internal use.

class RawData

Facility class to handle RAW data.

Public Functions

virtual ~RawData()

Destructor.

Deletes a RawData class instance.

CallbackId add_callback(const RawDataCallback &cb)

Subscribes to RAW data callback.

Registers a callback that will be called each time a buffer of RAW data has been received.

See also

RawDataCallback

Note

This callback is always called after all events callbacks have been called, with the raw data buffer used to decode the events that are passed to the events callback.

Parameters

cb – Callback to call each time a buffer of RAW data has been received

Returns

ID of the added callback

bool remove_callback(CallbackId callback_id)

Removes a previously registered callback.

See also

add_callback

Parameters

callback_id – Callback ID

Returns

true if the callback has been unregistered correctly, false otherwise.

Private &get_pimpl()

For internal use.

class RAWEventFileReader : public Metavision::EventFileReader

Public Functions

virtual bool seekable() const override

Queries whether the event file supports seeking.

Returns

true if seek is supported, false otherwise

class RAWEventFileLogger : public Metavision::EventFileWriter
class RAWEvt2EventFileWriter : public Metavision::EventFileWriter

EventFileWriter specialized class to write events to a RAW EVT2 file.

Note

This class only supports writing CD and Trigger events

Public Functions

RAWEvt2EventFileWriter(int stream_width, int stream_height, const std::filesystem::path &path = std::filesystem::path(), bool enable_trigger_support = false, const std::unordered_map<std::string, std::string> &metadata_map = std::unordered_map<std::string, std::string>(), timestamp max_events_add_latency = std::numeric_limits<timestamp>::max())

Constructor.

Parameters
  • stream_width – Width of the stream

  • stream_height – Height of the stream

  • path – Path to the file to write to

  • enable_trigger_support – If true, the writer will merge CD and Trigger event streams before writing them to the file, leading to some encoding latency. If false, CD event will be written as soon as they are added to the writer, and Trigger events will not be supported.

  • metadata_map – Map of metadata to add in the header of the written file

  • max_events_add_latency – Maximum latency for the addition of events, in camera time, beyond which the writer will assume it can safely encode early buffered events. By default, there is no limit, meaning the writer will buffer CD events until a least one trigger event is received, which may in certain cases lead to memory issues. Alternatively, a finite positive latency value can be specified, the writer will then assume absence of triggers if CD events have been buffered for a larger time, hence avoiding memory issues but with the risk of EVT2 encoding errors if trigger events are actually received with a higher latency.

~RAWEvt2EventFileWriter() override

Destructor.

struct Slice

Structure representing a slice of events and triggers.

Public Functions

Slice() = default

Default constructor.

bool operator==(const Slice &other) const

Comparison operator.

Parameters

other – Slice to compare with

Returns

True if the two slices are equal, false otherwise

Public Members

ConditionStatus status

Status indicating how the slice was completed.

timestamp t

Timestamp of the slice.

std::size_t n_events

Number of CD events in the slice.

std::shared_ptr<const EventBuffer> events

Events in the slice.

std::shared_ptr<const TriggerBuffer> triggers

Triggers in the slice.

class CameraStreamSlicer

Class that slices a stream of events and triggers according to a given condition.

Internally, a concurrent queue is used to store the slices produced by the background threads of the Camera class (i.e. in the callbacks). The size of this concurrent queue can be limited to prevent the background threads from producing too many slices (i.e. especially in offline mode) and consuming too much memory.

Public Functions

CameraStreamSlicer() = default

Default constructor.

CameraStreamSlicer(Camera &&camera, const SliceCondition &slice_condition = SliceCondition::make_n_us(1000), size_t max_queue_size = 5)

Constructor.

Parameters
  • camera – Camera instance to slice, the ownership of the camera is transferred to the slicer

  • slice_condition – Slicing parameters

  • max_queue_size – Maximum number of slices that can be stored in the internal queue

CameraStreamSlicer(CameraStreamSlicer &&slicer) noexcept

Move constructor.

Parameters

slicer – CameraStreamSlicer to move

CameraStreamSlicer &operator=(CameraStreamSlicer &&slicer) noexcept

Move assignment operator.

Parameters

slicer – CameraStreamSlicer to move

~CameraStreamSlicer()

Destructor.

SliceIterator begin()

Starts the camera stream and returns an iterator to the first slice.

SliceIterator end()

Returns an iterator to the end of the stream.

const Camera &camera() const

Returns the underlying camera instance.

struct SyncedSlice

A slice of synchronized events from a master and slave cameras.

Public Functions

SyncedSlice() = default

Default constructor.

bool operator==(const SyncedSlice &other) const

Comparison operator.

Parameters

other – Slice to compare with

Returns

True if the two slices are equal, false otherwise

Public Members

ConditionStatus status = ConditionStatus::NOT_MET

Status indicating how the slice was completed.

timestamp t = 0

Timestamp of the slice.

std::size_t n_events = 0

Number of events in the master slice.

std::shared_ptr<const EventBuffer> master_events

Events in the master slice.

std::shared_ptr<const TriggerBuffer> master_triggers

Triggers in the master slice.

std::vector<std::shared_ptr<const EventBuffer>> slave_events

Events in the slave slices.

class SyncedCameraStreamsSlicer

Class for slicing event streams from master and slave cameras based on a condition.

The slicing condition is applied to the master stream and the end of the slave streams are determined accordingly. Internally, a concurrent queue is used to store the slices produced by the background threads of the master Camera class (i.e. in the callbacks). The size of this concurrent queue can be limited to prevent the background threads from producing too many slices (i.e. especially in offline mode) and consuming too much memory.

Public Functions

SyncedCameraStreamsSlicer(Camera &&master_camera, std::vector<Camera> &&slave_cameras, const SliceCondition &slice_condition = SliceCondition::make_n_us(1000), size_t max_queue_size = 5)

Constructor.

Parameters
  • master_camera – Master camera instance

  • slave_cameras – Slave camera instances

  • slice_condition – Slicing parameters

  • max_queue_size – Maximum number of slices that can be stored in the internal queue

Throws

std::invalid_argument – if no slave camera is provided

SyncedCameraStreamsSlicer()

Default constructor.

SyncedCameraStreamsSlicer(SyncedCameraStreamsSlicer &&slicer) noexcept

Move constructor.

Parameters

slicer – SyncedCameraStreamsSlicer to move

SyncedCameraStreamsSlicer &operator=(SyncedCameraStreamsSlicer &&slicer) noexcept

Move assignment operator.

Parameters

slicer – SyncedCameraStreamsSlicer to move

~SyncedCameraStreamsSlicer()

Destructor.

SliceIterator begin()

Starts the camera streams and returns an iterator to the first slice.

SliceIterator end()

Returns an iterator to the end of the streams.

const Camera &master() const

Returns the underlying master camera instance.

size_t slaves_count() const

Returns the number of slave cameras.

const Camera &slave(size_t i) const

Returns the underlying slave camera instance.

struct LiveCameraParameters

Parameters to create a live camera.

Public Members

std::string serial_number

Serial number of the camera.

DeviceConfig device_config

Device configuration.

std::optional<std::filesystem::path> settings_file_path

Optional path to a camera settings file.

struct LiveParameters

Parameters to create a synced live camera system.

Public Members

LiveCameraParameters master_parameters

Parameters for the master camera.

std::vector<LiveCameraParameters> slave_parameters

Parameters for the slave cameras.

bool record

True to record the events, false otherwise.

std::optional<std::filesystem::path> record_dir

Optional directory where the events will be recorded.

struct OfflineParameters

Parameters to create a synced offline camera system.

Public Members

std::filesystem::path master_file_path

Path to the master record.

std::vector<std::filesystem::path> slave_file_paths

Paths to the slave records.

FileConfigHints file_config_hints

Hints to configure the file reading.

static std::tuple<Camera, std::vector<Camera>> Metavision::SyncedCameraSystemFactory::build(const LiveParameters &parameters)

Builds a synced camera system with live cameras.

Parameters

parameters – Parameters to create the synced camera system

Returns

A tuple with the master camera and the slave cameras

static std::tuple<Camera, std::vector<Camera>> Metavision::SyncedCameraSystemFactory::build(const OfflineParameters &parameters)

Builds a synced camera system with offline cameras.

Parameters

parameters – Parameters to create the synced camera system

Returns

A tuple with the master camera and the slave cameras

class SyncedCameraSystemBuilder

Builder class to create a synced camera system.

Depending on the provided parameters, the builder will create a synced camera system with live cameras or with files.

Public Functions

SyncedCameraSystemBuilder &add_live_camera_parameters(const SyncedCameraSystemFactory::LiveCameraParameters &parameters)

Adds live camera parameters to the builder.

The first provided parameters will be used as the master camera parameters

Parameters

parameters – Live camera parameters

Returns

Reference to the builder

SyncedCameraSystemBuilder &set_record(bool record)

Sets whether the system should record the live events or not.

Parameters

record – True to record the events, false otherwise

Returns

Reference to the builder

SyncedCameraSystemBuilder &set_record_dir(const std::filesystem::path &record_dir)

Sets the directory where the events will be recorded.

Setting this option will automatically enable recording

Parameters

record_dir – Directory where the events will be recorded

Returns

Reference to the builder

SyncedCameraSystemBuilder &add_record_path(const std::filesystem::path &record_path)

Adds a path to a record file.

The first provided path will be used as the master camera file path

Parameters

record_path – Path to a record file

Returns

Reference to the builder

SyncedCameraSystemBuilder &set_file_config_hints(const FileConfigHints &file_config_hints)

Sets the file config hints.

The hints will be used for all the records

Parameters

file_config_hints – File config hints

Returns

Reference to the builder

std::tuple<Camera, std::vector<Camera>> build()

Builds the synced camera system.

Throws

std::runtime_error – in case:

  • No camera parameters provided

  • Mixing live and offline parameters

  • Less than two live cameras provided

  • Less than two records provided

Returns

Tuple containing the master camera and the slave cameras