Make camera ingest device-direct first
This commit is contained in:
parent
7202d30ef1
commit
9147fcd626
8 changed files with 62 additions and 29 deletions
|
|
@ -50,7 +50,9 @@ preferred authority is Fensalir-owned texture leasing: Mimir asks the engine
|
|||
broker for a keyed `Texture2D` lease, writes decoded frames into the returned
|
||||
shared D3D12 texture, signals the returned fence, and commits that fence value
|
||||
before the resource key is sampled by shader lowerings. Foreign shared handles
|
||||
remain import edges only.
|
||||
remain import edges only. Camera producers must choose the closest-to-device
|
||||
path available for each sensor and report the unavoidable copy count; convenient
|
||||
managed/process middlemen are diagnostic witnesses, not hot-path owners.
|
||||
|
||||
The old script stack is gone. Do not add a compatibility edge unless it protects
|
||||
a named invariant that the native runtime cannot protect yet.
|
||||
|
|
@ -357,8 +359,8 @@ a named invariant that the native runtime cannot protect yet.
|
|||
## Next
|
||||
|
||||
1. Replace the frame-event diagnostic bridge with concrete direct capture
|
||||
drivers for Leap stereo IR first, then the
|
||||
other cameras.
|
||||
drivers for Leap stereo IR first, then the other cameras. Each driver must
|
||||
state its device API, destination resource, and unavoidable copy count.
|
||||
2. Feed those drivers into `MimirVideoCaptureDriverSource` and prove sustained
|
||||
frame cadence in the rolling buffers.
|
||||
3. Promote the packet-song physical calibration receipt into the runtime
|
||||
|
|
|
|||
|
|
@ -36,9 +36,13 @@ The app-level runtime initializes one rolling buffer per configured audio or
|
|||
video stream, defaulting to five seconds. The lower native reservoir keeps the
|
||||
single-edge typed-handle invariant for Fensalir/Faust integration.
|
||||
|
||||
Payload memory belongs to the producing domain. The reservoir and runtime own
|
||||
timing, identity, ordering, retention, and lookup. They do not pretend to own
|
||||
camera driver buffers, GPU textures, or DSP audio memory.
|
||||
Payload memory belongs to the producing domain, but rendering inputs should be
|
||||
Fensalir-owned GPU resources whenever the device path allows it. The camera hot
|
||||
path is: ask Fensalir for a keyed `Texture2D` lease, speak to the device stack
|
||||
as directly as possible, populate that lease, signal the producer fence, and
|
||||
publish the resource key through Mimir's rolling buffers and FieldEvidence. The
|
||||
reservoir and runtime own timing, identity, ordering, retention, and lookup.
|
||||
They do not become pixel middlemen.
|
||||
|
||||
## Authoritative Boundaries
|
||||
|
||||
|
|
@ -62,7 +66,10 @@ camera driver buffers, GPU textures, or DSP audio memory.
|
|||
|
||||
1. Keep the C# app/runtime as the public Mimir surface.
|
||||
2. Implement Leap stereo IR direct ingest first and measure sustained cadence.
|
||||
3. Add the remaining local camera drivers through the same source seam.
|
||||
Record the unavoidable copy count; do not hide CPU upload behind a friendly
|
||||
adapter name.
|
||||
3. Add the remaining local camera drivers through the same source seam,
|
||||
preferring device-direct producers that populate Fensalir texture leases.
|
||||
4. Add native audio capture workers and feed aligned blocks to Faust/native DSP.
|
||||
5. Bind Fensalir UI to stream health, buffer depth, source timestamps, settings,
|
||||
and output management.
|
||||
|
|
|
|||
|
|
@ -107,11 +107,14 @@ The first cut should be deliberately boring:
|
|||
- `MimirNativeIngestStreamSource` is the low-overhead push seam for native
|
||||
camera/audio adapters that already own buffers or handles.
|
||||
- `MimirVideoFrameDescriptor` carries video shape, pixel format, device
|
||||
timestamp, stride, and optional native/GPU handle metadata. Leap stereo IR
|
||||
should enter here through a native driver path.
|
||||
timestamp, stride, resource key, producer fence value, and native/GPU handle
|
||||
metadata. Leap stereo IR should enter here through a native driver path that
|
||||
reports any unavoidable system-memory copy.
|
||||
- `IMimirVideoCaptureDriver` and `MimirVideoCaptureDriverSource` are the
|
||||
driver-facing seam for polling/pushing frames from LeapUVC/libusb, LeapC image
|
||||
APIs, Media Foundation, DirectShow, or a future GPU shared-texture capture.
|
||||
APIs, Media Foundation, DirectShow, or GPU decode/capture paths. Drivers that
|
||||
can produce render inputs should implement `IMimirFensalirTextureLeaseReceiver`
|
||||
and populate Fensalir-owned texture leases directly.
|
||||
- `MimirProcessStreamSource` is a compatibility adapter for network or
|
||||
diagnostic command sources. It is not the six-camera local capture foundation.
|
||||
|
||||
|
|
@ -129,10 +132,10 @@ environment variables:
|
|||
These create buffers immediately. Capture adapters still need to register
|
||||
`IMimirStreamSource` implementations to feed live samples into those buffers.
|
||||
|
||||
For local cameras, prefer native adapters that push sample handles directly
|
||||
through `MimirNativeIngestStreamSource`. Process-backed FFmpeg ingest is allowed
|
||||
for remote SRT/diagnostic edges, but local six-camera ingest should stay close
|
||||
to the driver, GPU, and capture APIs.
|
||||
For local cameras, prefer native adapters that talk to the device stack directly
|
||||
and push only typed sample/resource handles through `MimirNativeIngestStreamSource`.
|
||||
Process-backed FFmpeg ingest is allowed for remote SRT/diagnostic edges, but
|
||||
local six-camera ingest should stay close to the device, GPU, and capture APIs.
|
||||
|
||||
Leap should be treated as the timing-camera candidate only when the native
|
||||
adapter preserves device timestamps or captures a monotonic timestamp
|
||||
|
|
|
|||
Loading…
Reference in a new issue