Go to file
T. Okubo 48d22b29f7 Add get_track_description 2015-12-19 11:23:20 +09:00
examples Add examples 2015-11-29 17:40:58 +09:00
src Add get_track_description 2015-12-19 11:23:20 +09:00
.gitignore Add the Cargo.lock to .gitignore 2015-11-29 10:33:02 +09:00
Cargo.toml Add files 2015-11-29 10:29:43 +09:00
LICENSE Initial commit 2015-11-29 10:26:04 +09:00
README.md Add examples 2015-11-29 17:40:58 +09:00

README.md

vlc-rs

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]
git = "https://github.com/Orenantedose/vlc-rs.git"

Example

Play for 10 seconds from an 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_ms(10000);
}

Other examples are in the examples directory.

License

MIT (Examples are licensed under CC0)