mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
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 <vineeth.tm@samsung.com>
https://bugzilla.gnome.org/show_bug.cgi?id=762055
This commit is contained in:
parent
ba701d5918
commit
60ebfbc595
1 changed files with 5 additions and 8 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue