3.1 Source Details

Source sending mouse pointer position updates:

The source MUST send pointer position update messages as defined in section 2.2.2.

This mouse cursor position update message gives the new location of the upper-left side of the mouse cursor image. This is not affected by the location of the pointer's hot spot within the cursor image. If the sink needs to know the position of the hot spot (for example with UIBC), then it MUST add the hot spot offset that was sent in the last mouse cursor image update.

Note The X and Y position can be negative and the sink MUST perform any clipping that is necessary to ensure that only the visible part of the mouse cursor is displayed.

Because the UDP packets can be delivered out of order, the sink needs to maintain the RTP sequence number of the last mouse position update (either mouse position or shape packet) and store the new mouse position (or shape packet) if the RTP sequence number is higher (accounting for RTP sequence number wrap).

Source sending mouse pointer shape updates

The source MUST send mouse pointer shape update messages as defined in section 2.2.3.

Note If the image type is disabled, the sink stops displaying a hardware cursor from the start of the next frame.

The sink maintains the CursorImageId of the last shape update it received so when it receives a new mouse pointer shape packet, it can discard the packet if the CursorImageId is not greater than the previous shape update. In the case where the CursorImageId is the same, the XPos and the YPos can still be used to update the current pointer position (if RTP sequence number of shape update is greater than that of the last position update).

Because we do not use an acknowledgement mechanism, the source needs to transmit the cursor image multiple times to the sink to ensure that the sink displays the correct image. The source sends the same cursor image up to 4 times at 100ms intervals (1 transmission, then 3 retransmissions), this resent schedule is reset every time the mouse image is updated.

Testing Note: Even with a 64Kb UDP packet, it is still possible for the compressed image to span multiple packets, so the source and sink MUST both test with mouse shape updates that span multiple UDP packets. It is recommended to test with a 256x256 cursor image that compresses to more than 64Kb in size to verify this behavior. For source implementations, it is recommended to compile the graphics driver to use a very small UDP packet size to test this behavior.