pub struct ContainerProbeResult {
pub video_present: bool,
pub audio_present: bool,
pub subtitle_present: bool,
pub confidence: f32,
pub format_label: String,
}Expand description
Summary flags produced by probing a container’s header region.
Fields§
§video_present: boolWhether at least one video track was detected.
audio_present: boolWhether at least one audio track was detected.
subtitle_present: boolWhether at least one subtitle track was detected.
confidence: f32Confidence of the format detection in the range [0.0, 1.0].
format_label: StringRaw format name string as reported by the container layer.
Implementations§
Source§impl ContainerProbeResult
impl ContainerProbeResult
Sourcepub fn new(format_label: impl Into<String>) -> Self
pub fn new(format_label: impl Into<String>) -> Self
Creates a new probe result with default confidence of 1.0.
Sourcepub fn is_av(&self) -> bool
pub fn is_av(&self) -> bool
Returns true for multimedia containers that have both video and audio.
Sourcepub fn is_confident(&self, threshold: f32) -> bool
pub fn is_confident(&self, threshold: f32) -> bool
Returns true when confidence is at or above threshold.
Trait Implementations§
Source§impl Clone for ContainerProbeResult
impl Clone for ContainerProbeResult
Source§fn clone(&self) -> ContainerProbeResult
fn clone(&self) -> ContainerProbeResult
Returns a duplicate of the value. Read more
1.0.0 · 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 ContainerProbeResult
impl Debug for ContainerProbeResult
Source§impl PartialEq for ContainerProbeResult
impl PartialEq for ContainerProbeResult
impl StructuralPartialEq for ContainerProbeResult
Auto Trait Implementations§
impl Freeze for ContainerProbeResult
impl RefUnwindSafe for ContainerProbeResult
impl Send for ContainerProbeResult
impl Sync for ContainerProbeResult
impl Unpin for ContainerProbeResult
impl UnsafeUnpin for ContainerProbeResult
impl UnwindSafe for ContainerProbeResult
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