let mut transcoder = Transcoder::new();
let mut arg_idx = 1;
+ let mut printed_info = false;
while arg_idx < args.len() {
match args[arg_idx].as_str() {
"--list-decoders" => {
} else {
println!("No registered decoders.");
}
+ printed_info = true;
},
"--list-encoders" => {
if enc_reg.iter().len() > 0 {
} else {
println!("No registered encoders.");
}
+ printed_info = true;
},
"--list-demuxers" => {
print!("Registered demuxers:");
print!(" {}", dmx.get_name());
}
println!();
+ printed_info = true;
},
"--list-muxers" => {
print!("Registered muxers:");
print!(" {}", mux.get_name());
}
println!();
+ printed_info = true;
},
"--query-decoder-options" => {
next_arg!(args, arg_idx);
} else {
println!("codec {} is not found", cname);
}
+ printed_info = true;
},
"--query-demuxer-options" => {
next_arg!(args, arg_idx);
} else {
println!("demuxer {} is not found", dname);
}
+ printed_info = true;
},
"--query-encoder-options" => {
next_arg!(args, arg_idx);
} else {
println!("codec {} is not found", cname);
}
+ printed_info = true;
},
"--query-muxer-options" => {
next_arg!(args, arg_idx);
} else {
println!("muxer {} is not found", name);
}
+ printed_info = true;
},
"--input" => {
next_arg!(args, arg_idx);
arg_idx += 1;
}
+ if printed_info {
+ return;
+ }
+
if transcoder.input_name.len() == 0 {
println!("no input name provided");
return;