pub struct BlockStreamInfo {
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_signature: [u8; 16],
}Expand description
Notes: FLAC specifies a minimum block size of 16 and a maximum block size of 65535, meaning the bit patterns corresponding to the numbers 0-15 in the minimum blocksize and maximum blocksize fields are invalid.
Fields§
§min_block_size: u16<16> The minimum block size (in samples) used in the stream.
max_block_size: u16<16> The maximum block size (in samples) used in the stream.
min_frame_size: u32<24> The minimum frame size (in bytes) used in the stream. May be 0 to imply the value is not known.
max_frame_size: u32<24> The maximum frame size (in bytes) used in the stream. May be 0 to imply the value is not known.
sample_rate: u32<20> Sample rate in Hz. Though 20 bits are available, the maximum sample rate is limited by the structure of frame headers to 655350Hz. Also, a value of 0 is invalid.
channels: u8<3> (number of channels)-1. FLAC supports from 1 to 8 channels
bits_per_sample: u8<5> (bits per sample)-1. FLAC supports from 4 to 32 bits per sample. Currently the reference encoder and decoders only support up to 24 bits per sample.
total_samples: u64<36> Total samples in stream. ‘Samples’ means inter-channel sample, i.e. one second of 44.1Khz audio will have 44100 samples regardless of the number of channels. A value of zero here means the number of total samples is unknown.
md5_signature: [u8; 16]<128> MD5 signature of the unencoded audio data. This allows the decoder to determine if an error exists in the audio data even when the error does not result in an invalid bitstream.
Implementations§
Source§impl BlockStreamInfo
impl BlockStreamInfo
Sourcepub fn is_fixed_blocksize_stream(&self) -> bool
pub fn is_fixed_blocksize_stream(&self) -> bool
(Minimum blocksize == maximum blocksize) implies a fixed-blocksize stream.
Trait Implementations§
Source§impl Debug for BlockStreamInfo
impl Debug for BlockStreamInfo
Source§impl Decode for BlockStreamInfo
impl Decode for BlockStreamInfo
Auto Trait Implementations§
impl Freeze for BlockStreamInfo
impl RefUnwindSafe for BlockStreamInfo
impl Send for BlockStreamInfo
impl Sync for BlockStreamInfo
impl Unpin for BlockStreamInfo
impl UnwindSafe for BlockStreamInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more