pub struct RecordingReport { /* private fields */ }Expand description
What the recorder’s events have shown about a session so far.
A confirmed closure means the SDK finalized every file it opened. It says nothing about frames dropped while recording, or about the data having reached stable storage.
Implementations§
Source§impl RecordingReport
impl RecordingReport
Sourcepub fn session(&self) -> u64
pub fn session(&self) -> u64
The session’s number, counting from one for each recorder; zero when the recorder has not started a session.
Sourcepub fn closure_confirmed(&self) -> bool
pub fn closure_confirmed(&self) -> bool
Whether at least one file was reported closed, every reported open was matched by its close, and file tracking stayed complete.
A session that ends before reporting any file has no confirmed closure, even when no event was lost and no cleanup remains pending.
Sourcepub fn closed_files(&self) -> u64
pub fn closed_files(&self) -> u64
How many files were reported closed, including those closed by rollovers.
The SDK reports a file closed whether or not anything was written to
it; see empty_files.
Sourcepub fn empty_files(&self) -> u64
pub fn empty_files(&self) -> u64
How many closed files were confirmed to contain no audio or video.
The SDK opens a file as soon as a session or a rollover starts, and closes it as finalized even if no frame ever reached it: a stop before the source delivered anything, a switch to a source that is not there, a rollover while the source is lost. Such a file is empty or holds only a header, and may not open in a player. A file counts here when it closed under complete tracking without a reported first frame.
The count is exact when closure_confirmed
is true. Otherwise it is a lower bound: files confirmed empty before
tracking became incomplete remain counted, while later closes cannot
establish that a missing first-frame event was never delivered.
Always zero for a recorder that records neither audio nor video, because the SDK reports no first frame for metadata.
Sourcepub fn error_events(&self) -> u64
pub fn error_events(&self) -> u64
How many open-failed and error events were seen.
Sourcepub fn write_failures(&self) -> u64
pub fn write_failures(&self) -> u64
How many write-failed events were seen. Not every one is fatal: a stream that appears after a file was opened is dropped until the next rollover.
Sourcepub fn dropped_events(&self) -> u64
pub fn dropped_events(&self) -> u64
How many events the SDK discarded during the session because they were not taken in time.
Sourcepub fn last_closed_path(&self) -> Option<&EventText>
pub fn last_closed_path(&self) -> Option<&EventText>
The path of the file reported closed last, as the SDK gave it.
Sourcepub fn stopped_by_sdk(&self) -> bool
pub fn stopped_by_sdk(&self) -> bool
Whether the SDK ended the session by itself, rather than because it was asked to stop.
True once the session has ended, as RecorderState::Closed or
RecorderState::Indeterminate, without a stop requested through
request_stop,
finish, abandon
or dropping the recorder. The SDK ends a session after an error it
cannot recover from, such as a new file it cannot open, and at a
format change when the recorder does not roll over; the report’s
error_events then usually say why. A stop
requested after the SDK had already stopped recording does not count
as the caller’s.
False while the session is open, and for a session that ran until it was asked to stop. A closed session with this true was finalized, but did not record for as long as intended.