Crates.io | blackmagic-camera-control |
lib.rs | blackmagic-camera-control |
version | 0.2.2 |
source | src |
created_at | 2021-08-28 00:02:42.992615 |
updated_at | 2022-11-07 05:05:40.470433 |
description | Interface with your Blackmagic camera over Bluetooth Low Energy in Rust |
homepage | |
repository | https://github.com/coral/blackmagic-camera-control |
max_upload_size | |
id | 443286 |
size | 104,581 |
This library allows you to easily communicate with your Blackmagic camera over Bluetooth.
Command::Video(Video::Iso(640)))
PROTOCOL.json
for code generation so it's easy to add more functions to the libraryYou can test the library easy by opening examples/control.rs
, replacing the CAMERA_NAME const with your cameras bluetooth name and then running cargo run --example control
//Create a new camera with the device name
let mut camera = BluetoothCamera::new(CAMERA_NAME).await.unwrap();
//Connect with a set timeout
camera.connect(Duration::from_secs(10)).await.unwrap();
//Change the ISO to 320
camera.write(255, Operation::AssignValue, Command::Video(Video::Iso(640))).await.unwrap();
The library consumes the PROTOCOL.json file which documents the camera protocol in a machine readable format. From there it generates the commands as rust enums during the build stage (see /build). This allows us to have statically typed addressing of camera features without manually writing the code, rather relying on the conversion from the camera protocol manual. The library takes care of packaging down the commands into the camera protocol.
Just open a PR LUL
All under MIT