#rpi #embedded #raspberry-pi #raspberry-pi-camera

rpi-mmal-rs

Rust binding for mmal library of Raspberry Pi

3 releases

0.0.3 Nov 7, 2019
0.0.2 Oct 22, 2019
0.0.1 Oct 22, 2019

#915 in #ffi

Download history 14/week @ 2023-10-29 9/week @ 2023-11-05 16/week @ 2023-11-12 11/week @ 2023-11-19 19/week @ 2023-11-26 8/week @ 2023-12-03 10/week @ 2023-12-10 8/week @ 2023-12-17 13/week @ 2023-12-24 5/week @ 2023-12-31 11/week @ 2024-01-07 8/week @ 2024-01-14 9/week @ 2024-01-21 10/week @ 2024-01-28 6/week @ 2024-02-04 25/week @ 2024-02-11

51 downloads per month
Used in rpi-video-rs

MIT license

5KB

rpi-mmal-rs

This project uses rust-bindgen to make a simple Rust binding for the MMAL library of Raspberry Pi.

MMAL (Multi-Media Abstraction Layer) is a framework which is used to provide a host-side, simple and relatively low-level interface to multimedia components running on VideoCore. The source code of RPI MMAL could be reviewed in project userland.

This project is low-level and simple binding for using RPI camera. You could use rpi-video-rs simply for H264 video record.

Usage

Add the following to your Cargo.toml:

[dependencies]
rpi-mmal-rs = "0.0.3"

Development

Since this project sets the default target to arm-unknown-linux-gnueabihf. Developers should compile the code on a real RPI device or cross-compiling environment. We offer a Dockerfile (in folder tools/docker/) which is a separate cross-compiling environment.

Users or contributors should install the standard Rust development environment. And then adds Rust targets as below.

rustup target add arm-unknown-linux-gnueabihf
rustup target add armv7-unknown-linux-gnueabihf

TODO

  1. Integrates with a CI for testing successful compilation.

Dependencies

~0–2.2MB
~43K SLoC