pub trait Ffmpeg {
// Required methods
fn wav_to_lossless(
&self,
wav: &[u8],
format: AudioFormat,
) -> 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_lossless(
&self,
wav: &[u8],
format: AudioFormat,
) -> impl Future<Output = Result<Vec<u8>, FfmpegError>> + Send
fn wav_to_lossless( &self, wav: &[u8], format: AudioFormat, ) -> impl Future<Output = Result<Vec<u8>, FfmpegError>> + Send
Transcode wav to the given lossless format’s 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_lossless 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".