if (!ensure_window(va_dpy, dst_rect->width, dst_rect->height))
return VA_STATUS_ERROR_ALLOCATION_FAILED;
- va_status = vaGetSurfaceBufferWl(va_dpy, surface, &buffer);
+ va_status = vaGetSurfaceBufferWl(va_dpy, surface, VA_FRAME_PICTURE, &buffer);
if (va_status != VA_STATUS_SUCCESS)
return va_status;
wl_display_iterate(wl_drawable->display, WL_DISPLAY_READABLE);
}
- va_status = vaGetSurfaceBufferWl(va_dpy, va_surface, &buffer);
+ va_status = vaGetSurfaceBufferWl(va_dpy, va_surface, VA_FRAME_PICTURE, &buffer);
if (va_status != VA_STATUS_SUCCESS)
return va_status;
VAStatus (*vaGetSurfaceBufferWl)(
struct VADriverContext *ctx,
VASurfaceID surface,
+ unsigned int flags,
struct wl_buffer **out_buffer
);
VAStatus (*vaGetImageBufferWl)(
struct VADriverContext *ctx,
VAImageID image,
+ unsigned int flags,
struct wl_buffer **out_buffer
);
};
vaGetSurfaceBufferWl(
VADisplay dpy,
VASurfaceID surface,
+ unsigned int flags,
struct wl_buffer **out_buffer
)
{
return VA_STATUS_ERROR_INVALID_DISPLAY;
if (!ctx->vtable_wayland || !ctx->vtable_wayland->vaGetSurfaceBufferWl)
return VA_STATUS_ERROR_UNIMPLEMENTED;
- return ctx->vtable_wayland->vaGetSurfaceBufferWl(ctx, surface, out_buffer);
+ return ctx->vtable_wayland->vaGetSurfaceBufferWl(ctx, surface, flags,
+ out_buffer);
}
VAStatus
vaGetImageBufferWl(
VADisplay dpy,
VAImageID image,
+ unsigned int flags,
struct wl_buffer **out_buffer
)
{
return VA_STATUS_ERROR_INVALID_DISPLAY;
if (!ctx->vtable_wayland || !ctx->vtable_wayland->vaGetImageBufferWl)
return VA_STATUS_ERROR_UNIMPLEMENTED;
- return ctx->vtable_wayland->vaGetImageBufferWl(ctx, image, out_buffer);
+ return ctx->vtable_wayland->vaGetImageBufferWl(ctx, image, flags,
+ out_buffer);
}
* color conversion be needed, then VA/VPP API can fulfill this
* purpose.
*
+ * The @flags describe the desired picture structure. This is useful
+ * to expose a de-interlaced buffer. If the VA driver does not support
+ * any of the supplied flags, then #VA_STATUS_ERROR_FLAG_NOT_SUPPORTED
+ * is returned. The following flags are allowed: \c VA_FRAME_PICTURE,
+ * \c VA_TOP_FIELD, \c VA_BOTTOM_FIELD.
+ *
* @param[in] dpy the VA display
* @param[in] surface the VA surface
+ * @param[in] flags the deinterlacing flags
* @param[out] out_buffer a wl_buffer wrapping the VA @surface
* @return VA_STATUS_SUCCESS if successful
*/
vaGetSurfaceBufferWl(
VADisplay dpy,
VASurfaceID surface,
+ unsigned int flags,
struct wl_buffer **out_buffer
);
* color conversion be needed, then VA/VPP API can fulfill this
* purpose.
*
+ * The @flags describe the desired picture structure. See
+ * vaGetSurfaceBufferWl() description for more details.
+ *
* @param[in] dpy the VA display
* @param[in] image the VA image
+ * @param[in] flags the deinterlacing flags
* @param[out] out_buffer a wl_buffer wrapping the VA @image
* @return VA_STATUS_SUCCESS if successful
*/
vaGetImageBufferWl(
VADisplay dpy,
VAImageID image,
+ unsigned int flags,
struct wl_buffer **out_buffer
);