Re: [spice v16 02/23] streaming: Remove the Drawable.sized_stream field

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

 



Hey,

Thanks for working on this, makes the code easier to follow!
Imo it's easier to review if (artificially) split, I'll send what I did
as a followup to this patch.

Just one minor comment below:

On Tue, Jun 07, 2016 at 03:58:00PM +0200, Francois Gouget wrote:
> Only red_marshall_stream_data() needs to know whether to send the frame
> using a SpiceMsgDisplayStreamDataSized or a regular StreamData message.
> So check whether we have a sized frame there and simplify the rest of
> the code.
> 
> Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
> ---
>  server/dcc-send.c        | 39 +++++++++++-----------------
>  server/display-channel.c |  2 +-
>  server/display-channel.h |  1 -
>  server/stream.c          | 67 +++++++++++++++---------------------------------
>  server/stream.h          |  8 +-----
>  5 files changed, 38 insertions(+), 79 deletions(-)
> 
> diff --git a/server/dcc-send.c b/server/dcc-send.c
> index 5171f9a..798a9b3 100644
> --- a/server/dcc-send.c
> +++ b/server/dcc-send.c
> @@ -1657,36 +1657,27 @@ static int red_marshall_stream_data(RedChannelClient *rcc,
>      DisplayChannelClient *dcc = RCC_TO_DCC(rcc);
>      DisplayChannel *display = DCC_TO_DC(dcc);
>      Stream *stream = drawable->stream;
> -    SpiceImage *image;
> +    SpiceCopy *copy;
>      uint32_t frame_mm_time;
>      uint32_t n;
> -    int width, height;
> +    int is_sized, width, height;
>      int ret;
>  
> -    if (!stream) {
> -        spice_assert(drawable->sized_stream);
> -        stream = drawable->sized_stream;
> -    }

We could keep some check that 'drawable->stream' is not NULL, maybe not
an assert, but a g_return_val_if_fail(stream != NULL, FALSE); ?

Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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]