Skip to content

feat: add moq-media-gtk and GTK example#37

Draft
Frando wants to merge 3 commits into
mainfrom
feat/gtk
Draft

feat: add moq-media-gtk and GTK example#37
Frando wants to merge 3 commits into
mainfrom
feat/gtk

Conversation

@Frando

@Frando Frando commented Apr 1, 2026

Copy link
Copy Markdown
Member

GTK4 integration for video rendering, using GLArea with native OpenGL. The GLES renderer now supports zero-copy DMA-BUF import via EGL, with automatic VPP retiling when the buffer modifier is incompatible (e.g. Y_TILED from VAAPI decode on Intel MTL, which EGL/iris can handle but needs retiling for per-plane R8/GR88 import).

Key changes:

  • New moq-media-gtk crate with VideoGLWidget (GTK4 GLArea) and gtk-watch example that subscribes to a live session
  • Extract VPP retiler into standalone vpp_retiler.rs module, shared between Vulkan and GLES DMA-BUF import paths
  • GLES DMA-BUF importer now queries EGL for supported modifiers and auto-initializes VPP retiling when needed
  • Add EGL diagnostic logging (supported formats/modifiers) for debugging DMA-BUF import issues on different hardware
  • Fix NV12 color conversion in GLES shader (correct UV channel order)

Frando and others added 3 commits April 1, 2026 16:39
Moves VppRetiler, VaProcPipelineParameterBuffer, and va_check from
dmabuf_import.rs into render/vpp_retiler.rs so it can be shared by
both the wgpu (Vulkan DMA-BUF) and GLES (EGL DMA-BUF) render paths.

No behavioral change. Restores the multi-GPU render node fallback
range (renderD128..135) that was narrowed in the original branch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tracking

GlesRenderer:
- Add NV12_RG_FRAG_SRC shader for RG8 UV textures (DMA-BUF import
  produces GL_RG8 instead of LUMINANCE_ALPHA).
- Add Nv12Rg ActiveMode and select the correct program in draw().
- Add GlesRenderPath enum and last_render_path() for observability.
- Log render path transitions.

GlesDmaBufImporter:
- Add EGL DMA-BUF format/modifier query and diagnostic logging.
- Add eglGetError resolution and egl_error_name for better error
  reporting on import failures.
- Add VPP retiler integration for incompatible tiling modifiers.
- Add query_non_external_modifiers for modifier compatibility checks.

audio_backend: demote verbose stream config enumeration to trace.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GTK4 integration for iroh-live video rendering:
- GlVideoWidget wrapping a GLArea with NV12 shader support
- Zero-copy DMA-BUF import via GlesRenderer on Linux
- gtk-watch example: connect to a LiveTicket and render in a window

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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