2017-01-09 22:40:21 -05:00
|
|
|
|
2017-07-10 19:36:20 -04:00
|
|
|
extern crate bytes;
|
2017-01-09 22:40:21 -05:00
|
|
|
extern crate futures;
|
|
|
|
|
2017-09-22 23:58:03 -04:00
|
|
|
pub mod chunk;
|
2017-06-27 02:11:29 -04:00
|
|
|
pub mod ebml;
|
|
|
|
mod iterator;
|
2017-09-06 02:02:50 -04:00
|
|
|
pub mod timecode_fixer;
|
2017-06-27 02:11:29 -04:00
|
|
|
pub mod webm;
|
2017-01-12 00:41:35 -05:00
|
|
|
|
2017-06-27 02:11:29 -04:00
|
|
|
pub use ebml::{Error, Schema};
|
2017-01-24 03:20:49 -05:00
|
|
|
|
2017-01-09 22:40:21 -05:00
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
|
|
|
use futures::future::{ok, Future};
|
2017-06-28 01:54:30 -04:00
|
|
|
|
|
|
|
pub const TEST_FILE: &'static [u8] = include_bytes!("data/test1.webm");
|
2017-01-09 22:40:21 -05: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!");
|
|
|
|
}
|
|
|
|
}
|