Function ogg_magic::utils::update_ogg_vorbis_comments

source ·
pub fn update_ogg_vorbis_comments(
    ogg_vorbis_file: Vec<OggVorbisPageResult>,
    comments_page_index: usize,
    comments_index: usize,
    new_comments: HashMap<String, Vec<String>>,
) -> Vec<OggVorbisPageResult>
Expand description

Updates the comments in an Ogg Vorbis file.

This function replaces the comment packet at the specified position with new comments provided as a HashMap. The updated Ogg Vorbis file is returned as a vector of OggVorbisPageResult.

§Arguments

  • ogg_vorbis_file - A vector of OggVorbisPageResult representing the Ogg Vorbis file.
  • comments_page_index - The index of the page containing the comment packet to update.
  • comments_index - The index of the comment packet within the specified page.
  • new_comments - A HashMap containing the new comments to replace the existing ones.

§Returns

A vector of OggVorbisPageResult representing the updated Ogg Vorbis file.