2017-01-10 03:40:21 +00:00
|
|
|
|
2017-07-10 23:36:20 +00:00
|
|
|
extern crate bytes;
|
2017-01-10 03:40:21 +00:00
|
|
|
extern crate futures;
|
|
|
|
|
2017-09-23 03:58:03 +00:00
|
|
|
pub mod chunk;
|
2017-06-27 06:11:29 +00:00
|
|
|
pub mod ebml;
|
|
|
|
mod iterator;
|
2017-09-06 06:02:50 +00:00
|
|
|
pub mod timecode_fixer;
|
2017-06-27 06:11:29 +00:00
|
|
|
pub mod webm;
|
2017-01-12 05:41:35 +00:00
|
|
|
|
2017-06-27 06:11:29 +00:00
|
|
|
pub use ebml::{Error, Schema};
|
2017-01-24 08:20:49 +00:00
|
|
|
|
2017-01-10 03:40:21 +00:00
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
|
|
|
use futures::future::{ok, Future};
|
2017-06-28 05:54:30 +00:00
|
|
|
|
|
|
|
pub const TEST_FILE: &'static [u8] = include_bytes!("data/test1.webm");
|
2017-01-10 03:40:21 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn hello_futures() {
|
|
|
|
let my_future = ok::<String, ()>("Hello".into())
|
|
|
|
.map(|hello| hello + ", Futures!");
|
|
|
|
|
|
|
|
let string_result = my_future.wait().unwrap();
|
|
|
|
|
|
|
|
assert_eq!(string_result, "Hello, Futures!");
|
|
|
|
}
|
|
|
|
}
|