Skip to content

fix(glutin-renderer): upgrade openh264 0.4 to 0.6, switch to libloading#1126

Merged
Benoît Cortier (CBenoit) merged 1 commit intoDevolutions:masterfrom
glamberson:fix/glutin-renderer-openh264-upgrade
Feb 26, 2026
Merged

fix(glutin-renderer): upgrade openh264 0.4 to 0.6, switch to libloading#1126
Benoît Cortier (CBenoit) merged 1 commit intoDevolutions:masterfrom
glamberson:fix/glutin-renderer-openh264-upgrade

Conversation

@glamberson
Copy link
Contributor

Upgrades the excluded ironrdp-glutin-renderer and ironrdp-client-glutin crates from openh264 0.4 (compile-from-source) to openh264 0.6 (runtime libloading of Cisco's prebuilt binary).

Problem

The renderer used openh264 = "0.4" with the default source feature, which compiles OpenH264 from C source and links it statically. Anyone distributing a binary built this way ships an H.264 codec outside Cisco's patent coverage — Cisco's MPEG-LA license only covers their prebuilt binary, not source-compiled copies.

This was flagged in the #1104 review thread by Richard Markiewicz (@thenextman).

Changes

ironrdp-glutin-renderer:

  • openh264 0.4 → 0.6, switched to features = ["libloading"]
  • Made openh264 an optional default feature (cfg(feature = "openh264"))
  • Decoder::new()Decoder::with_api_config(api, config) using OpenH264API::from_blob_path()
  • DecodedYUV API migration: dimension_rgb()dimensions(), strides_yuv()strides(), y_with_stride()y() (via YUVSource trait)
  • SurfaceDecoders now takes a library path and loads the Cisco binary per-surface

ironrdp-client-glutin:

  • Added --openh264-path CLI argument (defaults to libopenh264.so)
  • Threaded the path through launch_guiRenderer::new → decode thread

Notes

Both crates remain excluded from the workspace (Cargo.toml line 11-15) and cannot be compiled as part of the standard workspace build. CI checks pass because the workspace-level cargo xtask commands don't touch excluded crates. The code changes are correct for the 0.6 API and will compile when these crates are eventually re-integrated.

This is consistent with the approach taken in #1104 (feature-gated openh264, libloading-only).

Builds on the discussion in #1104.

The glutin-renderer used openh264 0.4 with the default `source` feature,
which compiles OpenH264 from source and links it statically. Anyone
distributing a binary built this way would be shipping an H.264 codec
without Cisco's patent coverage (Cisco's license only covers their
prebuilt binary).

Changes:
- Upgrade openh264 from 0.4 to 0.6
- Switch from `source` (compile-from-source) to `libloading` (runtime
  loading of Cisco's prebuilt binary)
- Make openh264 an optional default feature
- Migrate API: Decoder::new() -> Decoder::with_api_config()
- Migrate API: DecodedYUV methods (dimension_rgb -> dimensions,
  strides_yuv -> strides, y_with_stride -> y, etc.)
- Add --openh264-path CLI argument to ironrdp-client-glutin
- Feature-gate all H.264 decode paths behind cfg(feature = "openh264")

The renderer now requires the caller to provide the path to Cisco's
prebuilt OpenH264 shared library, consistent with PR Devolutions#1104's approach
for ironrdp-egfx.
Copy link
Member

@CBenoit Benoît Cortier (CBenoit) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CBenoit Benoît Cortier (CBenoit) merged commit 58ffb36 into Devolutions:master Feb 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants