diff --git a/docs/REAL-TIME-RECORDING.md b/docs/REAL-TIME-RECORDING.md index 56b4e25..b78ac16 100644 --- a/docs/REAL-TIME-RECORDING.md +++ b/docs/REAL-TIME-RECORDING.md @@ -14,15 +14,36 @@ It's behind a build flag because activating it requires adding a NuGet dependency. The structural code is already in `src/TeamsISO.Engine/Pipeline/MediaFoundationRecorderSink.cs`. -## Activating it +## Status — May 2026 -1. **Add the NuGet dependency** to the engine project: +**Activation deferred.** The Vortice.MediaFoundation 3.6.2 NuGet package +is referenced from `TeamsISO.Engine.csproj`, but the `MF_AVAILABLE` symbol +is *not* defined. The scaffold in +`src/TeamsISO.Engine/Pipeline/MediaFoundationRecorderSink.cs` was written +against an older Vortice API and needs a port pass before activation: - dotnet add src/TeamsISO.Engine package Vortice.MediaFoundation --version 3.6.2 +- `MFVersion` → not on `MediaFactory` in 3.6.2; pass the SDK version + directly to `MFStartup`. +- `MediaFactory.MF_LOW_LATENCY` → relocated to a different attribute + constants class. +- `IMFAttributes.SetUINT32` → replaced with a generic `Set` overload. +- `IMFMediaType.MajorType` / `.SubType` / `.AvgBitrate` properties + → now use `SetGUID(MFAttributeKeys.MajorType, ...)` etc. +- `VideoFormatGuids.RGB32` → renamed (likely `Rgb32`). +- `IMFMediaBuffer.Lock(out IntPtr, out int, out int)` → explicit out-param + signature, no longer returns a locked-buffer wrapper. +- `IMFSinkWriter.Finalize_` → renamed (likely `Finalize`). - (Pin to a known-good version — Vortice's API surface is stable across - 3.6.x but the engine code targets the namespaces in 3.6.x. If a newer - major version changes namespaces, the file may need adjustment.) +Until the port lands, the `RawBgraRecorderSink` is the only IRecorderSink +production uses. The raw recorder is reliable and FFmpeg post-processing +via the emitted `convert.cmd` produces equivalent .mp4s; you just pay the +disk pressure during the show. + +## Activating it (after the port) + +1. **Update the scaffold** to match Vortice 3.6.2's API surface. A clean + reference implementation lives in the Vortice samples repo under + `samples/MediaFoundationSamples`. 2. **Define the `MF_AVAILABLE` build symbol** in `TeamsISO.Engine.csproj`: diff --git a/src/TeamsISO.Engine/TeamsISO.Engine.csproj b/src/TeamsISO.Engine/TeamsISO.Engine.csproj index 605a92a..848fc51 100644 --- a/src/TeamsISO.Engine/TeamsISO.Engine.csproj +++ b/src/TeamsISO.Engine/TeamsISO.Engine.csproj @@ -2,6 +2,15 @@ net8.0 + + @@ -11,6 +20,7 @@ +