pub fn format(
        &self,
        _hint: &Hint,
        mut mss: MediaSourceStream,
        format_opts: &FormatOptions,
        metadata_opts: &MetadataOptions,
    ) -> Result<ProbeResult> {

        let mut metadata: MetadataQueue = Default::default();

        // Loop over all elements in the stream until a container format is found.
        loop {
            match self.next(&mut mss)? {
                // If a container format is found, return an instance to it's reader.
                Instantiate::Format(fmt) => {
                    let format = fmt(mss, format_opts)?;

                    return Ok(ProbeResult { format, metadata });
                }
                // If metadata was found, instantiate the metadata reader, read the metadata, and
                // push it onto the metadata queue.
                Instantiate::Metadata(meta) => {
                    let mut reader = meta(metadata_opts);
                    metadata.push(reader.read_all(&mut mss)?);

                    info!("chaining metadata element.");
                }
            }
        }

        // This function returns when either the end-of-stream is reached, an error occurs, or a
        // container format is found.
    }
/// Searches the provided `MediaSourceStream` for a container format. Any metadata that is read
/// during the search will be queued and attached to the `FormatReader` instance once a
/// container format is found.
Searches the provided `MediaSourceStream` for a container format. Any metadata that is read
during the search will be queued and attached to the `FormatReader` instance once a
container format is found.
Searches the provided ` MediaSourceStream ` for a container format . Any metadata that is read during the search will be queued and attached to the ` FormatReader ` instance once a container format is found .
pub fn format(
        &self,
        _hint: &Hint,
        mut mss: MediaSourceStream,
        format_opts: &FormatOptions,
        metadata_opts: &MetadataOptions,
    ) -> Result<ProbeResult> {
        let mut metadata: MetadataQueue = Default::default();
        // Loop over all elements in the stream until a container format is found.
        loop {
            match self.next(&mut mss)? {
                // If a container format is found, return an instance to it's reader.
                Instantiate::Format(fmt) => {
                    let format = fmt(mss, format_opts)?;
                    return Ok(ProbeResult { format, metadata });
                }
                // If metadata was found, instantiate the metadata reader, read the metadata, and
                // push it onto the metadata queue.
                Instantiate::Metadata(meta) => {
                    let mut reader = meta(metadata_opts);
                    metadata.push(reader.read_all(&mut mss)?);
                    info!("chaining metadata element.");
                }
            }
        }
        // This function returns when either the end-of-stream is reached, an error occurs, or a
        // container format is found.
    }
pub fn format ( & self , _hint : & Hint , mut mss : MediaSourceStream , format_opts : & FormatOptions , metadata_opts : & MetadataOptions , ) -> Result < ProbeResult > { let mut metadata : MetadataQueue = Default :: default ( ) ; // Loop over all elements in the stream until a container format is found. loop { match self . next ( & mut mss ) ? { // If a container format is found, return an instance to it's reader. Instantiate :: Format ( fmt ) => { let format = fmt ( mss , format_opts ) ? ; return Ok ( ProbeResult { format , metadata } ) ; } // If metadata was found, instantiate the metadata reader, read the metadata, and // push it onto the metadata queue. Instantiate :: Metadata ( meta ) => { let mut reader = meta ( metadata_opts ) ; metadata . push ( reader . read_all ( & mut mss ) ? ) ; info ! ( " " ) ; } } } // This function returns when either the end-of-stream is reached, an error occurs, or a // container format is found. }
Searches the provided `MediaSourceStream` for a container format.
Searches the provided ` MediaSourceStream ` for a container format .
&self
_hint
&Hint
mss
MediaSourceStream
format_opts
&FormatOptions
metadata_opts
&MetadataOptions
&self
_hint
&Hint
mss
MediaSourceStream
format_opts
&FormatOptions
metadata_opts
&MetadataOptions