fixup! Add winit integration example
parent
cc9d4c241c
commit
0bf8e5b8cf
examples
|
@ -22,13 +22,17 @@ fn main() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// Instanciate libvlc
|
// Instanciate libvlc
|
||||||
let options = vec![String::from("-vv")];
|
let instance = Instance::new().unwrap();
|
||||||
|
|
||||||
let instance = Instance::with_args(Some(options)).unwrap();
|
let args: Vec<String> = std::env::args().collect();
|
||||||
|
let path = match args.get(1) {
|
||||||
let argv: Vec<String> = std::env::args().collect();
|
Some(s) => s,
|
||||||
|
None => {
|
||||||
let md = Media::new_location(&instance, &argv[1]).unwrap();
|
println!("Usage: winit_player path_to_a_media_file");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let md = Media::new_path(&instance, path).unwrap();
|
||||||
|
|
||||||
let mdp = MediaPlayer::new(&instance).unwrap();
|
let mdp = MediaPlayer::new(&instance).unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue