Re: [PATCH spice 1/3] Do not use gstreamer in default codecs if not available

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

 



> 
> Avoid the following warning when build with disabled gstreamer:
> Spice-WARNING **: reds.c:3660:reds_set_video_codecs: spice: unsupported video
> encoder gstreamer
> ---
>  server/reds.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index 5daf9bd..5456d22 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3510,7 +3510,12 @@ err:
>  }
>  
>  static const char default_renderer[] = "sw";
> -static const char default_video_codecs[] =
> "spice:mjpeg;gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8";
> +static const char default_video_codecs[] = "spice:mjpeg;"
> +#if defined(HAVE_GSTREAMER_1_0) || defined(HAVE_GSTREAMER_0_10)
> +
> "gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8";
> +#else
> +                                           "";
> +#endif
>  
>  /* new interface */
>  SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)

I would use something like


#if defined(HAVE_GSTREAMER_1_0) || defined(HAVE_GSTREAMER_0_10)
#define GSTREAMER_CODECS "gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8"
#else
#define GSTREAMER_CODECS ""
#endif
static const char default_video_codecs[] = "spice:mjpeg;" GSTREAMER_CODECS;


But maybe it's just me.
Doesn't the string ending with ';' cause problems with the parsing?

Maybe


#if defined(HAVE_GSTREAMER_1_0) || defined(HAVE_GSTREAMER_0_10)
#define GSTREAMER_CODECS ";gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8"
#else
#define GSTREAMER_CODECS ""
#endif
static const char default_video_codecs[] = "spice:mjpeg" GSTREAMER_CODECS;


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