-extern crate nihav;
+extern crate nihav_core;
+extern crate nihav_allstuff;
use std::io::SeekFrom;
use std::fs::File;
use std::path::Path;
-use nihav::io::byteio::{FileReader, ByteReader};
-use nihav::frame::*;
-use nihav::codecs::*;
-use nihav::demuxers::*;
-use nihav::detect;
+use nihav_core::io::byteio::{FileReader, ByteReader};
+use nihav_core::frame::*;
+use nihav_core::codecs::*;
+use nihav_core::demuxers::*;
+use nihav_core::detect;
+use nihav_allstuff::*;
use std::env;
mod frmwriter;
}
let (dmx_name, _) = res.unwrap();
println!("trying demuxer {} on {}", dmx_name, name);
- dmx_fact = find_demuxer(dmx_name).unwrap();
+
+ let mut dmx_reg = RegisteredDemuxers::new();
+ nihav_register_all_demuxers(&mut dmx_reg);
+ let mut dec_reg = RegisteredDecoders::new();
+ nihav_register_all_codecs(&mut dec_reg);
+
+ dmx_fact = dmx_reg.find_demuxer(dmx_name).unwrap();
br.seek(SeekFrom::Start(0)).unwrap();
let mut dmx = create_demuxer(dmx_fact, &mut br).unwrap();
for i in 0..dmx.get_num_streams() {
let s = dmx.get_stream(i).unwrap();
let info = s.get_info();
- let decfunc = find_decoder(info.get_name());
+ let decfunc = dec_reg.find_decoder(info.get_name());
println!("stream {} - {} {}", i, s, info.get_name());
let str_id = s.get_id();
let mut has_out = false;