On Tue, 2016-11-15 at 12:10 -0500, Frediano Ziglio wrote: > > > > 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. It is more readable, i will go for it > Doesn't the string ending with ';' cause problems with the parsing? > It doesn't - the check for end is: while (*codecs != '\0' && *codecs != ';') { Thanks, Pavel > 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