Struct flac::stream::Stream [] [src]

pub struct Stream<P: StreamProducer> { /* fields omitted */ }

FLAC stream that decodes and hold file information.

Methods

impl<P> Stream<P> where
    P: StreamProducer
[src]

Constructor for the default state of a FLAC stream.

Returns information for the current stream.

Returns a slice of Metadata

This slice excludes StreamInfo, which is located in Stream::info. Everything else is related to metadata for the FLAC stream is in the slice.

Constructs a decoder with the given file name.

Failures

  • ErrorKind::IO(io::ErrorKind::NotFound) is returned when the given filename isn't found.
  • ErrorKind::IO(io::ErrorKind::InvalidData) is returned when the data within the file isn't valid FLAC data.
  • Several different parser specific errors that are structured as ErrorKind::<parser_name>Parser.
  • Several different invalidation specific errors that are structured as ErrorKind::Invalid<invalidation_name>.

Constructs a decoder with the given buffer.

This constructor assumes that an entire FLAC file is in the buffer.

Failures

  • ErrorKind::IO(io::ErrorKind::InvalidData) is returned when the data within the file isn't valid FLAC data.
  • Several different parser specific errors that are structured as ErrorKind::<parser_name>Parser.
  • Several different invalidation specific errors that are structured as ErrorKind::Invalid<invalidation_name>.

Returns an iterator over the decoded samples.