Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellga committed Jun 20, 2024
1 parent f5b2559 commit 2c34fe3
Showing 1 changed file with 54 additions and 50 deletions.
104 changes: 54 additions & 50 deletions r-harmonium/src/rust/src/hfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct HFile;
struct HDecoderStream(Box<dyn HDecoderStreamR>);

/// 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
///
Expand Down Expand Up @@ -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
///
Expand Down

0 comments on commit 2c34fe3

Please sign in to comment.