Skip to content

spice: decode h264 streams on the phone - #14

Open
ElCruncharino wants to merge 3 commits into
pgaskin:masterfrom
ElCruncharino:gpu-video-spice
Open

ElCruncharino wants to merge 3 commits into
pgaskin:masterfrom
ElCruncharino:gpu-video-spice

Conversation

@ElCruncharino

Copy link
Copy Markdown

SPICE sends H.264 for regions it thinks are video. Those used to be
refused, which left a still picture behind. The phone decodes them now,
and the H.264 capability is only offered on Android, where the decoder is.

Frames go to the GPU the same way the RDP backends' do. SPICE does not say
which range its video is in, so limited range is assumed.

Builds and installs. Not run against a SPICE server yet, so the picture is
unverified.

Stacked on #12.

Nick Haghiri added 3 commits October 23, 2026 15:49
backends that get h264 from their protocol can hand the frames to mediacodec and get nv12 planes back. the decoder lives in common so every backend uses the same one. frames carry their colour matrix and range, and the jni callback is optional, so backends without video don't notice.
a gl layer behind the desktop view draws each video region from its nv12 planes, so the colour conversion happens on the gpu.

damage over a video region hands it back to the cpu. what the video had left of that region is repainted from its last frame, so the mirror doesn't flash the old picture.

screenshots and the session thumbnail paint video over the backend's picture, which is stale under video.
spice sends h264 for regions it thinks are video. those used to be refused, which left a still picture behind. the phone decodes them now, and the capability is only offered on android where the decoder is.

spice doesn't say which range its video is in, so limited range is assumed.
@ElCruncharino
ElCruncharino marked this pull request as draft October 23, 2026 19:57
@ElCruncharino ElCruncharino changed the title Decode SPICE H.264 streams on the phone spice: decode h264 streams on the phone Oct 23, 2026
@ElCruncharino
ElCruncharino marked this pull request as ready for review October 23, 2026 20:07

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