pub struct AVToolHandler {
pub config: Config,
pub gcs: GcsClient,
/* private fields */
}Expand description
AVTool handler for FFmpeg-based media processing.
Fields§
§config: ConfigApplication configuration.
gcs: GcsClientGCS client for storage operations.
Implementations§
Source§impl AVToolHandler
impl AVToolHandler
Sourcepub async fn new(config: Config) -> Result<Self, Error>
pub async fn new(config: Config) -> Result<Self, Error>
Create a new AVToolHandler with the given configuration.
§Errors
Returns an error if GCS client initialization fails.
Sourcepub fn is_gcs_uri(path: &str) -> bool
pub fn is_gcs_uri(path: &str) -> bool
Check if a path is a GCS URI.
Sourcepub async fn resolve_input(&self, path: &str) -> Result<PathBuf, Error>
pub async fn resolve_input(&self, path: &str) -> Result<PathBuf, Error>
Resolve an input path, downloading from GCS if necessary.
Returns the local path to use for FFmpeg operations.
Sourcepub async fn handle_output(
&self,
local_path: &Path,
output: &str,
) -> Result<String, Error>
pub async fn handle_output( &self, local_path: &Path, output: &str, ) -> Result<String, Error>
Handle output, uploading to GCS if the output path is a GCS URI.
Returns the final output path (GCS URI or local path).
Sourcepub async fn get_media_info(
&self,
params: GetMediaInfoParams,
) -> Result<MediaInfo, Error>
pub async fn get_media_info( &self, params: GetMediaInfoParams, ) -> Result<MediaInfo, Error>
Get media file information using ffprobe.
Sourcepub async fn convert_wav_to_mp3(
&self,
params: ConvertAudioParams,
) -> Result<String, Error>
pub async fn convert_wav_to_mp3( &self, params: ConvertAudioParams, ) -> Result<String, Error>
Convert WAV to MP3.
Sourcepub async fn video_to_gif(
&self,
params: VideoToGifParams,
) -> Result<String, Error>
pub async fn video_to_gif( &self, params: VideoToGifParams, ) -> Result<String, Error>
Convert video to GIF.
Sourcepub async fn combine_audio_video(
&self,
params: CombineAvParams,
) -> Result<String, Error>
pub async fn combine_audio_video( &self, params: CombineAvParams, ) -> Result<String, Error>
Combine audio and video.
Sourcepub async fn overlay_image(
&self,
params: OverlayImageParams,
) -> Result<String, Error>
pub async fn overlay_image( &self, params: OverlayImageParams, ) -> Result<String, Error>
Overlay image on video.
Sourcepub async fn concatenate(
&self,
params: ConcatenateParams,
) -> Result<String, Error>
pub async fn concatenate( &self, params: ConcatenateParams, ) -> Result<String, Error>
Concatenate media files.
Sourcepub async fn adjust_volume(
&self,
params: AdjustVolumeParams,
) -> Result<String, Error>
pub async fn adjust_volume( &self, params: AdjustVolumeParams, ) -> Result<String, Error>
Adjust audio volume.
Sourcepub async fn layer_audio(
&self,
params: LayerAudioParams,
) -> Result<String, Error>
pub async fn layer_audio( &self, params: LayerAudioParams, ) -> Result<String, Error>
Layer multiple audio files.
Auto Trait Implementations§
impl Freeze for AVToolHandler
impl !RefUnwindSafe for AVToolHandler
impl Send for AVToolHandler
impl Sync for AVToolHandler
impl Unpin for AVToolHandler
impl UnsafeUnpin for AVToolHandler
impl !UnwindSafe for AVToolHandler
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request