From 60ebfbc59536658ba1635f99a18e692a7d1b4506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 15 Feb 2016 18:00:49 +0100 Subject: libs: fix build error gst_vaapi_buffer_proxy_{acquire_handle,release_handle,finalize,class} functions are used only when libva's API version is greater than 0.36.0 This patch guards those functions completely rather than just their content. The patch is a continuation of commit 38f8fea4 Original-patch-by: Vineeth TM https://bugzilla.gnome.org/show_bug.cgi?id=762055 --- gst-libs/gst/vaapi/gstvaapibufferproxy.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapibufferproxy.c b/gst-libs/gst/vaapi/gstvaapibufferproxy.c index aba9d301..358a34e9 100644 --- a/gst-libs/gst/vaapi/gstvaapibufferproxy.c +++ b/gst-libs/gst/vaapi/gstvaapibufferproxy.c @@ -77,10 +77,10 @@ to_GstVaapiBufferMemoryType (guint va_type) return type; } +#if VA_CHECK_VERSION (0,36,0) static gboolean gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy) { -#if VA_CHECK_VERSION (0,36,0) const guint mem_type = proxy->va_info.mem_type; VAStatus va_status; @@ -99,15 +99,12 @@ gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy) if (proxy->va_info.mem_type != mem_type) return FALSE; return TRUE; -#else - return FALSE; -#endif } +/* VA_CHECK_VERSION (0,36,0) */ static gboolean gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy) { -#if VA_CHECK_VERSION (0,36,0) VAStatus va_status; if (!proxy->va_info.handle) @@ -123,11 +120,9 @@ gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy) if (!vaapi_check_status (va_status, "vaReleaseBufferHandle()")) return FALSE; return TRUE; -#else - return FALSE; -#endif } +/* VA_CHECK_VERSION (0,36,0) */ static void gst_vaapi_buffer_proxy_finalize (GstVaapiBufferProxy * proxy) { @@ -140,6 +135,7 @@ gst_vaapi_buffer_proxy_finalize (GstVaapiBufferProxy * proxy) gst_vaapi_object_replace (&proxy->parent, NULL); } +/* VA_CHECK_VERSION (0,36,0) */ static inline const GstVaapiMiniObjectClass * gst_vaapi_buffer_proxy_class (void) { @@ -149,6 +145,7 @@ gst_vaapi_buffer_proxy_class (void) }; return &GstVaapiBufferProxyClass; } +#endif GstVaapiBufferProxy * gst_vaapi_buffer_proxy_new (guintptr handle, guint type, gsize size, -- cgit v1.2.1