[Spice-devel] [PATCH 3/3] Update ifdefs for gstreamer availability
Snir Sheriber
ssheribe at redhat.com
Sun Jan 15 16:12:22 UTC 2017
Using ifdefs with the recently defined conditional for having
gstreamer_0_10 or gstreamer_1_0
---
server/Makefile.am | 8 +-------
server/reds.c | 4 ++--
server/tests/test-codecs-parsing.c | 4 ++--
server/video-encoder.h | 2 +-
4 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/server/Makefile.am b/server/Makefile.am
index 90ff779..ab7593a 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -186,13 +186,7 @@ libserver_la_SOURCES += \
$(NULL)
endif
-if HAVE_GSTREAMER_0_10
-libserver_la_SOURCES += \
- gstreamer-encoder.c \
- $(NULL)
-endif
-
-if HAVE_GSTREAMER_1_0
+if HAVE_GSTREAMER
libserver_la_SOURCES += \
gstreamer-encoder.c \
$(NULL)
diff --git a/server/reds.c b/server/reds.c
index e061e4d..bdb10e1 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3405,7 +3405,7 @@ err:
}
static const char default_renderer[] = "sw";
-#if defined(HAVE_GSTREAMER_1_0) || defined(HAVE_GSTREAMER_0_10)
+#if defined(HAVE_GSTREAMER)
#define GSTREAMER_CODECS "gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8;"
#else
#define GSTREAMER_CODECS ""
@@ -3491,7 +3491,7 @@ static const EnumNames video_encoder_names[] = {
static const new_video_encoder_t video_encoder_procs[] = {
&mjpeg_encoder_new,
-#if defined(HAVE_GSTREAMER_1_0) || defined(HAVE_GSTREAMER_0_10)
+#if defined(HAVE_GSTREAMER)
&gstreamer_encoder_new,
#else
NULL,
diff --git a/server/tests/test-codecs-parsing.c b/server/tests/test-codecs-parsing.c
index 5af2e5d..9799d72 100644
--- a/server/tests/test-codecs-parsing.c
+++ b/server/tests/test-codecs-parsing.c
@@ -32,7 +32,7 @@ static void codecs_good(void)
"spice:mjpeg;;;",
"spice:mjpeg;;spice:mjpeg;;;",
";;spice:mjpeg;;spice:mjpeg;;;",
-#if defined(HAVE_GSTREAMER_1_0) || defined(HAVE_GSTREAMER_0_10)
+#if defined(HAVE_GSTREAMER)
"gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8;",
";;spice:mjpeg;;gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8;",
#endif
@@ -117,7 +117,7 @@ static void codecs_bad(void)
"*spice: unknown video codec unknown_codec",
TRUE,
},
-#if !defined(HAVE_GSTREAMER_1_0) && !defined(HAVE_GSTREAMER_0_10)
+#if !defined(HAVE_GSTREAMER)
{
"gstreamer:mjpeg",
G_LOG_LEVEL_WARNING,
diff --git a/server/video-encoder.h b/server/video-encoder.h
index a4cd2b3..1ca9461 100644
--- a/server/video-encoder.h
+++ b/server/video-encoder.h
@@ -198,7 +198,7 @@ VideoEncoder* mjpeg_encoder_new(SpiceVideoCodecType codec_type,
VideoEncoderRateControlCbs *cbs,
bitmap_ref_t bitmap_ref,
bitmap_unref_t bitmap_unref);
-#if defined(HAVE_GSTREAMER_1_0) || defined(HAVE_GSTREAMER_0_10)
+#if defined(HAVE_GSTREAMER)
VideoEncoder* gstreamer_encoder_new(SpiceVideoCodecType codec_type,
uint64_t starting_bit_rate,
VideoEncoderRateControlCbs *cbs,
--
2.9.3
More information about the Spice-devel
mailing list