summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2016-02-15 18:00:49 +0100
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2016-02-15 18:20:48 +0100
commit60ebfbc59536658ba1635f99a18e692a7d1b4506 (patch)
tree1fea16a91fb3412f2b8913948a575eaefd788533
parentba701d59184e5ae42a2c6497a3feab26bc665b55 (diff)
downloadgst-vaapi-master.tar.gz
libs: fix build errorHEADmaster
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 <vineeth.tm@samsung.com> https://bugzilla.gnome.org/show_bug.cgi?id=762055
-rw-r--r--gst-libs/gst/vaapi/gstvaapibufferproxy.c13
1 files 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,