pub struct AvOffset {
pub offset_ms: f64,
pub confidence: f64,
pub method: DetectionMethod,
}Expand description
A/V offset measurement between audio and video
Fields§
§offset_ms: f64Offset in milliseconds (positive = audio ahead, negative = video ahead)
confidence: f64Confidence in the measurement (0.0 to 1.0)
method: DetectionMethodDetection method used
Implementations§
Source§impl AvOffset
impl AvOffset
Sourcepub fn new(offset_ms: f64, confidence: f64, method: DetectionMethod) -> Self
pub fn new(offset_ms: f64, confidence: f64, method: DetectionMethod) -> Self
Create a new A/V offset
Sourcepub fn to_samples(&self, sample_rate: u32) -> i64
pub fn to_samples(&self, sample_rate: u32) -> i64
Convert offset to samples at a given sample rate
Sourcepub fn within_itu_tolerance(&self) -> bool
pub fn within_itu_tolerance(&self) -> bool
Is the offset within the ITU tolerance window?
Sourcepub fn within_comfortable_tolerance(&self) -> bool
pub fn within_comfortable_tolerance(&self) -> bool
Is the offset within comfortable viewer tolerance?
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AvOffset
impl<'de> Deserialize<'de> for AvOffset
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for AvOffset
impl StructuralPartialEq for AvOffset
Auto Trait Implementations§
impl Freeze for AvOffset
impl RefUnwindSafe for AvOffset
impl Send for AvOffset
impl Sync for AvOffset
impl Unpin for AvOffset
impl UnsafeUnpin for AvOffset
impl UnwindSafe for AvOffset
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.