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

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>,
}

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.

Methods

impl StreamInfo[src]

pub fn new() -> StreamInfo[src]

Returns a new StreamInfo with zero/empty values.

pub fn from_bytes(bytes: &[u8]) -> StreamInfo[src]

Parses the bytes as a StreamInfo block.

pub fn to_bytes(&self) -> Vec<u8>[src]

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

Trait Implementations

impl Clone for StreamInfo[src]

impl Eq for StreamInfo[src]

impl PartialEq<StreamInfo> for StreamInfo[src]

impl Debug for StreamInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]