Remove HAVE_GST_VIDEO_OVERLAY_HWCAPS macro

This macro guarded the use of HAVE_GST_VIDEO_OVERLAY_HWCAPS, which was not
defined before gstreamer 0.10.35. Since the support of gstreamer-0.10 is
deprecated these guards are not required.

https://bugzilla.gnome.org/show_bug.cgi?id=745728
https://bugzilla.gnome.org/show_bug.cgi?id=732666

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
Víctor Manuel Jáquez Leal 2015-04-03 16:55:43 +03:00 committed by Sreerenj Balachandran
parent d256f1d283
commit 43d8366ec6
4 changed files with 0 additions and 15 deletions

View file

@ -274,9 +274,6 @@ dnl ... GstVideoOverlayComposition (gstreamer-video)
PKG_CHECK_MODULES([GST_VIDEO],
[gstreamer-video-$GST_PKG_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
AC_DEFINE_UNQUOTED([HAVE_GST_VIDEO_OVERLAY_HWCAPS], 1,
[Defined to 1 if GstVideoOverlayComposition API supports HW hints.])
dnl GStreamer -bad plugins (deprecated in GStreamer v1.2)
if test "$USE_GST_API_1_2p" != "yes" && test "$USE_GST_API_1_4p" != "yes"; then
PKG_CHECK_MODULES([GST_BASEVIDEO],

View file

@ -246,11 +246,9 @@ static inline gboolean
overlay_rectangle_update_global_alpha (GstVaapiOverlayRectangle * overlay,
GstVideoOverlayRectangle * rect)
{
#ifdef HAVE_GST_VIDEO_OVERLAY_HWCAPS
const guint flags = gst_video_overlay_rectangle_get_flags (rect);
if (!(flags & GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA))
return TRUE;
#endif
return gst_vaapi_subpicture_set_global_alpha (overlay->subpicture,
gst_video_overlay_rectangle_get_global_alpha (rect));
}

View file

@ -364,12 +364,10 @@ from_GstVideoOverlayFormatFlags (guint ovl_flags)
{
guint flags = 0;
#ifdef HAVE_GST_VIDEO_OVERLAY_HWCAPS
if (ovl_flags & GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA)
flags |= GST_VAAPI_SUBPICTURE_FLAG_PREMULTIPLIED_ALPHA;
if (ovl_flags & GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA)
flags |= GST_VAAPI_SUBPICTURE_FLAG_GLOBAL_ALPHA;
#endif
return flags;
}
@ -386,12 +384,10 @@ to_GstVideoOverlayFormatFlags (guint flags)
{
guint ovl_flags = 0;
#ifdef HAVE_GST_VIDEO_OVERLAY_HWCAPS
if (flags & GST_VAAPI_SUBPICTURE_FLAG_PREMULTIPLIED_ALPHA)
ovl_flags |= GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA;
if (flags & GST_VAAPI_SUBPICTURE_FLAG_GLOBAL_ALPHA)
ovl_flags |= GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA;
#endif
return ovl_flags;
}

View file

@ -41,12 +41,10 @@ static GOptionEntry g_options[] = {
0,
G_OPTION_ARG_STRING, &g_codec_str,
"codec to test", NULL },
#ifdef HAVE_GST_VIDEO_OVERLAY_HWCAPS
{ "global-alpha", 'g',
0,
G_OPTION_ARG_DOUBLE, &g_global_alpha,
"global-alpha value", NULL },
#endif
{ NULL, }
};
@ -92,10 +90,8 @@ main(int argc, char *argv[])
if (!video_output_init(&argc, argv, g_options))
g_error("failed to initialize video output subsystem");
#ifdef HAVE_GST_VIDEO_OVERLAY_HWCAPS
if (g_global_alpha != 1.0)
flags |= GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA;
#endif
g_print("Test subpicture\n");
@ -145,10 +141,8 @@ main(int argc, char *argv[])
g_error("could not create video overlay");
gst_buffer_unref(buffer);
#ifdef HAVE_GST_VIDEO_OVERLAY_HWCAPS
if (flags & GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA)
gst_video_overlay_rectangle_set_global_alpha(overlay, g_global_alpha);
#endif
compo = gst_video_overlay_composition_new(overlay);
if (!compo)