TranscodeProfileBuilder

Struct TranscodeProfileBuilder 

Source
pub struct TranscodeProfileBuilder { /* private fields */ }
Expand description

Pure builder for TranscodeProfile.

This builder does not call any host APIs and can be tested locally.

Implementations§

Source§

impl TranscodeProfileBuilder

Source

pub fn new(profile: impl Into<String>, input_id: impl Into<String>) -> Self

Create a new profile builder.

  • profile: Target FFmpeg profile (e.g., “mini”, “remux”, “thumbnail”).
  • input_id: Input resource ID (UUID) or “pipe:0”.
Source

pub fn new_pipe(profile: impl Into<String>) -> Self

Create a builder that uses stdin as input (input_id = "pipe:0").

Source

pub fn option(self, key: impl Into<String>, value: impl Into<String>) -> Self

Add a key/value FFmpeg option (encoded as -key=value).

Source

pub fn flag(self, key: impl Into<String>) -> Self

Add a flag-style FFmpeg option (encoded as -key).

Source

pub fn options<I, K, V>(self, options: I) -> Self
where I: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Add a batch of key/value options.

Source

pub fn format(self, format: &str) -> Self

Helper: Set output format (equivalent to -f=format).

Source

pub fn seek(self, start: &str, duration: Option<&str>) -> Self

Helper: Set seek window (equivalent to -ss + optional -t).

Source

pub fn build(self) -> TranscodeProfile

Builds the TranscodeProfile payload.

Auto Trait Implementations§

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.