pub fn name(&self) -> Result<String> {
        let (_, ty) = self.media()?;
        let ext = match ty {
            MediaType::Mp4 => ".mp4",
            MediaType::Avi => ".avi",
            MediaType::Mkv => ".mkv",
            MediaType::Webm => ".webm",
            MediaType::Gif => ".gif",
            MediaType::Mov => ".mov",
        };
        match &self.output_name {
            Some(string) => {
                if !string.contains(ext) {
                    return Ok(format!("{}{}", string, ext));
                }
                Ok(string.to_owned())
            }
            None => Ok(format!("{}{}", random_name(), ext)),
        }
    }
/// Returns the name of the output media.
///
/// # Errors
/// Returns an [`UnsupportedMediaFormat`] error if
/// the input file is unsupported.
///
/// [`UnsupportedMediaFormat`]: crate::error::ErrorKind::UnsupportedMediaFormat
Returns the name of the output media.
Returns the name of the output media .
pub fn name(&self) -> Result<String> {
        let (_, ty) = self.media()?;
        let ext = match ty {
            MediaType::Mp4 => ".mp4",
            MediaType::Avi => ".avi",
            MediaType::Mkv => ".mkv",
            MediaType::Webm => ".webm",
            MediaType::Gif => ".gif",
            MediaType::Mov => ".mov",
        };
        match &self.output_name {
            Some(string) => {
                if !string.contains(ext) {
                    return Ok(format!("{}{}", string, ext));
                }
                Ok(string.to_owned())
            }
            None => Ok(format!("{}{}", random_name(), ext)),
        }
    }
pub fn name ( & self ) -> Result < String > { let ( _ , ty ) = self . media ( ) ? ; let ext = match ty { MediaType :: Mp4 => " " , MediaType :: Avi => " " , MediaType :: Mkv => " " , MediaType :: Webm => " " , MediaType :: Gif => " " , MediaType :: Mov => " " , } ; match & self . output_name { Some ( string ) => { if ! string . contains ( ext ) { return Ok ( format ! ( " " string ext ) ) ; } Ok ( string . to_owned ( ) ) } None => Ok ( format ! ( " " random_name ( ) ext ) ) , } }
Returns the name of the output media.
Returns the name of the output media .
&self
&self
errors
Returns an [`UnsupportedMediaFormat`] error if
the input file is unsupported.

[`UnsupportedMediaFormat`]: crate::error::ErrorKind::UnsupportedMediaFormat
Returns an [ ` UnsupportedMediaFormat ` ] error if the input file is unsupported . [ ` UnsupportedMediaFormat ` ] : crate :: error :: ErrorKind :: UnsupportedMediaFormat