@mediaway/ffi 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @mediaway/ffi
2
+
3
+ Internal [koffi](https://koffi.dev/) bindings for **Mediaway's unified C ABI**
4
+ (`mediaway_ffi.dll`). This package owns the native binary: the DLL lives in
5
+ `native/` and is loaded once per process.
6
+
7
+ > **You usually do not need this package directly.** The high-level packages
8
+ > `@mediaway/container`, `@mediaway/device`, and `@mediaway/encoder` build on
9
+ > it and re-export everything you need. This package exists so the DLL is
10
+ > shipped and loaded exactly once.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ npm install @mediaway/ffi
16
+ ```
17
+
18
+ Requires Windows x64 (the packaged DLL is `win-x64`). The `.dll` is resolved
19
+ next to the package via `findLibrary()` — no PATH or system install needed.
20
+
21
+ ## What is inside
22
+
23
+ - `mediaway_ffi.dll` — the merged C ABI (container + device + pipeline
24
+ capabilities) from the [Mediaway](https://github.com/nyxways/mediaway)
25
+ workspace.
26
+ - koffi `LibraryHandle`s + struct types: `containerLib`, `deviceLib`,
27
+ `pipelineLib`, and the `Mw*` type objects they expose.
28
+
29
+ ## Minimal use
30
+
31
+ ```ts
32
+ import { findLibrary, containerLib } from "@mediaway/ffi";
33
+
34
+ // Absolute path to the DLL inside this package (used by the loader).
35
+ const dll = findLibrary("mediaway_ffi");
36
+ console.log("DLL:", dll);
37
+
38
+ // The library handles are ready after import — call C functions directly:
39
+ const abiVersion = containerLib.mediaway_container_ffi_abi_version();
40
+ console.log("ABI version:", abiVersion);
41
+ ```
42
+
43
+ ## License
44
+
45
+ MIT OR Apache-2.0. Part of the [Mediaway](https://github.com/nyxways/mediaway)
46
+ project — pre-1.0, APIs may change.
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mediaway/ffi",
3
- "version": "0.1.0",
4
- "description": "Internal koffi glue over Mediaway's C ABI (container/pipeline/device)",
3
+ "version": "0.1.1",
4
+ "description": "Mediaway native C ABI bindings for Node.js — the shared DLL behind the @mediaway packages",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",