Skip to content

Conversation

@elmarco
Copy link
Contributor

@elmarco elmarco commented Jan 28, 2025

  • PDUs parsing
  • basic DVC processing
  • rendering
  • ZGFX compression for server
  • server support
  • AVC codecs

Probably left out in this PR, since I'd rather focus on AVC444 atm:

  • ClearCodec

See also #427

Based on ironrdp-pdu/gfx code.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Use the dedicated ironrdp-egfx crate instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
@CBenoit CBenoit marked this pull request as draft January 28, 2025 13:25
@CBenoit
Copy link
Member

CBenoit commented Jan 28, 2025

Converted to draft to hint that the PR is WIP.

@glamberson
Copy link
Contributor

Hi @elmarco - thanks for starting this work. I'm building on IronRDP for a
server project and have already implented a lot of what's planned in this PR.

More speficically I've implemented some server-side EGFX functionality that might complement
your work here:

  • annex_b_to_avc() - converts encoder output to MS-RDPEGFX required format
  • create_avc420_bitmap_stream() - builds RFX_AVC420_BITMAP_STREAM with regions
  • Server frame sending with StartFrame/WireToSurface1/EndFrame
  • Flow control via FrameAcknowledge tracking

Are you planning to continue this PR? If so, I'd be happy to contribute these
pieces. If not, I can open a separate PR building on your PDU work.

Let me know what works best.

Thanks,
Greg Lamberson
Lamco Development

@elmarco
Copy link
Contributor Author

elmarco commented Dec 16, 2025

hi @glamberson! feel free to close this PR once you have one that supersedes it. thanks!

glamberson pushed a commit to glamberson/IronRDP that referenced this pull request Dec 16, 2025
Extends the EGFX server implementation with complete server-side support
for H.264/AVC420 video streaming. This builds on the foundation from
PR Devolutions#648 by @elmarco.

Server enhancements:
- State machine for capability negotiation workflow
- Surface creation and mapping to output
- Frame sending with StartFrame/WireToSurface1/EndFrame sequence
- Flow control via FrameAcknowledge tracking
- Configurable backpressure (max frames in flight)
- Output queue for proactive frame transmission

New H.264 utilities:
- `Avc420Region` - Region metadata for H.264 frames
- `annex_b_to_avc()` - Convert Annex B to AVC format (length-prefixed NALs)
- `align_to_16()` - Align dimensions to H.264 macroblock boundaries
- `encode_avc420_bitmap_stream()` - Create AVC420 bitmap streams

The server now supports the full EGFX protocol flow:
1. Client sends CapabilitiesAdvertise
2. Server responds with CapabilitiesConfirm (V8.1 with AVC420)
3. Server sends ResetGraphics, CreateSurface, MapSurfaceToOutput
4. For each frame: StartFrame → WireToSurface1 → EndFrame
5. Client sends FrameAcknowledge for flow control

Refs: Devolutions#427

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
glamberson pushed a commit to glamberson/IronRDP that referenced this pull request Dec 16, 2025
Add complete MS-RDPEGFX implementation with PDU types and server logic.

PDU layer (based on work by @elmarco in Devolutions#648):
- All 23 RDPGFX PDUs (WireToSurface, CreateSurface, ResetGraphics, etc.)
- Capability sets V8 through V10.7
- AVC420/AVC444 bitmap stream codecs
- Timestamp, QuantQuality, and supporting types

Server implementation:
- Multi-surface management (Offscreen Surfaces ADM element)
- Frame tracking with flow control (Unacknowledged Frames ADM element)
- V8/V8.1/V10/V10.1-V10.7 capability negotiation
- AVC420 and AVC444 frame sending
- QoE metrics processing
- Cache import handling
- Resize coordination
- Backpressure via client queue depth

Client-side DVC processor (from Devolutions#648):
- Basic message processing scaffolding

Credits: @elmarco for PDU definitions and protocol research in PR Devolutions#648.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
glamberson pushed a commit to glamberson/IronRDP that referenced this pull request Dec 16, 2025
Add complete MS-RDPEGFX implementation with PDU types and server logic.

PDU layer (based on work by @elmarco in Devolutions#648):
- All 23 RDPGFX PDUs (WireToSurface, CreateSurface, ResetGraphics, etc.)
- Capability sets V8 through V10.7
- AVC420/AVC444 bitmap stream codecs
- Timestamp, QuantQuality, and supporting types

Server implementation:
- Multi-surface management (Offscreen Surfaces ADM element)
- Frame tracking with flow control (Unacknowledged Frames ADM element)
- V8/V8.1/V10/V10.1-V10.7 capability negotiation
- AVC420 and AVC444 frame sending
- QoE metrics processing
- Cache import handling
- Resize coordination
- Backpressure via client queue depth

Client-side DVC processor (from Devolutions#648):
- Basic message processing scaffolding

Credits: @elmarco for PDU definitions and protocol research in PR Devolutions#648.
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.

3 participants