pub struct SyncReport {
pub audio_frames: u64,
pub video_frames: u64,
pub first_audio_pts: MediaTime,
pub first_video_pts: MediaTime,
pub last_audio_pts: MediaTime,
pub last_video_pts: MediaTime,
pub drift: MediaDuration,
}Expand description
Result of a single run capture.
Fields§
§audio_frames: u64Cumulative audio frames captured.
video_frames: u64Cumulative video frames captured.
first_audio_pts: MediaTimePTS of the first audio chunk’s first sample.
first_video_pts: MediaTimePTS of the first video frame.
last_audio_pts: MediaTimeEnd-of-window timestamp for the last audio chunk
(chunk.pts + chunk.duration). Reporting the chunk end (vs
start) keeps the drift calculation symmetric with video — see
the drift field doc.
last_video_pts: MediaTimeEnd-of-display timestamp for the last video frame
(frame.pts + 1/fps). Symmetric with last_audio_pts.
drift: MediaDuration|last_audio_pts - last_video_pts|. For synthetic test sources
this is near-zero by construction.
Implementations§
Source§impl SyncReport
impl SyncReport
Sourcepub fn drift_within(&self, tolerance: MediaDuration) -> bool
pub fn drift_within(&self, tolerance: MediaDuration) -> bool
True when the inter-stream drift is within tolerance.
Trait Implementations§
Source§impl Clone for SyncReport
impl Clone for SyncReport
Source§fn clone(&self) -> SyncReport
fn clone(&self) -> SyncReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SyncReport
impl Debug for SyncReport
Source§impl Display for SyncReport
impl Display for SyncReport
impl Copy for SyncReport
Auto Trait Implementations§
impl Freeze for SyncReport
impl RefUnwindSafe for SyncReport
impl Send for SyncReport
impl Sync for SyncReport
impl Unpin for SyncReport
impl UnsafeUnpin for SyncReport
impl UnwindSafe for SyncReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more