pub struct Resample {
pub from_hz: u32,
pub to_hz: u32,
}Fields§
§from_hz: u32§to_hz: u32Implementations§
Trait Implementations§
Source§impl Transformer for Resample
impl Transformer for Resample
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 Resample
impl RefUnwindSafe for Resample
impl Send for Resample
impl Sync for Resample
impl Unpin for Resample
impl UnsafeUnpin for Resample
impl UnwindSafe for Resample
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.