optris::sdk::rec::ClipResult
What came out of ExtractClip().
Public attributes
path
std::string path
The file written.
from_us
uint64_t from_us = 0
Where the clip actually starts. Not necessarily where it was asked to: it is clamped to what the history still holds, and snapped_by_us says whether an anchor moved it further back.
to_us
uint64_t to_us = 0
Where it actually ends, clamped to the newest frame the history holds.
frames
uint64_t frames = 0
Frames of the measurement in it.
file_bytes
uint64_t file_bytes = 0
The clip file's size on disk.
snapped_by_us
uint64_t snapped_by_us = 0
How much earlier than requested the clip starts, because the first frame in range was not a seek anchor and a decoder starting there would have had nothing to predict from.
Zero for an all-intra history, which is the default -- that is what all_intra buys. Non-zero means the segment was written at the encoder's default GOP, and the clip holds up to eleven extra frames at the front rather than being silently wrong about where it starts.
segments
std::vector< std::string > segments
The segments it was cut from, in order.
incomplete
bool incomplete = false
True when the requested window was not completely covered -- the history had been pruned past the in point, or the out point is past the newest frame.
Not an error. A clip of what exists is almost always what the caller wanted, and the alternative -- refusing -- loses the footage that is there. But it is reported, because "the clip is short" and "the clip is wrong" want different responses.