2 * va_wayland.h - Wayland API
4 * Copyright (c) 2012 Intel Corporation. All Rights Reserved.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 #include <wayland-client.h>
35 * \brief The Wayland rendering API
37 * This file contains the \ref api_wayland "Wayland rendering API".
45 * \defgroup api_wayland Wayland rendering API
49 * Theory of operations:
50 * - Create a VA display for an active Wayland display ;
51 * - Perform normal VA-API operations, e.g. decode to a VA surface ;
52 * - Get wl_buffer associated to the VA surface ;
53 * - Attach wl_buffer to wl_surface ;
57 * \brief Returns a VA display wrapping the specified Wayland display.
59 * This functions returns a (possibly cached) VA display from the
60 * specified Wayland @display.
62 * @param[in] display the native Wayland display
63 * @return the VA display
66 vaGetDisplayWl(struct wl_display
*display
);
69 * \brief Returns the Wayland buffer associated with a VA surface.
71 * This function returns a wl_buffer handle that can be used as an
72 * argument to wl_surface_attach(). This buffer references the
73 * underlying VA @surface. As such, the VA @surface and Wayland
74 * @out_buffer have the same size and color format. Should specific
75 * color conversion be needed, then VA/VPP API can fulfill this
78 * The @flags describe the desired picture structure. This is useful
79 * to expose a de-interlaced buffer. If the VA driver does not support
80 * any of the supplied flags, then #VA_STATUS_ERROR_FLAG_NOT_SUPPORTED
81 * is returned. The following flags are allowed: \c VA_FRAME_PICTURE,
82 * \c VA_TOP_FIELD, \c VA_BOTTOM_FIELD.
84 * @param[in] dpy the VA display
85 * @param[in] surface the VA surface
86 * @param[in] flags the deinterlacing flags
87 * @param[out] out_buffer a wl_buffer wrapping the VA @surface
88 * @return VA_STATUS_SUCCESS if successful
95 struct wl_buffer
**out_buffer
99 * \brief Returns the Wayland buffer associated with a VA image.
101 * This function returns a wl_buffer handle that can be used as an
102 * argument to wl_surface_attach(). This buffer references the
103 * underlying VA @image. As such, the VA @image and Wayland
104 * @out_buffer have the same size and color format. Should specific
105 * color conversion be needed, then VA/VPP API can fulfill this
108 * The @flags describe the desired picture structure. See
109 * vaGetSurfaceBufferWl() description for more details.
111 * @param[in] dpy the VA display
112 * @param[in] image the VA image
113 * @param[in] flags the deinterlacing flags
114 * @param[out] out_buffer a wl_buffer wrapping the VA @image
115 * @return VA_STATUS_SUCCESS if successful
122 struct wl_buffer
**out_buffer
131 #endif /* VA_WAYLAND_H */