Expose native reservoir C ABI
This commit is contained in:
parent
b4d50860df
commit
2bf5abbd57
9 changed files with 320 additions and 11 deletions
|
|
@ -6,6 +6,7 @@
|
|||
- `docs/perfect-machine.md` defines the target native machine: one five-second spatiotemporal reservoir, Aquarium-owned dense visual fusion/material/brush rendering, Faust-owned hot audio DSP, OBS-owned broadcast controls, and LocalCastBridge-owned calibration/config/status.
|
||||
- `config/perfect-machine.example.json` declares the contract shape for six cameras, six microphones, reservoir rings, native authorities, outputs, and the demotion of bridge scripts to tooling.
|
||||
- `native/reservoir` is the first native Rust crate. It implements shared-edge five-second reservoir rings and proves that all rings expire against the newest sample, not private per-source clocks.
|
||||
- `native/reservoir/include/localcast_reservoir.h` exposes the Aquarium/Faust C ABI: opaque reservoir create/destroy, sample-handle push, edge/window queries, ring counts, and latest sample lookup by sensor hash. Payload memory remains owned by Aquarium/GPU/Faust; the reservoir owns timing and retention.
|
||||
- Repo-local persistence machinery.
|
||||
- First architecture map.
|
||||
- Example config for one video source plus two audio sources.
|
||||
|
|
@ -75,7 +76,7 @@
|
|||
|
||||
## Next
|
||||
|
||||
1. Add a C ABI and Aquarium-facing binding around `native/reservoir`.
|
||||
1. Add the Aquarium-side binding that loads `localcast_reservoir` and maps GPU/audio buffer handles to `LocalcastSampleHandle`.
|
||||
2. Move camera ingest into native capture workers that append `camera_frame` samples to the reservoir.
|
||||
3. Move feature extraction, flow, cross-view matching, LOD reconciliation, and material fitting into Aquarium GPU compute.
|
||||
4. Move mic alignment, voice separation, room suppression, Ambisonic/HOA spatialization, and stem generation into Faust/native DSP.
|
||||
|
|
|
|||
|
|
@ -157,6 +157,16 @@ five-second reservoir invariant:
|
|||
- evict every ring against the same edge;
|
||||
- query the latest valid sample per sensor.
|
||||
|
||||
This is intentionally below Aquarium and Faust. The crate owns retention and
|
||||
sample-window semantics; Aquarium owns GPU interpretation and rendering, Faust
|
||||
owns DSP interpretation.
|
||||
It now builds as `rlib`, `cdylib`, and `staticlib`, with a small C ABI declared
|
||||
in `native/reservoir/include/localcast_reservoir.h`:
|
||||
|
||||
- create/destroy an opaque `LocalcastReservoir`;
|
||||
- push timestamped sample metadata into a typed ring;
|
||||
- advance/query the shared edge and window start;
|
||||
- query ring length;
|
||||
- query the latest sample for a sensor hash.
|
||||
|
||||
The ABI carries `payload_handle`, not payload bytes. Aquarium owns image,
|
||||
feature, surface, material, and GPU memory interpretation. Faust/native DSP owns
|
||||
audio buffer interpretation. The reservoir owns only retention, ring identity,
|
||||
timestamp order, and the five-second shared-edge invariant.
|
||||
|
|
|
|||
Loading…
Reference in a new issue