pub struct FfmpegTransformer {
pub pipeline: FfmpegPipeline,
pub pool: Arc<FfmpegPool>,
pub cost_hint: u32,
}Expand description
Transformer that routes through the shared pool. Adopters
create one per FfmpegPipeline they register.
Fields§
§pipeline: FfmpegPipeline§pool: Arc<FfmpegPool>§cost_hint: u32Trait Implementations§
Source§impl Transformer for FfmpegTransformer
impl Transformer for FfmpegTransformer
fn source_kind(&self) -> BufferKind
fn sink_kind(&self) -> BufferKind
fn backend(&self) -> TransformerBackend
Source§fn cost_hint(&self) -> u32
fn cost_hint(&self) -> u32
Relative cost. Dijkstra’s shortest-path picks the path with
the smallest sum. Native transcoders should be ~1; ffmpeg
subprocess ~10 so native wins when both exist.
Source§fn transform(&self, input: &ZeroCopyBuffer) -> Result<ZeroCopyBuffer, OtsError>
fn transform(&self, input: &ZeroCopyBuffer) -> Result<ZeroCopyBuffer, OtsError>
Perform the conversion.
input.kind() MUST equal
Self::source_kind; the returned buffer’s kind() MUST
equal Self::sink_kind. The pipeline verifies this
invariant to catch registry drift.Auto Trait Implementations§
impl Freeze for FfmpegTransformer
impl RefUnwindSafe for FfmpegTransformer
impl Send for FfmpegTransformer
impl Sync for FfmpegTransformer
impl Unpin for FfmpegTransformer
impl UnsafeUnpin for FfmpegTransformer
impl UnwindSafe for FfmpegTransformer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.