pub struct MediaMetadata {Show 15 fields
pub path: PathBuf,
pub size: u64,
pub title: Option<String>,
pub duration: Option<f64>,
pub width: Option<u32>,
pub height: Option<u32>,
pub bitrate: Option<u64>,
pub framerate: Option<f64>,
pub sample_rate: Option<u32>,
pub channels: Option<u16>,
pub video_codec: Option<String>,
pub audio_codec: Option<String>,
pub container: Option<String>,
pub created: Option<i64>,
pub modified: Option<i64>,
}Expand description
Media metadata.
Fields§
§path: PathBufFile path
size: u64File size in bytes
title: Option<String>Human-readable title (e.g., from ID3/MP4 title tag). Used for fuzzy title matching in addition to filename comparison.
duration: Option<f64>Duration in seconds (for audio/video)
width: Option<u32>Video width (if video)
height: Option<u32>Video height (if video)
bitrate: Option<u64>Bitrate in bits per second
framerate: Option<f64>Frame rate (if video)
sample_rate: Option<u32>Sample rate (if audio)
channels: Option<u16>Number of audio channels
video_codec: Option<String>Video codec
audio_codec: Option<String>Audio codec
container: Option<String>Container format
created: Option<i64>Creation timestamp
modified: Option<i64>Modified timestamp
Implementations§
Source§impl MediaMetadata
impl MediaMetadata
Sourcepub fn resolution(&self) -> Option<String>
pub fn resolution(&self) -> Option<String>
Get resolution as string (e.g., “1920x1080”).
Sourcepub fn aspect_ratio(&self) -> Option<f64>
pub fn aspect_ratio(&self) -> Option<f64>
Calculate aspect ratio.
Trait Implementations§
Source§impl Clone for MediaMetadata
impl Clone for MediaMetadata
Source§fn clone(&self) -> MediaMetadata
fn clone(&self) -> MediaMetadata
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 MediaMetadata
impl Debug for MediaMetadata
Source§impl PartialEq for MediaMetadata
impl PartialEq for MediaMetadata
Source§fn eq(&self, other: &MediaMetadata) -> bool
fn eq(&self, other: &MediaMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MediaMetadata
Auto Trait Implementations§
impl Freeze for MediaMetadata
impl RefUnwindSafe for MediaMetadata
impl Send for MediaMetadata
impl Sync for MediaMetadata
impl Unpin for MediaMetadata
impl UnsafeUnpin for MediaMetadata
impl UnwindSafe for MediaMetadata
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 more