VRS
A file format for sensor data.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vrs_sample_apps::ImageStream Class Reference

Sample fake device showing how to produce records containing metadata and images. More...

Inheritance diagram for vrs_sample_apps::ImageStream:
vrs::Recordable

Public Member Functions

const RecordcreateConfigurationRecord () override
 
const RecordcreateStateRecord () override
 
void createDataRecord (uint64_t frameCount)
 
- Public Member Functions inherited from vrs::Recordable
string getRecordableName () const
 
RecordableTypeId getRecordableTypeId () const
 
uint16_t getRecordableInstanceId () const
 
StreamId getStreamId () const
 
void setRecordableIsActive (bool isActive)
 
bool isRecordableActive () const
 
void setCompression (CompressionPreset preset)
 
bool addRecordFormat (Record::Type recordType, uint32_t formatVersion, const RecordFormat &format, const vector< const DataLayout * > &layouts={})
 
void setCreateRecordDelegate (CreateRecordDelegate delegate)
 
void setTag (const string &tagName, const string &tagValue)
 
void addTags (const map< string, string > &newTags)
 
void addTags (const StreamTags &tags)
 
const map< string, string > & getTags () const
 
const StreamTagsgetStreamTags () const
 
const string & getSerialNumber () const
 
RecordManagergetRecordManager ()
 

Additional Inherited Members

- Public Types inherited from vrs::Recordable
using CreateRecordDelegate = std::function< const Record *(StreamId streamId, double timestamp, Record::Type recordType, uint32_t recordFormatVersion, const DataSource &data)>
 
- Static Public Member Functions inherited from vrs::Recordable
static const string & getOriginalNameTagName ()
 
static const string & getFlavorTagName ()
 
static const string & getSerialNumberTagName ()
 Get the name of the VRS tag used to store the stream's serial number.
 
static void resetNewInstanceIds ()
 
- Protected Member Functions inherited from vrs::Recordable
 Recordable (RecordableTypeId typeId, const string &flavor={})
 
const RecordcreateRecord (double timestampSec, Record::Type recordType, uint32_t formatVersion, const DataSource &data=DataSource())
 
const RecordcreateUncompressedRecord (double timestampSec, Record::Type recordType, uint32_t formatVersion, const DataSource &data, std::unique_ptr< DirectWriteRecordData > &&directWriteRecordData)
 
map< string, string > & getVRSTags ()
 When direct edits of VRS tags is convenient (record filters)
 

Detailed Description

Sample fake device showing how to produce records containing metadata and images.

Stream of images, that resembles how we've stored camera data for many projects A configuration record stores the camera image settings (resolution, pixel format...) and maybe some calibration data, etc. Data records contains a block of meta data along with some pixel data. The meta datya captures some sensor data such as exposure and the camera's temperature, and maybe some counters (frame counter, camera time, etc).

Member Function Documentation

◆ createConfigurationRecord()

const Record * vrs_sample_apps::ImageStream::createConfigurationRecord ( )
inlineoverridevirtual

Configuration records describe how the device recorded is configured/setup. The configuration of a recordable is probably not changed by data flowing through. A framerate, a resolution, are probably part of the configuration. An exposure setting as well, unless it is automatically adjusted as data flows through. The RecordFileWriter will call this method to make sure a configuration record is captured, when a record file is created asynchronously.

Implements vrs::Recordable.

◆ createStateRecord()

const Record * vrs_sample_apps::ImageStream::createStateRecord ( )
inlineoverridevirtual

State records describe the internal state of the device, if it's stateful. It is probably the result of previous calculation/processing of data.

State records should not to be confused with the configuration of the device. A position tracking algorithm probably has a state: the last position it determined, which will be used to calculate the next state when the next data come in. State data typically changes as data flows, according to that data. A camera probably has no state, but probably has a configuration. The RecordFileWriter will call this method to make sure a configuration record is captured, when a record file is created asynchronously.

Implements vrs::Recordable.


The documentation for this class was generated from the following file: