Skip to content

FFI package for libuvc v0.0.6: "A cross-platform library for USB video devices". Available for linux-x86_64, macos-x86_64.

Notifications You must be signed in to change notification settings

node-ffi-libraries/node-ffi-library-libuvc-v0.0.6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-ffi-libraries logotype, impossible cubes in orange

Automatically generated Node.js Foreign Function Interface (FFI) package for libuvc v0.0.6. It is meant as a base to build feature-rich packages on top of — without the hassle of writing library bindings and building native dependencies.

libuvc: A cross-platform library for USB video devices

Bugs? Report them!

Platforms supported in this package

linux-x86_64

Conan package id 5059f61390311ebcb390fdf8ccdb55883b02a431.

Library dependencies

Header files

Library files

macos-armv8

Conan package id 4a6b69ad4662b73171fc6aa328f5465e9e2baee5.

Library dependencies

Header files

Library files

macos-x86_64

Conan package id fd3a12e9fb10dddd2d7131da2f6920cb125f879d.

Library dependencies

Header files

Library files

Installation

npm install --save github:node-ffi-libraries/node-ffi-library-libuvc-v0.0.6#semver:^2.0.1

Example

const { load } = require("@ffi-libraries/libuvc-v0.0.6");

async function main() {
  // Lazy-loading the library and all dependencies.
  const library = await load();

  // A library might have more than one header file.
  console.dir(library);

  // Lazy-load an individual header file (random example, see output from above).
  const headerLoader = library.headers["./include/libuvc/libuvc.h"];
  const header = await headerLoader();

  // You can now use the functions and types exported by the header file.
  console.dir(header);

  // Properly unload when done.
  await library.unload();
}

main();

Usage

  • Used from Node.js (Javascript) to call the libuvc dynamic library (C/C++).
    • No compilation required. All available binaries are included in the package and are loaded automatically.
    • Library header files are included, but most other documentation is not. See instead documentation for libuvc.
  • The header variable in the above example contains a Javascript object generated from the C/C++ header file.
    • C/C++ constants.
    • FFI typedefs.
    • Bindings to C/C++ functions.
  • See the Node.js FFI tutorial to get started.

Package information


@ffi-libraries/libuvc-v0.0.6 Copyright © 2021 Joel Purra. License: MIT.

About

FFI package for libuvc v0.0.6: "A cross-platform library for USB video devices". Available for linux-x86_64, macos-x86_64.

Resources

Stars

Watchers

Forks

Packages

No packages published