pub struct VideoProcessor;Expand description
VideoProcessor is just a prototype and not a real implementation when we decide to actual start video processing we will need to implement this.
Trait Implementations§
Source§impl VariantProcessor for VideoProcessor
impl VariantProcessor for VideoProcessor
type ProcessingOptions = VideoOptions
Source§fn get_valid_variants_for_content_type(_content_type: &str) -> Vec<FileVariant>
fn get_valid_variants_for_content_type(_content_type: &str) -> Vec<FileVariant>
Returns a list of valid variants for a given content type
If there are no valid variants for the content type, return an empty list
Source§fn get_content_type_for_variant(
_file: &FileDetails,
_variant: &FileVariant,
) -> String
fn get_content_type_for_variant( _file: &FileDetails, _variant: &FileVariant, ) -> String
Returns the content type for a given variant
Source§fn get_options_for_variant(
_file: &FileDetails,
_variant: &FileVariant,
) -> Result<VideoOptions, DynError>
fn get_options_for_variant( _file: &FileDetails, _variant: &FileVariant, ) -> Result<VideoOptions, DynError>
Returns the processing options for a given variant
If there are no options for this variant, return an error
Source§fn process<'life0, 'life1, 'life2, 'async_trait>(
origin_file_path: &'life0 str,
output_file_path: &'life1 str,
options: &'life2 VideoOptions,
) -> Pin<Box<dyn Future<Output = Result<String, DynError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process<'life0, 'life1, 'life2, 'async_trait>(
origin_file_path: &'life0 str,
output_file_path: &'life1 str,
options: &'life2 VideoOptions,
) -> Pin<Box<dyn Future<Output = Result<String, DynError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Processes the origin file and saves the output to the output_file_path based on the passed options
Returns the content type of the processed file or the original content type if no processing was done
Source§fn create_variant<'life0, 'life1, 'async_trait>(
file: &'life0 FileDetails,
variant: &'life1 FileVariant,
file_path: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<String, DynError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_variant<'life0, 'life1, 'async_trait>(
file: &'life0 FileDetails,
variant: &'life1 FileVariant,
file_path: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<String, DynError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a variant for the given file
If there are no options for this variant, return with the original content type
Auto Trait Implementations§
impl Freeze for VideoProcessor
impl RefUnwindSafe for VideoProcessor
impl Send for VideoProcessor
impl Sync for VideoProcessor
impl Unpin for VideoProcessor
impl UnsafeUnpin for VideoProcessor
impl UnwindSafe for VideoProcessor
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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