OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::rec::SeriesMeta

Where this file sits in a multipart recording.

Present only when the recording was started with a segment limit and so may roll over. Absent means "one file, complete in itself" -- which is what every recording written before this field was, and what a recording with no limit still is. A reader that finds no series is looking at a whole recording, not at a part whose siblings it failed to notice.

Every part carries it, the first included. The first part's header is written before anybody knows whether a rollover will happen, so "add it only once there are two" is not available: it would mean the one file that always exists is the one that never says what it belongs to.

The field names and their meanings are TimelineSpan's deliberately (rec/types.h): from_us is camera capture time, unix_us is host wall clock. The continuous-recording catalogue already describes segments in exactly those terms, and a second spelling for one concept is how the two drift apart -- the same failure as four copies of one error mapping, or three spellings of one conversion.

There is deliberately no to_us. otc-meta.json is written inside WriteHeaderIfNeeded(), before a single frame reaches the file, so a part's last frame does not exist yet and any value written here would be a guess. It is not lost: the container's own Duration is written by the trailer when the part closes, which is what Player::ResolveDuration() already reads, so a part's end is from_us plus that. A field that cannot be filled honestly is worse than an absent one, because the next reader trusts it.

Public attributes

id

std::string id

Shared by every part of one recording, and by nothing else.

part

uint32_t part = 0

Which part this file is, counting from 0 for the first file of the recording.

Zero-based so it matches the recorder's own segment index and the name it writes: part 0 is <name>_part000 and part 1 is <name>_part001. A one-based "part number" would read off by one against every file name. Since API version 24 every part carries the suffix, so the match is exact for part 0 too -- it used to be the one part whose name said nothing about which number it was.

from_us

std::optional< uint64_t > from_us

Capture time of this part's first frame.

Absent for a part that was opened and never written to -- the header precedes the frames, so a recording stopped or failed immediately has no first frame to name. Absent is the honest answer there, and 0 is a legitimate capture time.

series_from_us

std::optional< uint64_t > series_from_us

Capture time of the first part's first frame: where the whole recording began.

Carried by every part so that any one of them can place itself on the series timeline without opening its siblings. That is the value a stitch needs and the one that is otherwise recoverable only by decoding another file's telemetry track.

unix_us

std::optional< uint64_t > unix_us

Host wall clock when this part's first frame was written, in microseconds since the Unix epoch.

A label for a human, not a seek key: this is a different clock from from_us and the two drift. Said here because TimelineSpan::unix_us says it, and for the same reason.