OptrisOptrisDocumentation

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

optris_sdk_continuous_stats

What an always-on recording has done.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_continuous_stats).

last_prune_reason

optris_sdk_prune_reason last_prune_reason

Why the last prune happened. See optris_sdk_prune_reason.

segments_written

uint64_t segments_written

Segments closed and catalogued by this run.

segments_pruned

uint64_t segments_pruned

Segments deleted by the pruner, including ones adopted from an earlier run.

bytes_pruned

uint64_t bytes_pruned

Bytes those deletions reclaimed.

segments_adopted

uint64_t segments_adopted

Segments this run adopted from an earlier one when it opened.

Reported rather than ignored: an application that did not expect them is an application whose disk budget is being spent by a run it has forgotten about.

bytes_on_disk

uint64_t bytes_on_disk

What the catalogued segments occupy, the open one excluded.

depth_ms

uint64_t depth_ms

The span the history actually covers, in milliseconds. The honest number: a history cut short by a full disk reports what it has, not what was asked for.

free_bytes

uint64_t free_bytes

Free space on the volume at the last check.

retention_shortened

uint64_t retention_shortened

How many times the retention window could not be honoured. Counted per episode, not per segment.

frames_written

uint64_t frames_written

Frames the history has encoded.

Not the same number as optris_sdk_imager_get_recording_stats() reports: that one answers for a take, and a take and a history count different frames -- both run at once when an operator records alongside the history.

frames_write_error

uint64_t frames_write_error

Frames the history lost to a write or encode failure: a full disk, a removed drive, an encoder error.

frames_bytes_written

uint64_t frames_bytes_written

The size of the history's files, as the muxer reports it.

Not something ahead of the files. Every write ends in a flush, so read between two writes this equals what is on disk. What it lags is frames_written, by up to one Matroska Cluster -- it grows when the muxer closes one, not with every frame. A history is written all_intra by default, where every frame is a keyframe, so its Clusters close at nearly every frame and its steps are far finer than a take's.

It differs from bytes_on_disk in what it counts, not in how current it is: this one counts every segment this history has written, including the ones retention has since deleted, and so only ever grows. bytes_on_disk is what the directory holds now and is the number to show an operator.

For a write rate, read optris_sdk_recording_stats:: bytes_written_at_us on the take's statistics, which carries the time of each step. This field has no such stamp.

recording

int32_t recording

Non-zero while frames are still being written.

reserved0

int32_t reserved0

Padding. Zero.

last_error

char last_error[OPTRIS_SDK_MAX_MESSAGE]

The most recent failure, or an empty string. A full disk, a deletion that was refused, a segment that could not be opened.