2018-04-11 05:39:28 +00:00
|
|
|
#[macro_use] extern crate clap;
|
|
|
|
extern crate futures;
|
|
|
|
extern crate hyper;
|
|
|
|
extern crate webmetro;
|
|
|
|
|
|
|
|
mod commands;
|
2018-04-11 04:55:41 +00:00
|
|
|
|
|
|
|
use clap::{App, AppSettings};
|
2018-04-11 05:39:28 +00:00
|
|
|
use commands::{relay};
|
2018-04-11 04:55:41 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let args = App::new("webmetro")
|
|
|
|
.version(crate_version!())
|
|
|
|
.about("Utilities for broadcasting & relaying live WebM video/audio streams")
|
|
|
|
.setting(AppSettings::SubcommandRequired)
|
|
|
|
.setting(AppSettings::VersionlessSubcommands)
|
2018-04-11 05:39:28 +00:00
|
|
|
.subcommand(relay::args())
|
2018-04-11 04:55:41 +00:00
|
|
|
.get_matches();
|
|
|
|
|
|
|
|
match args.subcommand() {
|
2018-04-11 05:39:28 +00:00
|
|
|
("relay", Some(sub_args)) => relay::run(sub_args),
|
2018-04-11 04:55:41 +00:00
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
}
|