Struct metaflac::block::StreamInfo[][src]

pub struct StreamInfo {
    pub min_block_size: u16,
    pub max_block_size: u16,
    pub min_frame_size: u32,
    pub max_frame_size: u32,
    pub sample_rate: u32,
    pub num_channels: u8,
    pub bits_per_sample: u8,
    pub total_samples: u64,
    pub md5: Vec<u8>,
}
Expand description

A structure representing a STREAMINFO block.

Fields

min_block_size: u16

The minimum block size (in samples) used in the stream.

max_block_size: u16

The maximum block size (in samples) used in the stream.

min_frame_size: u32

The minimum frame size (in bytes) used in the stream.

max_frame_size: u32

The maximum frame size (in bytes) used in the stream.

sample_rate: u32

Sample rate in Hz.

num_channels: u8

Number of channels. FLAC supports from 1 to 8 channels.

bits_per_sample: u8

Bits per sample. FLAC supports from 4 to 32 bits per sample.

total_samples: u64

Total samples in stream.

md5: Vec<u8>

MD5 signature of the unencoded audio data.

Implementations

Returns a new StreamInfo with zero/empty values.

Parses the bytes as a StreamInfo block.

Returns a vector representation of the streaminfo block suitable for writing to a file.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.