2.2.2.1 RDPGFX_WIRE_TO_SURFACE_PDU_1

The RDPGFX_WIRE_TO_SURFACE_PDU_1 message is used to transfer encoded bitmap data from the server to a client-side destination surface.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

header

...

surfaceId

codecId

pixelFormat

destRect

...

...

bitmapDataLength

...

bitmapData (variable)

...

...

header (8 bytes):  An RDPGFX_HEADER structure (section 2.2.1.5). The cmdId field MUST be set to RDPGFX_CMDID_WIRETOSURFACE_1 (0x0001), while the flags field MUST be set to zero.

surfaceId (2 bytes):  A 16-bit unsigned integer that specifies the ID of the destination surface.

codecId (2 bytes):  A 16-bit unsigned integer that specifies the codec that was used to encode the bitmap data encapsulated in the bitmapData field.

Value

Meaning

RDPGFX_CODECID_UNCOMPRESSED

0x0000

The bitmap data encapsulated in the bitmapData field is uncompressed. Pixels in the uncompressed data are ordered from left to right and then top to bottom.

RDPGFX_CODECID_CAVIDEO

0x0003

The bitmap data encapsulated in the bitmapData field is compressed using the RemoteFX Codec ([MS-RDPRFX] sections 2.2.1 and 3.1.8). Note that the TS_RFX_RECT ([MS-RDPRFX] section 2.2.2.1.6) structures encapsulated in the bitmapData field MUST all be relative to the top-left corner of the rectangle defined by the destRect field.

RDPGFX_CODECID_CLEARCODEC

0x0008

The bitmap data encapsulated in the bitmapData field is compressed using the ClearCodec Codec (sections 2.2.4.1 and 3.3.8.1).

RDPGFX_CODECID_PLANAR

0x000A

The bitmap data encapsulated in the bitmapData field is compressed using the Planar Codec ([MS-RDPEGDI] sections 2.2.2.5.1 and 3.1.9).

RDPGFX_CODECID_AVC420

0x000B

The bitmap data encapsulated in the bitmapData field is compressed using the MPEG-4 AVC/H.264 Codec in YUV420p mode (section 2.2.4.4).

RDPGFX_CODECID_ALPHA

0x000C

The bitmap data encapsulated in the bitmapData field is compressed using the Alpha Codec (section 2.2.4.3).

RDPGFX_CODECID_AVC444

0x000E

The bitmap data encapsulated in the bitmapData field is compressed using the MPEG-4 AVC/H.264 Codec in YUV444 mode (section 2.2.4.5).

RDPGFX_CODECID_AVC444V2

0x000F

The bitmap data encapsulated in the bitmapData field is compressed using the MPEG-4 AVC/H.264 Codec in YUV444v2 mode (section 2.2.4.6).

pixelFormat (1 byte):  An RDPGFX_PIXELFORMAT (section 2.2.1.4) structure that specifies the pixel format of the decoded bitmap data encapsulated in the bitmapData field.

destRect (8 bytes):  An RDPGFX_RECT16 (section 2.2.1.2) structure that specifies the target point on the destination surface to which to copy the decoded bitmap and the dimensions (width and height) of the bitmap data encapsulated in the bitmapData field. This field specifies a bounding rectangle if the codecId field contains the RDPGFX_CODECID_AVC420 (0x000B), RDPGFX_CODECID_AVC444 (0x000E), or the RDPGFX_CODECID_AVC444V2 (0x000F) identifier.

bitmapDataLength (4 bytes):  A 32-bit unsigned integer that specifies the length, in bytes, of the bitmapData field.

bitmapData (variable):  A variable-length array of bytes containing bitmap data encoded using the codec identified by the ID in the codecId field.