diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-08-06 19:21:03 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-08-06 19:21:03 +0200 |
commit | a10ee527c7dd0988f81a7878dfd55520899fbd09 (patch) | |
tree | 26171f31170eec784d78376f6acf0997f25162bd | |
parent | 0b3d75f14b4a275d13eefadc81ff7e1734d2fd0f (diff) |
wayland: handle de-interlacing flags.
VA/Wayland API was updated to allow flags for bob deinterlacing.
More elaborated filters will require a complete VA/VPP pipeline.
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiwindow_wayland.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c index 867c37c..5925fe4 100644 --- a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c +++ b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c @@ -195,7 +195,7 @@ gst_vaapi_window_wayland_render( struct wl_display * const wl_display = GST_VAAPI_OBJECT_WL_DISPLAY(window); struct wl_buffer *buffer; struct wl_callback *callback; - guint width, height; + guint width, height, va_flags; VASurfaceID surface_id; VAStatus status; @@ -224,11 +224,23 @@ gst_vaapi_window_wayland_render( if (priv->redraw_pending) wl_display_iterate(wl_display, WL_DISPLAY_READABLE); + /* XXX: use VA/VPP for other filters */ + va_flags = from_GstVaapiSurfaceRenderFlags(flags); status = vaGetSurfaceBufferWl( GST_VAAPI_DISPLAY_VADISPLAY(display), surface_id, + va_flags & (VA_TOP_FIELD|VA_BOTTOM_FIELD), &buffer ); + if (status == VA_STATUS_ERROR_FLAG_NOT_SUPPORTED) { + /* XXX: de-interlacing flags not supported, try with VPP? */ + status = vaGetSurfaceBufferWl( + GST_VAAPI_DISPLAY_VADISPLAY(display), + surface_id, + VA_FRAME_PICTURE, + &buffer + ); + } if (!vaapi_check_status(status, "vaGetSurfaceBufferWl()")) return FALSE; |