#sdk #camera #settings #ptr

sys hikvision-mvs-sys

Low-level bindings to the hikvision Machine Vision Software SDK

1 unstable release

new 0.1.0 Mar 28, 2025

#6 in #ptr

Download history 90/week @ 2025-03-23

90 downloads per month

MIT/Apache

6KB

hikvision_mvs_sys

hikvision_mvs_sys is a Rust binding for the Hikvision MVS SDK.

Features

  • Initialize the MVS SDK
  • Enumerate and list connected cameras
  • Open a camera and configure settings

Example

use hikvision_mvs_sys::*;
use std::ptr;

unsafe {
    // Initialize SDK
    if MV_CC_Initialize() != MV_OK as i32 {
        eprintln!("Failed to initialize SDK.");
        return;
    }

    let mut device_list: MV_CC_DEVICE_INFO_LIST = MV_CC_DEVICE_INFO_LIST {
        nDeviceNum: 0,
        pDeviceInfo: [ptr::null_mut(); 256],
    };

    // Enumerate devices
    if MV_CC_EnumDevices(MV_GIGE_DEVICE | MV_USB_DEVICE, &mut device_list) != MV_OK as i32 {
        eprintln!("Failed to enumerate devices.");
        return;
    }
}

Dependencies

~0–2MB
~39K SLoC