Re: [RFC/POC PATCH spice-protocol 01/16] Add the StreamInfo message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2018-06-05 at 17:30 +0200, Lukáš Hrázký wrote:
> The message is meant to contain information related to the stream,
> e.g.
> now the guest (xrandr) output ID of the streamed monitor.
> 
> Signed-off-by: Lukáš Hrázký <lhrazky@xxxxxxxxxx>
> ---
>  spice/stream-device.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/spice/stream-device.h b/spice/stream-device.h
> index 6add42b..d004d0a 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 stream information message */
> +    STREAM_TYPE_INFO,
>  } StreamMsgType;
>  
>  typedef enum StreamCapabilities {
> @@ -140,6 +142,19 @@ typedef struct StreamMsgData {
>      uint8_t data[0];
>  } StreamMsgData;
>  
> +/* Message containing information about the stream, sent when a new
> stream is created.
> + */
> +typedef struct StreamMsgInfo {
> +    /* The xrandr output ID (index of the output in the list) that
> is being
> +     * streamed.  Sequence starts from 1. Value of 0 makes no sense
> here, but

Hmm, so in theory the id is determined by the guest (e.g. xorg/xrandr
output ids). So is it safe to specify valid values in the protocol
definition? What if in the future we have e.g. a wayland guest for
which 0 is a valid guest display ID?


> +     * the ID is passed from server to client and back to the server
> and
> +     * vd_agent in the MonitorsConfig messages. In those messages
> value of 0
> +     * means the output_id is unset, meaning the monitors are
> regular,
> +     * non-streamed from the streaming agent.
> +     */
> +    uint32_t output_id;
> +} StreamMsgInfo;
> +
>  /* 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.
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]