| Crates.io | videostream-sys |
| lib.rs | videostream-sys |
| version | 2.1.4 |
| created_at | 2023-06-29 19:18:03.508935+00 |
| updated_at | 2026-01-05 16:21:42.662429+00 |
| description | Low-level FFI bindings for VideoStream Library - unsafe bindings to libvideostream |
| homepage | https://edgefirst.ai |
| repository | https://github.com/EdgeFirstAI/videostream |
| max_upload_size | |
| id | 903593 |
| size | 108,813 |
Low-level FFI bindings for the VideoStream Library - unsafe bindings to libvideostream.
videostream-sys provides raw, unsafe FFI bindings to the VideoStream C library (libvideostream), which offers:
This crate contains the low-level bindings. For safe, idiomatic Rust APIs, use the videostream crate instead.
The VideoStream C library must be installed on your system:
# Ubuntu/Debian
sudo apt-get install libvideostream1
# Or build from source
git clone https://github.com/EdgeFirstAI/videostream
cd videostream
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
sudo cmake --install build
# Ubuntu/Debian
sudo apt-get install -y \
build-essential \
cmake \
pkg-config \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev
This crate provides raw FFI bindings. These are unsafe and require careful memory management.
use videostream_sys::*;
use std::ffi::CString;
unsafe {
// Initialize host (frame producer)
let socket_path = CString::new("/tmp/vsl_socket").unwrap();
let mut host: *mut vsl_host_t = std::ptr::null_mut();
let ret = vsl_host_init(
socket_path.as_ptr(),
640, // width
480, // height
VSL_PIXEL_FORMAT_RGBX as i32,
&mut host as *mut _,
);
if ret == 0 {
// Use the host...
// Clean up
vsl_host_destroy(host);
}
}
For safe, idiomatic Rust usage, use the videostream crate instead.
This crate uses bindgen to generate bindings from the C headers. The build script (build.rs) will:
libvideostream headersbindgencargo build
Currently, this crate has no optional features. All bindings are included by default.
⚠️ All functions in this crate are unsafe.
When using these bindings directly, you must ensure:
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Copyright © 2025 Au-Zone Technologies