diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2014-06-26 22:22:22 +0100 |
---|---|---|
committer | Lionel Landwerlin <llandwerlin@gmail.com> | 2014-06-26 22:22:22 +0100 |
commit | 6c78b27a0458240988bc2e5b52644c7052064f36 (patch) | |
tree | 69a5730ba558d05cc152c7a342fe1e30cfdafb07 | |
parent | b7eb4d54e863a96e231d11668d5e84613bba3f8a (diff) | |
download | clutter-gst-6c78b27a0458240988bc2e5b52644c7052064f36.tar.gz |
configure.ac: add opportunity to disable gl texture upload support
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.c | 13 | ||||
-rw-r--r-- | configure.ac | 23 |
2 files changed, 25 insertions, 11 deletions
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index b81731c..461bdff 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -108,8 +108,11 @@ GST_DEBUG_CATEGORY_STATIC (clutter_gst_video_sink_debug); static const char clutter_gst_video_sink_caps_str[] = MAKE_CAPS (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY, BASE_SINK_CAPS) +#ifdef HAVE_GL_TEXTURE_UPLOAD ";" - MAKE_CAPS (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, BASE_SINK_CAPS); + MAKE_CAPS (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, BASE_SINK_CAPS) +#endif +; static GstStaticPadTemplate sinktemplate_all = @@ -1333,9 +1336,12 @@ static ClutterGstRenderer rgb32_glsl_renderer = "RGB 32", CLUTTER_GST_RGB32, CLUTTER_GST_RENDERER_NEEDS_GLSL, - GST_STATIC_CAPS (MAKE_CAPS (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, + GST_STATIC_CAPS ( +#ifdef HAVE_GL_TEXTURE_UPLOAD + MAKE_CAPS (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "RGBA") ";" +#endif MAKE_CAPS (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY, "{ RGBA, BGRA }")), 1, /* n_layers */ @@ -2254,8 +2260,11 @@ clutter_gst_video_sink_propose_allocation (GstBaseSink *base_sink, GstQuery *que gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL); +#ifdef HAVE_GL_TEXTURE_UPLOAD + gst_query_add_allocation_meta (query, GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, NULL); +#endif gst_query_add_allocation_meta (query, GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE, NULL); diff --git a/configure.ac b/configure.ac index b79515b..e05f9d2 100644 --- a/configure.ac +++ b/configure.ac @@ -221,14 +221,19 @@ dnl ======================================================================== dnl Experimental support for hardware accelerated decoders. dnl Temporarily disabling for GStreamer 1.0 since it's causing too many issues dnl and the API for hw support isn't yet put in stone -have_hw_decoder_support=no -# PKG_CHECK_MODULES(HW, -# [gstreamer-basevideo-$GST_MAJORMINOR >= $GST_PLUGINS_BAD_REQ_VERSION], -# [ -# have_hw_decoder_support=yes -# AC_DEFINE([HAVE_HW_DECODER_SUPPORT], [1], -# ["Defined if building Clutter with HW decoder support"]) -# ],[ have_hw_decoder_support=no ]) +m4_define([texture_upload_default], yes) +AC_ARG_ENABLE([gl-texture-upload], + [AC_HELP_STRING([--enable-gl-texture-upload=@<:@no/yes@:>@], + [Enable GL texture upload support @<:@default=]texture_upload_default[@:>@])], + [], + enable_gl_texture_upload=texture_upload_default) + +AS_IF([test "x$enable_gl_texture_upload" = "xyes"], + [ + AC_DEFINE([HAVE_GL_TEXTURE_UPLOAD], [1], + ["GL texture upload support"]) + ] +) dnl ======================================================================== @@ -332,6 +337,6 @@ echo "" echo " • Extra:" echo " API documentation : ${enable_gtk_doc}" echo " Introspection data: ${enable_introspection}" -echo " HW Decoder support: ${have_hw_decoder_support}" +echo " GL texture upload : ${enable_gl_texture_upload}" echo " UDEV support : ${have_gudev}" echo "" |