Struct simplemad::Decoder
[−]
[src]
pub struct Decoder<R> where R: Read {
// some fields omitted
}
An interface for the decoding operation
Create a decoder using decode
or decode_interval
. Fetch
results with get_frame
or the Iterator
interface.
Methods
impl<R> Decoder<R> where R: Read
fn decode(reader: R) -> Result<Decoder<R>, SimplemadError>
Decode a file in full
fn decode_headers(reader: R) -> Result<Decoder<R>, SimplemadError>
Decode only the header information of each frame
fn decode_interval(reader: R, start_time: Duration, end_time: Duration) -> Result<Decoder<R>, SimplemadError>
Decode part of a file from start_time
to end_time
fn get_frame(&mut self) -> Result<Frame, SimplemadError>
Get the next decoding result, either a Frame
or a SimplemadError