Re: [PATCH spice-server] gstreamer: Include only needed fields in SpiceFormatForGStreamer structure

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

 



On Thu, Jan 26, 2017 at 10:07:47PM +0000, Frediano Ziglio wrote:
> This structure is used to store format information for
> both Gstreamer 0.10 and 1.0 however the two format uses
> different fields from it.
> Use a macro to filter only needed fields.
> This currently also fixes a compile error using Gstreamer 0.10.

What is it?

> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/gstreamer-encoder.c | 23 +++++++++++++++++------
>  1 file changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
> index 35573bd..cd9e627 100644
> --- a/server/gstreamer-encoder.c
> +++ b/server/gstreamer-encoder.c
> @@ -42,16 +42,27 @@
>  
>  typedef struct {
>      SpiceBitmapFmt spice_format;
> +    uint32_t bpp;
> +#ifndef HAVE_GSTREAMER_0_10
>      char format[8];
>      GstVideoFormat gst_format;
> -    uint32_t bpp;
> +#else
>      uint32_t depth;
>      uint32_t endianness;
>      uint32_t blue_mask;
>      uint32_t green_mask;
>      uint32_t red_mask;
> +#endif
>  } SpiceFormatForGStreamer;
>  
> +#ifndef HAVE_GSTREAMER_0_10
> +#define FMT_DESC(sf, b, f, gf, d, end, bm, gm, rm) \
> +    { sf, b, f, gf }
> +#else
> +#define FMT_DESC(sf, b, f, gf, d, end, bm, gm, rm) \
> +    { sf, b, d, end, bm, gm, rm }
> +#endif

FMT_DESC(spice_format, bpp, format, gst_format, depth, endianness, blue_mask, green_mask, red_mask) \

Apart from this, looks good to me

Reviewed-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

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]