pub trait Ffmpeg {
// Required methods
fn wav_to_flac(
&self,
wav: &[u8],
) -> impl Future<Output = Result<Vec<u8>, FfmpegError>> + Send;
fn mp4_to_webp(
&self,
mp4: &[u8],
settings: WebpEncodeSettings,
) -> impl Future<Output = Result<Vec<u8>, FfmpegError>> + Send;
}Expand description
The ffmpeg port the executor transcodes through.
Async so the adapter can offload the blocking child process without stalling the runtime; tests resolve immediately.
Required Methods§
Sourcefn wav_to_flac(
&self,
wav: &[u8],
) -> impl Future<Output = Result<Vec<u8>, FfmpegError>> + Send
fn wav_to_flac( &self, wav: &[u8], ) -> impl Future<Output = Result<Vec<u8>, FfmpegError>> + Send
Transcode wav to FLAC bytes.
Sourcefn mp4_to_webp(
&self,
mp4: &[u8],
settings: WebpEncodeSettings,
) -> impl Future<Output = Result<Vec<u8>, FfmpegError>> + Send
fn mp4_to_webp( &self, mp4: &[u8], settings: WebpEncodeSettings, ) -> impl Future<Output = Result<Vec<u8>, FfmpegError>> + Send
Transcode an MP4 video preview to animated WebP bytes under settings.
Used to derive a clip’s cover.webp sidecar from its video_cover_url
MP4. Like wav_to_flac the adapter offloads the
blocking child process; tests resolve immediately.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".