From 96d7dd9eeff51e75ae9ee1d00adb573d50bb97c6 Mon Sep 17 00:00:00 2001 From: Kevin Pouget Date: Thu, 22 Aug 2019 15:17:50 +0200 Subject: [PATCH] stream-device: Define Quality Indicator messages These messages are used to transmit streaming quality indicators from the streaming device to SPICE Server. The message is a variable-length, zero-terminated string. A new capability is introduced (STREAM_CAP_QUALITY_INDICATOR) for SPICE server and streaming agent capabilities negotiation. Signed-off-by: Kevin Pouget Acked-by: Frediano Ziglio --- spice/stream-device.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/spice/stream-device.h b/spice/stream-device.h index c70690a..15d839b 100644 --- a/spice/stream-device.h +++ b/spice/stream-device.h @@ -92,9 +92,13 @@ typedef enum StreamMsgType { STREAM_TYPE_CURSOR_MOVE, /* the graphics device display information message (device address and display id) */ STREAM_TYPE_DEVICE_DISPLAY_INFO, + /* video encoding quality indicator message */ + STREAM_TYPE_QUALITY_INDICATOR, } StreamMsgType; typedef enum StreamCapabilities { + /* handling of STREAM_TYPE_QUALITY_INDICATOR messages */ + STREAM_CAP_QUALITY_INDICATOR, STREAM_CAP_END // this must be the last } StreamCapabilities; @@ -171,6 +175,23 @@ typedef struct StreamMsgDeviceDisplayInfo { uint8_t device_address[0]; // a zero-terminated string } StreamMsgDeviceDisplayInfo; +/* This message contains a quality indicator string, generated by the + * streaming agent. It is indended to be used by a module running of + * the server to ajust the streaming quality. + * + * The format of the string message is not specificied because + * module-specific. + * + * This message is sent by the guest to the host. + * + * States allowed: any + * + * Capability required: STREAM_CAP_QUALITY_INDICATOR + */ +typedef struct StreamMsgQualityIndicator { + uint8_t quality[0]; // a zero-terminated string +} StreamMsgQualityIndicator; + /* Tell to stop current stream and possibly start a new one. * This message is sent by the host to the guest. * Allows to communicate the codecs supported by the clients.