Re: [PATCH spice-gtk] display: remove needless SPICE_CHANNEL casts in reset_capabilities

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

 



> 
> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> 
> The passed argument is already a SpiceChannel.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx>

> ---
>  src/channel-display.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/src/channel-display.c b/src/channel-display.c
> index 7c663cb..14296d3 100644
> --- a/src/channel-display.c
> +++ b/src/channel-display.c
> @@ -843,26 +843,26 @@ static void
> spice_display_channel_reset_capabilities(SpiceChannel *channel)
>  {
>      guint i;
>  
> -    spice_channel_set_capability(SPICE_CHANNEL(channel),
> SPICE_DISPLAY_CAP_SIZED_STREAM);
> -    spice_channel_set_capability(SPICE_CHANNEL(channel),
> SPICE_DISPLAY_CAP_MONITORS_CONFIG);
> -    spice_channel_set_capability(SPICE_CHANNEL(channel),
> SPICE_DISPLAY_CAP_COMPOSITE);
> -    spice_channel_set_capability(SPICE_CHANNEL(channel),
> SPICE_DISPLAY_CAP_A8_SURFACE);
> +    spice_channel_set_capability(channel, SPICE_DISPLAY_CAP_SIZED_STREAM);
> +    spice_channel_set_capability(channel,
> SPICE_DISPLAY_CAP_MONITORS_CONFIG);
> +    spice_channel_set_capability(channel, SPICE_DISPLAY_CAP_COMPOSITE);
> +    spice_channel_set_capability(channel, SPICE_DISPLAY_CAP_A8_SURFACE);
>  #ifdef USE_LZ4
> -    spice_channel_set_capability(SPICE_CHANNEL(channel),
> SPICE_DISPLAY_CAP_LZ4_COMPRESSION);
> +    spice_channel_set_capability(channel,
> SPICE_DISPLAY_CAP_LZ4_COMPRESSION);
>  #endif
>      if (SPICE_DISPLAY_CHANNEL(channel)->priv->enable_adaptive_streaming) {
> -        spice_channel_set_capability(SPICE_CHANNEL(channel),
> SPICE_DISPLAY_CAP_STREAM_REPORT);
> +        spice_channel_set_capability(channel,
> SPICE_DISPLAY_CAP_STREAM_REPORT);
>      }
>  #ifdef G_OS_UNIX
> -    spice_channel_set_capability(SPICE_CHANNEL(channel),
> SPICE_DISPLAY_CAP_GL_SCANOUT);
> +    spice_channel_set_capability(channel, SPICE_DISPLAY_CAP_GL_SCANOUT);
>  #endif
> -    spice_channel_set_capability(SPICE_CHANNEL(channel),
> SPICE_DISPLAY_CAP_MULTI_CODEC);
> +    spice_channel_set_capability(channel, SPICE_DISPLAY_CAP_MULTI_CODEC);
>  #ifdef HAVE_BUILTIN_MJPEG
> -    spice_channel_set_capability(SPICE_CHANNEL(channel),
> SPICE_DISPLAY_CAP_CODEC_MJPEG);
> +    spice_channel_set_capability(channel, SPICE_DISPLAY_CAP_CODEC_MJPEG);
>  #endif
>      for (i = 1; i < G_N_ELEMENTS(gst_opts); i++) {
>          if (gstvideo_has_codec(i)) {
> -            spice_channel_set_capability(SPICE_CHANNEL(channel),
> gst_opts[i].cap);
> +            spice_channel_set_capability(channel, gst_opts[i].cap);
>          } else {
>              SPICE_DEBUG("GStreamer does not support the %s codec",
>              gst_opts[i].name);
>          }
> --
> 2.20.1.2.gb21ebb671b
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




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