Skip to content

Rust bindings for the Linux Media Controller API

License

Notifications You must be signed in to change notification settings

antego/mc-api-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Media Controller API bindings for Rust

The experimental bindings for the Media Controller API (MC API). The main motivation behind creating these bindings is to be able to get the media device information from the programs written in Rust without directly touching the IOCTL APIs.

You can read more about the Media Controller API here.

Use at your own risk

Only a small subset of MC API was tested. Some of the bindings might not work. Currently there are no automated tests.

API version

The bindings in the current version are generated on

Linux raspberrypi 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1 rpt1 (2023-11-24) aarch64 GNU/Linux

See src/media_ffi.rs for the bindings generated by bindgen.

Usage

  1. Add dependency to the Cargo.toml
[dependencies]
mc-api = { git = "https://github.com/antego/mc-api-rs" }
  1. Use the bindings to get information about a media device
let topology = mc_api_rs::get_topology(Path::new("/dev/media3"));
println!("result: {:#?}", topology);

About

Rust bindings for the Linux Media Controller API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published