use nihav_core::scale::*;
use nihav_core::soundcvt::*;
use nihav_registry::detect;
+use nihav_registry::register;
use nihav_allstuff::*;
use std::env;
let mut arg_idx = 1;
while arg_idx < args.len() {
match args[arg_idx].as_str() {
+ "--list-decoders" => {
+ if dec_reg.iter().len() > 0 {
+ println!("Registered decoders:");
+ for dec in dec_reg.iter() {
+ let cdesc = register::get_codec_description(dec.name);
+ let full_name = if let Some(cd) = cdesc { cd.get_full_name() } else { "???" };
+ println!(" {} ({})", dec.name, full_name);
+ }
+ } else {
+ println!("No registered decoders.");
+ }
+ },
+ "--list-encoders" => {
+ if enc_reg.iter().len() > 0 {
+ println!("Registered encoders:");
+ for enc in enc_reg.iter() {
+ let cdesc = register::get_codec_description(enc.name);
+ let full_name = if let Some(cd) = cdesc { cd.get_full_name() } else { "???" };
+ println!(" {} ({})", enc.name, full_name);
+ }
+ } else {
+ println!("No registered encoders.");
+ }
+ },
+ "--list-demuxers" => {
+ print!("Registered demuxers:");
+ for dmx in dmx_reg.iter() {
+ print!(" {}", dmx.get_name());
+ }
+ println!();
+ },
+ "--list-muxers" => {
+ print!("Registered muxers:");
+ for mux in mux_reg.iter() {
+ print!(" {}", mux.get_name());
+ }
+ println!();
+ },
"--query-decoder-options" => {
next_arg!(args, arg_idx);
let cname = args[arg_idx].as_str();