Fix Wayland VA-API capture of DMA-BUF frames - #43
Open
purpleempress wants to merge 1 commit into
Open
Conversation
omarroth
pushed a commit
that referenced
this pull request
Sep 8, 2026
Adapt PR #43 with explicit encoder backend metadata and PipeWire default buffer-pool policy. The VA path forces a fresh VAMemory surface before any retaining stage and preserves the shared timestamped encoder suffix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wayland capture on Intel Lunar Lake fails on current main (
ae06722) when usingvah264enc. The pipeline emits one small initial frame, then exits withvapostproc: Invalid caps video/x-raw(memory:DMABuf)and a PipeWire internal stream error.This adds a VA-API capture path that imports the portal buffers directly and keeps conversion, scaling and encoding in VA memory.
vapostprocproduces a separate NV12 surface, so downstream elements do not retain another portal buffer. PipeWire keepalives supply idle frames, andvideoratelimits the output rate. The shared encoding and timestamp-preserving output remain unchanged.The source caps also specify square pixels. Without that constraint, this setup negotiated a pixel aspect ratio of
1/2147483647, which preventedvapostprocfrom calculating the borders needed to preserve the desktop's proportions.Validation:
go test ./...passes, including regression coverage for the VA pipeline, receiver dimensions and shared output.This validation covers local capture and encoding. Verified working on a Samsung AU9000 in conjunction with PR #44, Other VA-API drivers have not been tested.