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.
Only a small subset of MC API was tested. Some of the bindings might not work. Currently there are no automated tests.
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
.
- Add dependency to the
Cargo.toml
[dependencies]
mc-api = { git = "https://github.com/antego/mc-api-rs" }
- Use the bindings to get information about a media device
let topology = mc_api_rs::get_topology(Path::new("/dev/media3"));
println!("result: {:#?}", topology);