[Spice-devel] [PATCH spice-protocol 2/8] Add the StreamMsgGraphicsDeviceInfo message

Frediano Ziglio fziglio at redhat.com
Wed Jan 9 07:38:46 UTC 2019


> 
> The message contains information about the graphics device and monitor
> belonging to a particular video stream (which maps to a channel) from
> the streaming agent.
> 
> Signed-off-by: Lukáš Hrázký <lhrazky at redhat.com>
> ---
>  spice/stream-device.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/spice/stream-device.h b/spice/stream-device.h
> index 6add42b..77d76af 100644
> --- a/spice/stream-device.h
> +++ b/spice/stream-device.h
> @@ -90,6 +90,8 @@ typedef enum StreamMsgType {
>      STREAM_TYPE_CURSOR_SET,
>      /* guest cursor position */
>      STREAM_TYPE_CURSOR_MOVE,
> +    /* the graphics device display information message (device address and
> display id) */
> +    STREAM_TYPE_DEVICE_DISPLAY_INFO,
>  } StreamMsgType;
>  
>  typedef enum StreamCapabilities {
> @@ -140,6 +142,13 @@ typedef struct StreamMsgData {
>      uint8_t data[0];
>  } StreamMsgData;
>  
> +typedef struct StreamMsgDeviceDisplayInfo {

No much documentation, when it is supposed to be sent?
In which state?
>From the agent, from the server or both?
No capabilities for a new message?

> +    uint32_t id;

I suppose is not the same "device_display_id", not clear what is it.

> +    uint32_t device_display_id;
> +    uint32_t device_address_len;

No limit? Is 4gb fine? I suppose you want a length to be able to
extend the message in the future, otherwise you can use the size
of the message.

> +    uint8_t device_address[0];  // a zero-terminated string

Encoding? Utf-8?
I suppose by "zero-terminated" you mean if not terminated is a
protocol violation.

> +} StreamMsgDeviceDisplayInfo;
> +
>  /* 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.

Frediano


More information about the Spice-devel mailing list