Struct flac::metadata::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 channels: u8,
    pub bits_per_sample: u8,
    pub total_samples: u64,
    pub md5_sum: [u8; 16],
}

Information regarding the entire audio stream.

Fields

min_block_size

Minimum block size, in samples, used in the stream.

max_block_size

Maximum block size, in samples, used in the stream.

min_frame_size

Minimum frame size, in bytes, used in the stream. May be zero to imply the value isn't know.

max_frame_size

Maximum frame size, in bytes, used in the stream. May be zero to imply the value isn't know.

sample_rate

Sample rate in hertz (Hz).

channels

Number of channels. FLAC supports one to eight channel.

bits_per_sample

Bits per sample. FLAC supports four to thirty-two bits per sample.

total_samples

Total samples in the stream. A value of zero means the number is unknown.

md5_sum

MD5 signature of the unencoded audio data.

Methods

impl StreamInfo

fn is_varied_block_size(&self) -> bool

Returns true if min_block_size and max_block_size are different, otherwise false.

fn is_fixed_block_size(&self) -> bool

Returns true if min_block_size and max_block_size are equal, otherwise false.

fn bytes_len(&self) -> usize

fn to_bytes<Write: Write>(&self, buffer: &mut Write) -> Result<()>

Trait Implementations

Derived Implementations

impl Eq for StreamInfo

impl PartialEq for StreamInfo

fn eq(&self, __arg_0: &StreamInfo) -> bool

fn ne(&self, __arg_0: &StreamInfo) -> bool

impl Default for StreamInfo

fn default() -> StreamInfo

impl Debug for StreamInfo

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Copy for StreamInfo

impl Clone for StreamInfo

fn clone(&self) -> StreamInfo

1.0.0fn clone_from(&mut self, source: &Self)