Skip to content

Spiideo/vlc-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Rust bindings for libVLC media framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%