rdpgfx

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: GPL-3.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rdpgfx implements the RDP Graphics Pipeline Extension channel (MS-RDPEGFX), the modern drawing path where a server composites surfaces and sends them as compressed bitmaps.

It is a dynamic virtual channel, so it only starts once the drdynvc layer has created it and both sides have exchanged capabilities.

Index

Constants

View Source
const (
	CapsVersion8  = 0x00080004
	CapsVersion81 = 0x00080105
)

Capability versions. 8.0 and 8.1 are the ones a decoder of RemoteFX and raw bitmaps can honestly claim; the 10.x versions advertise AVC support.

0x00080105 rather than 0x00080100: the low byte is part of the version, not padding. See MS-RDPEGFX 2.2.3.2.

View Source
const DVCChannelName = "Microsoft::Windows::RDS::Graphics"

RDPGFX_DVC_CHANNEL_NAME is the dynamic virtual channel name.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

type Frame struct {
	ID       uint32
	Surfaces []*Surface
}

Frame is one completed frame: the id the server assigned and the surfaces that were touched. The pixels live on the surfaces.

type GfxClient

type GfxClient struct {
	emission.Emitter
	// contains filtered or unexported fields
}

GfxClient is the RDPGFX channel handler.

func NewGfxClient

func NewGfxClient() *GfxClient

NewGfxClient creates an RDPGFX handler.

func (*GfxClient) OnClose

func (c *GfxClient) OnClose()

OnClose implements drdynvc.DynChannel.

func (*GfxClient) OnData

func (c *GfxClient) OnData(data []byte)

OnData implements drdynvc.DynChannel. The payload is a ZGFX stream that may hold several PDUs.

func (*GfxClient) OnOpen

func (c *GfxClient) OnOpen(channelID uint32)

OnOpen implements drdynvc.DynChannel.

func (*GfxClient) SetSender

func (c *GfxClient) SetSender(f func(channelID uint32, data []byte) error)

SetSender installs the callback used to write to the dynamic virtual channel. It must be called before the channel is opened.

type Reset

type Reset struct {
	Width, Height int
}

Reset describes a Reset Graphics PDU: the size of the desktop the server will composite into. Any previously known surfaces are gone.

type Surface

type Surface struct {
	ID          uint16
	Width       int
	Height      int
	PixelFormat uint8
	// contains filtered or unexported fields
}

Surface is a decoded surface: a set of pixels that the server composites into frames. Surfaces are addressed by a 16 bit id.

func (*Surface) Origin added in v0.3.0

func (s *Surface) Origin() (int, int)

Origin returns where the surface is mapped on the desktop. A client that composites surfaces itself has to offset them by this, or everything ends up in the top left corner.

func (*Surface) Pixels

func (s *Surface) Pixels() []byte

Pixels returns a copy of the surface contents as BGRA, top down.

type SurfacePlacement added in v0.3.0

type SurfacePlacement struct {
	ID   uint16
	X, Y int
}

SurfacePlacement reports that the server mapped a surface somewhere on the desktop.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL