[Spice-devel] [PATCH v3 1/2] autotools: Add automake conditional for gstreamer

Christophe Fergeau cfergeau at redhat.com
Thu Jan 19 15:34:52 UTC 2017


On Thu, Jan 19, 2017 at 04:29:18PM +0200, Snir Sheriber wrote:
> Adding conditional for having gstreamer_0_10 or gstreamer_1_0,
> removing the previous conditionals and update relevant ifdefs
> with the newly defined conditional
> ---
>  configure.ac                       | 3 +--
>  server/Makefile.am                 | 8 +-------
>  server/reds.c                      | 4 ++--
>  server/tests/test-codecs-parsing.c | 4 ++--
>  4 files changed, 6 insertions(+), 13 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index a78b4ec..8e06df8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -85,7 +85,6 @@ if test "x$enable_gstreamer" != "xno" && test "x$enable_gstreamer" != "x0.10"; t
>            fi
>      ])
>  fi
> -AM_CONDITIONAL(HAVE_GSTREAMER_1_0, test "x$have_gstreamer_1_0" = "xyes")
>  
>  if test "x$enable_gstreamer" != "xno" && test "x$enable_gstreamer" != "x1.0"; then
>      SPICE_CHECK_GSTREAMER(GSTREAMER_0_10, 0.10, [gstreamer-0.10 gstreamer-base-0.10 gstreamer-app-0.10 gstreamer-video-0.10],
> @@ -100,7 +99,7 @@ if test "x$enable_gstreamer" != "xno" && test "x$enable_gstreamer" != "x1.0"; th
>           fi
>      ])
>  fi
> -AM_CONDITIONAL(HAVE_GSTREAMER_0_10, test "x$have_gstreamer_0_10" = "xyes")
> +AM_CONDITIONAL(HAVE_GSTREAMER, test "x$have_gstreamer_0_10" = "xyes" || test "x$have_gstreamer_1_0" = "xyes")
>  
>  AS_IF([test "x$enable_gstreamer" = "xyes"],
>        [AC_MSG_ERROR("GStreamer support requested but not found")],
> 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)


up to this hunk,

Acked-by: Christophe Fergeau <cfergeau at redhat.com>

Everything below that should be dropped.

> 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,
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170119/eb0982f4/attachment.sig>


More information about the Spice-devel mailing list