-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa2069c
commit bdaba49
Showing
1 changed file
with
3 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,5 @@ | ||
# vlc-rs [![Build Status](https://travis-ci.org/garkimasera/vlc-rs.svg?branch=master)](https://travis-ci.org/garkimasera/vlc-rs) | ||
# vlc-rs | ||
Rust bindings for libVLC media framework. | ||
|
||
## Status | ||
Many missing functions and wrappers. | ||
|
||
## Use | ||
Please add the following dependencies to your Cargo.toml. | ||
|
||
```Toml | ||
[dependencies] | ||
vlc-rs = "0.3" | ||
``` | ||
|
||
Or: | ||
|
||
```Toml | ||
[dependencies.vlc-rs] | ||
git = "https://github.com/garkimasera/vlc-rs.git" | ||
``` | ||
|
||
## Example | ||
Play for 10 seconds from a media file. | ||
```Rust | ||
extern crate vlc; | ||
use vlc::{Instance, Media, MediaPlayer}; | ||
use std::thread; | ||
|
||
fn main() { | ||
// Create an instance | ||
let instance = Instance::new().unwrap(); | ||
// Create a media from a file | ||
let md = Media::new_path(&instance, "path_to_a_media_file.ogg").unwrap(); | ||
// Create a media player | ||
let mdp = MediaPlayer::new(&instance).unwrap(); | ||
mdp.set_media(&md); | ||
|
||
// Start playing | ||
mdp.play().unwrap(); | ||
|
||
// Wait for 10 seconds | ||
thread::sleep(::std::time::Duration::from_secs(10)); | ||
} | ||
``` | ||
|
||
Other examples are in the examples directory. | ||
|
||
## License | ||
MIT (Examples are licensed under CC0) | ||
**This project has moved:** | ||
https://code.videolan.org/videolan/vlc-rs |