pub struct FfmpegPool { /* private fields */ }Expand description
TTL-bounded warm cache. The wrapper doesn’t keep the ffmpeg process alive across calls (we spawn per-call today) — the pool’s value is in caching the resolved pipeline descriptor
- metrics, which is where the meaningful cost sits for small audio chunks. A follow-up revision can upgrade to a pipe-in / pipe-out long-running ffmpeg worker without changing this API.
Implementations§
Source§impl FfmpegPool
impl FfmpegPool
pub fn new(config: FfmpegPoolConfig) -> Self
pub fn register(&self, pipeline: FfmpegPipeline)
Sourcepub fn execute(
&self,
pipeline: &FfmpegPipeline,
payload: &[u8],
) -> Result<Vec<u8>, OtsError>
pub fn execute( &self, pipeline: &FfmpegPipeline, payload: &[u8], ) -> Result<Vec<u8>, OtsError>
Execute ffmpeg for this pipeline. Spawns per-call today; future revision upgrades to a long-running pipe-in worker.
pub fn snapshot(&self) -> Vec<(String, u64, Duration)>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FfmpegPool
impl RefUnwindSafe for FfmpegPool
impl Send for FfmpegPool
impl Sync for FfmpegPool
impl Unpin for FfmpegPool
impl UnsafeUnpin for FfmpegPool
impl UnwindSafe for FfmpegPool
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.