Skip to content

Add Media Foundation playback and harden WinUI composition hosting - #48

Open
atcarter714 wants to merge 3 commits into
mainfrom
iteration/media-playback
Open

atcarter714 wants to merge 3 commits into
mainfrom
iteration/media-playback

Conversation

@atcarter714

@atcarter714 atcarter714 commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Add the optional DXSharp.Media library and one WinUI VideoPlayer using the shared composition host. Media Engine owns audio and playback timing; BGRA frames transfer through writable WIC storage into persistent per-frame-slot D3D12 textures. Local-file controls cover play/pause, seek, loop and volume/mute, with visible transfer/timing diagnostics.

Project the complete pinned Media Foundation namespace, including its D3D12 video declarations: the local name/member/IID gate measures 1,650 types and 8,484 member names. Raw owned outputs and generated COM callbacks retain deterministic lifetime. Existing Core sampler overloads remain available.

Address identified WinUI blocking/reentrancy risks: poll frame fences and busy presents, drain resize work on a worker, reattach resized composition chains, and queue drawing after XAML composition callbacks. Preserve animation time across skipped turns. Add rapid move/resize checks, GPU-gated polling assertions, persistent lifecycle/HRESULT logs and independent test watchdogs.

Validation: both WinUI samples pass managed .NET 10/11 Release cross-builds with zero warnings/errors. The local Linux .NET 11 ABI/lifetime/CPU suite passes 2,298 checks with no live native objects. The preceding media commit passed all six hosted CI jobs, including paused seek; fresh Windows checks are required for the host changes. Cross-builds do not qualify Windows deployment or presentation.

Release gates: retest the reported VideoPlayer 0xC000027B failure and CharacterLab.WinUI move/resize freeze on affected hardware; their original causes are not yet established. Verify audible A/V synchronization using the audio-bearing fixture. Hosted tests use a video-only fixture for runners without audio endpoints. Decoder acceleration is unmeasured; this CPU-transfer backend does not qualify zero-copy interop or direct D3D12 video queues. Optional media/desktop JIT workloads and native SDK NativeAOT ownership remain separate qualification claims.

Preview 4 candidate cutoff includes ten modern package IDs (twenty package/symbol archives). No versioned release note or package publication is included; Preview 4 remains gated on Windows and hardware review.

Poll frame fences and busy DXGI presents, drain resize work off the UI thread, and reattach resized composition chains. Queue render turns after XAML composition callbacks while preserving elapsed animation time across skipped turns.

Add shared lifecycle/HRESULT logs, bounded qualification watchdogs, resize-burst checks, and GPU-gated fence-poll assertions. Keep Preview 4 gated on Windows CI and hardware review of the reported WinUI crash/freeze.
@atcarter714 atcarter714 changed the title Add Media Foundation playback and a D3D12 VideoPlayer sample Add Media Foundation playback and harden WinUI composition hosting Nov 25, 2026
@atcarter714 atcarter714 reopened this Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant