[Spice-devel] [PATCH spice-common 5/5] video streaming: add support for frames of different sizes

Marc-André Lureau marcandre.lureau at gmail.com
Wed May 2 09:15:13 PDT 2012


looks good, ack both spice-protocol and spice-common changes

On Wed, May 2, 2012 at 3:55 PM, Yonit Halperin <yhalperi at redhat.com> wrote:
> rhbz #813826, #815426
>
> Add SPICE_MSG_DISPLAY_STREAM_DATA_SIZED, for stream_data message
> that also contains the size and destination box of the data.
> The server can send such messages only to clients with
> SPICE_DISPLAY_CAP_SIZED_STREAM.
> ---
>  common/messages.h |   15 ++++++++++++++-
>  spice-protocol    |    2 +-
>  spice.proto       |   19 ++++++++++++++++---
>  spice1.proto      |    8 ++++++--
>  4 files changed, 37 insertions(+), 7 deletions(-)
>
> diff --git a/common/messages.h b/common/messages.h
> index 106a8d3..e3677d1 100644
> --- a/common/messages.h
> +++ b/common/messages.h
> @@ -308,13 +308,26 @@ typedef struct SpiceMsgDisplayStreamCreate {
>     SpiceClip clip;
>  } SpiceMsgDisplayStreamCreate;
>
> -typedef struct SpiceMsgDisplayStreamData {
> +typedef struct SpiceStreamDataHeader {
>     uint32_t id;
>     uint32_t multi_media_time;
> +} SpiceStreamDataHeader;
> +
> +typedef struct SpiceMsgDisplayStreamData {
> +    SpiceStreamDataHeader base;
>     uint32_t data_size;
>     uint8_t data[0];
>  } SpiceMsgDisplayStreamData;
>
> +typedef struct SpiceMsgDisplayStreamDataSized {
> +    SpiceStreamDataHeader base;
> +    uint32_t width;
> +    uint32_t height;
> +    SpiceRect dest;
> +    uint32_t data_size;
> +    uint8_t data[0];
> +} SpiceMsgDisplayStreamDataSized;
> +
>  typedef struct SpiceMsgDisplayStreamClip {
>     uint32_t id;
>     SpiceClip clip;
> diff --git a/spice-protocol b/spice-protocol
> index 2d24f61..bf0daeb 160000
> --- a/spice-protocol
> +++ b/spice-protocol
> @@ -1 +1 @@
> -Subproject commit 2d24f61aae4f92746940fd1c0daf546c7a51dae8
> +Subproject commit bf0daeb3a3c834133e781439f76b1c702470581b
> diff --git a/spice.proto b/spice.proto
> index 513fe87..71be9ac 100644
> --- a/spice.proto
> +++ b/spice.proto
> @@ -591,6 +591,11 @@ struct String {
>     } u @anon;
>  };
>
> +struct StreamDataHeader {
> +       uint32 id;
> +       uint32 multi_media_time;
> +};
> +
>  channel DisplayChannel : BaseChannel {
>  server:
>     message {
> @@ -637,10 +642,9 @@ channel DisplayChannel : BaseChannel {
>     } stream_create = 122;
>
>     message {
> -       uint32 id;
> -       uint32 multi_media_time;
> +       StreamDataHeader base;
>        uint32 data_size;
> -       uint8 data[data_size] @end  @nomarshal;
> +       uint8 data[data_size] @end @nomarshal;
>     } stream_data;
>
>     message {
> @@ -785,6 +789,15 @@ channel DisplayChannel : BaseChannel {
>        uint32 surface_id;
>     } @ctype(SpiceMsgSurfaceDestroy) surface_destroy;
>
> +    message {
> +       StreamDataHeader base;
> +       uint32 width;
> +       uint32 height;
> +       Rect dest;
> +       uint32 data_size;
> +       uint8 data[data_size] @end @nomarshal;
> +    } stream_data_sized;
> +
>  client:
>     message {
>        uint8 pixmap_cache_id;
> diff --git a/spice1.proto b/spice1.proto
> index fa2524b..2ed1058 100644
> --- a/spice1.proto
> +++ b/spice1.proto
> @@ -533,6 +533,11 @@ struct String {
>     } u @anon;
>  };
>
> +struct StreamDataHeader {
> +       uint32 id;
> +       uint32 multi_media_time;
> +};
> +
>  channel DisplayChannel : BaseChannel {
>  server:
>     message {
> @@ -580,8 +585,7 @@ channel DisplayChannel : BaseChannel {
>     } stream_create = 122;
>
>     message {
> -       uint32 id;
> -       uint32 multi_media_time;
> +       StreamDataHeader base;
>        uint32 data_size;
>        uint32 pad_size @zero;
>        uint8 data[data_size] @end  @nomarshal;
> --
> 1.7.7.6
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau


More information about the Spice-devel mailing list