Skip to main content

CompMedia

Struct CompMedia 

Source
pub struct CompMedia<'a> {
    pub fp: &'a dyn Fingerprinter,
    pub dims: &'a dyn Fn(&Path) -> Result<(u32, u32)>,
    pub profile: Option<ProbeProfile<'a>>,
    pub rate: Option<ProbeRate<'a>>,
}
Expand description

What a comp’s lowering reads of its media: probed sizes (dims), camera profiles for camera: auto (profile; None: every source is display-referred), frame rates for time remaps (rate; None: a remap is an error) and fingerprints.

Fields§

§fp: &'a dyn Fingerprinter§dims: &'a dyn Fn(&Path) -> Result<(u32, u32)>§profile: Option<ProbeProfile<'a>>§rate: Option<ProbeRate<'a>>

Trait Implementations§

Source§

impl Media for CompMedia<'_>

Source§

fn dims(&self, path: &Path) -> Result<(u32, u32)>

A video’s or still’s display size, px (rotation and HEIF grids applied).
Source§

fn identity(&self, path: &Path) -> Value

The file’s identity in keys (a fingerprint: path, size, modification time).
Source§

fn ffmpeg_build(&self) -> String

The ffmpeg build that runs filter nodes (in their keys).
Source§

fn content_hash(&self, path: &Path) -> Value

A small file’s contents in keys (a filter node’s LUTs, fonts, text files): by default its identity.
Source§

fn profile(&self, path: &Path) -> Result<Profile>

A video’s or still’s camera profile for camera: auto (Profile::detect_file).
Source§

fn video_rate(&self, path: &Path) -> Result<(f64, u64)>

A video’s average frame rate and frame count, for time remapping.
Source§

fn camera_lut(&self, profile: Profile) -> Result<Option<CameraLut>, Error>

profile’s camera LUT (None for display-referred profiles).

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for CompMedia<'a>

§

impl<'a> !Send for CompMedia<'a>

§

impl<'a> !Sync for CompMedia<'a>

§

impl<'a> !UnwindSafe for CompMedia<'a>

§

impl<'a> Forget for CompMedia<'a>

§

impl<'a> Freeze for CompMedia<'a>

§

impl<'a> Unpin for CompMedia<'a>

§

impl<'a> UnsafeUnpin for CompMedia<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.