Function ogg_magic::utils::collect_ogg_vorbis_file

source ·
pub async fn collect_ogg_vorbis_file<R: AsyncReadExt + Unpin>(
    reader: R,
    tolerate: bool,
    header_search_range: usize,
) -> Result<Vec<OggVorbisPageResult>>
Expand description

Asynchronously collects all pages of an Ogg Vorbis file.

This function reads the entire Ogg Vorbis file and returns a vector of OggVorbisPageResult containing all the pages found in the file.

§Arguments

  • reader - An asynchronous reader implementing AsyncReadExt and Unpin.
  • tolerate - A boolean indicating whether to tolerate minor errors during reading.
  • header_search_range - The range in bytes to search for the header.

§Returns

A result containing a vector of OggVorbisPageResult if successful, or an io::Error if an error occurs.