Go to file
T. Okubo b82a40571a Fix warning 2019-11-28 20:01:56 +09:00
examples Add examples 2015-11-29 17:40:58 +09:00
libvlc-sys Fix to use libvlc-sys 2019-11-25 20:53:31 +09:00
src Fix warning 2019-11-28 20:01:56 +09:00
.gitignore Add libvlc-sys crate 2019-11-21 20:00:26 +09:00
.travis.yml Add travis settings 2018-11-06 21:02:45 +09:00
Cargo.toml Add libvlc-sys to dependencies 2019-11-23 20:12:56 +09:00
LICENSE Initial commit 2015-11-29 10:26:04 +09:00
README.md Add travis badge 2018-11-06 21:08:38 +09:00

README.md

vlc-rs Build Status

Rust bindings for libVLC media framework.

Status

Many missing functions and wrappers.

Use

Please add the following dependencies to your Cargo.toml.

[dependencies]
vlc-rs = "0.3"

Or:

[dependencies.vlc-rs]
git = "https://github.com/garkimasera/vlc-rs.git"

Example

Play for 10 seconds from a media file.

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)