From 2c34fe364fd0ba6b142e66677176c18814bc297a Mon Sep 17 00:00:00 2001 From: Daniel Gurgel Date: Thu, 20 Jun 2024 18:13:10 -0300 Subject: [PATCH] fix --- r-harmonium/src/rust/src/hfile.rs | 104 ++++++++++++++++-------------- 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/r-harmonium/src/rust/src/hfile.rs b/r-harmonium/src/rust/src/hfile.rs index fc062b7..98db6d4 100644 --- a/r-harmonium/src/rust/src/hfile.rs +++ b/r-harmonium/src/rust/src/hfile.rs @@ -24,7 +24,7 @@ struct HFile; struct HDecoderStream(Box); /// HDecodedAudio -/// An audio represented by an HArray of samples and its corresponding sampling rate. \ +/// An audio represented by an HArray of samples and its corresponding sampling rate. /// /// # Methods /// @@ -238,73 +238,77 @@ impl HFile { /// HFile /// ## metadata /// - /// `metadata(fpath: string, metadata_type: HMetadataType) -> list` \ + /// `metadata(fpath: string, metadata_type: HMetadataType) -> list` + /// + /// Extract text and visual metadata from a file. + /// + /// Tags that are part of the container format are preferentially extracted. Additional tags that were found while probing will not be extracted. /// - /// Extract text and visual metadata from a file. \ - /// Tags that are part of the container format are preferentially extracted. Additional tags that were found while probing will not be extracted. \ /// The following metadata tagging formats are supported. \ /// - /// - ID3v1 \ - /// - ID3v2 \ - /// - ISO/MP4 \ - /// - RIFF \ - /// - Vorbis Comment (in OGG & FLAC) \ + /// - ID3v1 + /// - ID3v2 + /// - ISO/MP4 + /// - RIFF + /// - Vorbis Comment (in OGG & FLAC) + /// + /// Each `TextMetadata` will be comprised of a `Tag`, which contains the following fields: /// - /// Each `TextMetadata` will be comprised of a `Tag`, which contains the following fields: \ - /// - tag_key \ - /// A key string indicating the type, meaning, or purpose of the Tags value. Note: The meaning of key is dependant on the underlying metadata format. \ - /// - tag_std_key \ + /// - tag_key + /// A key string indicating the type, meaning, or purpose of the Tags value. Note: The meaning of key is dependant of the underlying metadata format. + /// - tag_std_key /// If the Tag’s key string is commonly associated with a typical type, meaning, or purpose, then if recognized a StandardTagKey will be assigned /// to this Tag. This is a best effort guess since not all metadata formats have a well defined or specified tag mapping. However, it is recommended that - /// consumers prefer std_key over key, if provided. \ - /// Check [`StandardTagKey`] for all the variants. \ - /// - tag_value \ - /// The value of the Tag. \ + /// consumers prefer std_key over key, if provided. + /// Check [`StandardTagKey`] for all the variants. + /// - tag_value + /// The value of the Tag. /// - /// Each `VisualMetadata` will be comprised of the following fields: \ - /// - usage: \ + /// Each `VisualMetadata` will be comprised of the following fields: + /// + /// - usage /// The usage and/or content of the Visual. A string version of `symphonia_core::meta::StandardVisualKey`, which is an enumeration providing /// standardized keys for common visual dispositions. A demuxer may assign a StandardVisualKey to a Visual if the disposition of the attached visual - /// is known and can be mapped to a standard key. The visual types listed here are derived from, though do not entirely cover, the ID3v2 APIC frame specification. \ - /// - media_type \ - /// The Media Type (MIME Type) used to encode the Visual. \ - /// - dimensions \ - /// The dimensions (width and height) of the Visual, represented in pixels. \ + /// is known and can be mapped to a standard key. The visual types listed here are derived from, though do not entirely cover, the ID3v2 APIC frame specification. + /// - media_type + /// The Media Type (MIME Type) used to encode the Visual. + /// - dimensions + /// The dimensions (width and height) of the Visual, represented in pixels. /// Note: This value may not be accurate as it comes from metadata, not the - /// embedded graphic itself. Consider it only a hint. \ - /// - bits_per_pixel \ - /// The number of bits-per-pixel (aka bit-depth) of the unencoded image. \ - /// - color_mode \ - /// Indicates how the color of a pixel is encoded in a Visual. Variants: \ - /// -Discrete \ - /// Each pixel in the Visual stores its own color information. \ - /// -Indexed(NonZeroU32) \ - /// Each pixel in the Visual stores an index into a color palette containing the color information. The value stored by this variant indicates the number \ - /// of colors in the color palette. \ - /// - size \ - /// Size of the image in bytes. \ - /// - tag \ - /// `Tag` with the following fields: \ - /// - tag_key \ - /// A key string indicating the type, meaning, or purpose of the Tags value. Note: The meaning of key is dependant on the underlying metadata format. \ - /// - tag_std_key \ + /// embedded graphic itself. Consider it only a hint. + /// - bits_per_pixel + /// The number of bits-per-pixel (aka bit-depth) of the unencoded image. + /// - color_mode + /// Indicates how the color of a pixel is encoded in a Visual. Variants: + /// -Discrete + /// Each pixel in the Visual stores its own color information. + /// -Indexed(NonZeroU32) + /// Each pixel in the Visual stores an index into a color palette containing the color information. The value stored by this variant indicates the number + /// of colors in the color palette. + /// - size + /// Size of the image in bytes. + /// - tag + /// `Tag` with the following fields: + /// - tag_key + /// A key string indicating the type, meaning, or purpose of the Tags value. Note: The meaning of key is dependant on the underlying metadata format. + /// - tag_std_key /// If the Tag’s key string is commonly associated with a typical type, meaning, or purpose, then if recognized a StandardTagKey will be assigned /// to this Tag. This is a best effort guess since not all metadata formats have a well defined or specified tag mapping. However, it is recommended that - /// consumers prefer std_key over key, if provided. \ - /// Check [`StandardTagKey`] for all the variants. \ - /// - tag_value \ - /// The value of the Tag. \ + /// consumers prefer std_key over key, if provided. + /// Check [`StandardTagKey`] for all the variants. + /// - tag_value + /// The value of the Tag. /// /// #### Arguments /// - /// * `fpath` \ - /// The file path as a string. \ - /// * `metadata_type` \ - /// An `HMetadataType`. \ + /// * `fpath` + /// The file path as a string. + /// * `metadata_type` + /// An `HMetadataType`. /// /// #### Returns /// - /// A list of metadata. An empty list will be returned if there is no metadata in the file. \ + /// A list of metadata. An empty list will be returned if there is no metadata in the file. /// /// #### Examples ///