3 releases (breaking)

Uses old Rust 2015

0.3.0 Jun 10, 2018
0.2.0 Mar 10, 2018
0.1.0 Apr 2, 2017

#85 in Multimedia

Download history 17/week @ 2023-12-14 9/week @ 2023-12-21 1/week @ 2023-12-28 5/week @ 2024-01-04 11/week @ 2024-01-11 11/week @ 2024-01-18 4/week @ 2024-01-25 5/week @ 2024-02-01 11/week @ 2024-02-08 29/week @ 2024-02-15 42/week @ 2024-02-22 36/week @ 2024-02-29 41/week @ 2024-03-07 28/week @ 2024-03-14 32/week @ 2024-03-21 40/week @ 2024-03-28

141 downloads per month

MIT license

91KB
2K SLoC

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 = "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)

Dependencies