Skip to main content

mkv_parser_kit/
lib.rs

1// Copyright (C) The Strand-Braid Authors
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4pub use ebml_types::{BoxData, EbmlElement, Tag};
5pub use error::{Error, Result};
6
7mod de;
8mod ebml_types;
9mod error;
10mod parser;
11
12pub fn ebml_parse<R>(mut rdr: R) -> Result<(Vec<EbmlElement>, R)>
13where
14    R: std::io::Read + std::io::Seek,
15{
16    let elements = crate::de::Deserializer::from_reader(&mut rdr, 0, 0)
17        .collect::<Result<Vec<EbmlElement>>>()?;
18    Ok((elements, rdr))
19}