| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<protocol name="stream"> |
| 3 |
|
| 4 |
<copyright> |
| 5 |
Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved. |
| 6 |
|
| 7 |
Permission is hereby granted, free of charge, to any person obtaining a |
| 8 |
copy of this software and associated documentation files (the "Software"), |
| 9 |
to deal in the Software without restriction, including without limitation |
| 10 |
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 11 |
and/or sell copies of the Software, and to permit persons to whom the |
| 12 |
Software is furnished to do so, subject to the following conditions: |
| 13 |
|
| 14 |
The above copyright notice and this permission notice shall be included in |
| 15 |
all copies or substantial portions of the Software. |
| 16 |
|
| 17 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 20 |
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 21 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 22 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 23 |
DEALINGS IN THE SOFTWARE. |
| 24 |
</copyright> |
| 25 |
|
| 26 |
<!-- wl_eglstream stub interface. Currently, this isn't actually used. Enums |
| 27 |
must belong to an interface, and the name of it is prepended to the enum |
| 28 |
values. This interface lets us define WL_EGLSTREAM_ERROR_*, |
| 29 |
WL_EGLSTREAM_ATTRIB_* and WL_EGLSTREAM_HANDLE_TYPE_* enums --> |
| 30 |
<interface name="wl_eglstream" version="1"> |
| 31 |
<enum name="error"> |
| 32 |
<entry name="bad_alloc" value="0" summary="Bad allocation error"/> |
| 33 |
<entry name="bad_handle" value="1" summary="Bad handle error"/> |
| 34 |
<entry name="bad_attribs" value="2" summary="Bad attributes error"/> |
| 35 |
<entry name="bad_address" value="3" summary="Bad IP address error"/> |
| 36 |
</enum> |
| 37 |
|
| 38 |
<!-- wl_buffer handle types. This enum defines what the handle given to a |
| 39 |
create_stream request represents --> |
| 40 |
<enum name="handle_type"> |
| 41 |
<description summary="Stream handle type"> |
| 42 |
- fd: The given handle represents a file descriptor, and the |
| 43 |
EGLStream connection must be done as described in |
| 44 |
EGL_KHR_stream_cross_process_fd |
| 45 |
|
| 46 |
- inet: The EGLStream connection must be done using an inet address |
| 47 |
and port as described in EGL_NV_stream_socket. The given |
| 48 |
handle can be ignored, but both inet address and port must |
| 49 |
be given as attributes. |
| 50 |
|
| 51 |
- socket: The given handle represents a unix socket, and the EGLStream |
| 52 |
connection must be done as described in EGL_NV_stream_socket. |
| 53 |
</description> |
| 54 |
<entry name="fd" value="0" summary="File descriptor"/> |
| 55 |
<entry name="inet" value="1" summary="Inet connection"/> |
| 56 |
<entry name="socket" value="2" summary="Unix socket"/> |
| 57 |
</enum> |
| 58 |
|
| 59 |
<!-- EGLStream creation attributes. This enum defines possible attributes to |
| 60 |
be passed to a create_stream request --> |
| 61 |
<enum name="attrib"> |
| 62 |
<description summary="Stream creation attributes"> |
| 63 |
- inet_addr: The given attribute encodes an IPv4 address of a client |
| 64 |
socket. Both IPv4 address and port must be set at the same |
| 65 |
time. |
| 66 |
|
| 67 |
- inet_port: The given attribute encodes a port of a client socket. |
| 68 |
Both IPv4 address and port must be set at the same time. |
| 69 |
|
| 70 |
- y_inverted: The given attribute encodes the default value for a |
| 71 |
stream's image inversion relative to wayland protocol |
| 72 |
convention. Vulkan apps will be set to 'true', while |
| 73 |
OpenGL apps will be set to 'false'. |
| 74 |
NOTE: EGL_NV_stream_origin is the authorative source of |
| 75 |
truth regarding a stream's frame orientation and should be |
| 76 |
queried for an accurate value. The given attribute is a |
| 77 |
'best guess' fallback mechanism which should only be used |
| 78 |
when a query to EGL_NV_stream_origin fails. |
| 79 |
</description> |
| 80 |
<entry name="inet_addr" value="0" summary="Inet IPv4 address"/> |
| 81 |
<entry name="inet_port" value="1" summary="IP port"/> |
| 82 |
<entry name="y_inverted" value="2" summary="Image Y-inversion bit"/> |
| 83 |
</enum> |
| 84 |
</interface> |
| 85 |
|
| 86 |
<!-- EGLStream support. This object is created by the server and published |
| 87 |
using the display's global event. It represents the binding between an |
| 88 |
EGL display and a wayland display --> |
| 89 |
<interface name="wl_eglstream_display" version="1"> |
| 90 |
<!-- wl_eglstream_display capabilities. This enum defines a series of |
| 91 |
capability flags that will be advertised by the server to all its |
| 92 |
clients --> |
| 93 |
<enum name="cap"> |
| 94 |
<description summary="wl_eglstream_display capability codes"> |
| 95 |
This enum values should be used as bit masks. |
| 96 |
|
| 97 |
- stream_fd: The server supports EGLStream connections as described |
| 98 |
in EGL_KHR_stream_cross_process_fd |
| 99 |
|
| 100 |
- stream_inet: The server supports EGLStream inet connections as |
| 101 |
described in EGL_NV_stream_socket. |
| 102 |
|
| 103 |
- stream_socket: The server supports EGLStream unix socket connections |
| 104 |
as described in EGL_NV_stream_socket. |
| 105 |
</description> |
| 106 |
<entry name="stream_fd" value="1" summary="Stream connection with FD"/> |
| 107 |
<entry name="stream_inet" value="2" summary="Stream inet connection"/> |
| 108 |
<entry name="stream_socket" value="4" summary="Stream unix connection"/> |
| 109 |
</enum> |
| 110 |
|
| 111 |
<!-- Advertise server capabilities as a bit mask. Clients might listen to |
| 112 |
this event in order to know what features are supported by the server |
| 113 |
--> |
| 114 |
<event name="caps"> |
| 115 |
<description summary="Server capabilities event"> |
| 116 |
The capabilities event is sent out at wl_eglstream_display binding |
| 117 |
time. It allows the server to advertise what features it supports so |
| 118 |
clients may know what is safe to be used. |
| 119 |
</description> |
| 120 |
<arg name="caps" type="int" summary="Capabilities mask"/> |
| 121 |
</event> |
| 122 |
|
| 123 |
<event name="swapinterval_override"> |
| 124 |
<description summary="Server Swap interval override event"> |
| 125 |
The swapinterval_override event is sent out whenever a client requests |
| 126 |
a swapinterval setting through swap_interval() and there is an override |
| 127 |
in place that will make such request to be ignored. |
| 128 |
The swapinterval_override event will provide the override value so |
| 129 |
that the client is made aware of it. |
| 130 |
</description> |
| 131 |
<arg name="swapinterval" type="int" |
| 132 |
summary="Server swap interval override value"/> |
| 133 |
<arg name="stream" type="object" interface="wl_buffer" |
| 134 |
summary="wl_buffer corresponding to an EGLStream"/> |
| 135 |
</event> |
| 136 |
|
| 137 |
<!-- Create a wl_buffer for the given handle. The attributes array may |
| 138 |
define additional EGLStream connection data (e.g. inet address/port). |
| 139 |
The server can use the wl_buffer to create the actual EGLStream handle |
| 140 |
on its side and attach a consumer. --> |
| 141 |
<request name="create_stream"> |
| 142 |
<description summary="Create a wl_buffer from the given handle"> |
| 143 |
Create a wl_buffer corresponding to given handle. The attributes list |
| 144 |
may be used to define additional EGLStream connection data (e.g inet |
| 145 |
address/port). The server can create its EGLStream handle using the |
| 146 |
information encoded in the wl_buffer. |
| 147 |
</description> |
| 148 |
<arg name="id" type="new_id" interface="wl_buffer" summary="New ID"/> |
| 149 |
<arg name="width" type="int" summary="Stream framebuffer width"/> |
| 150 |
<arg name="height" type="int" summary="Stream framebuffer height"/> |
| 151 |
<arg name="handle" type="fd" summary="Handle for the stream creation"/> |
| 152 |
<arg name="type" type="int" summary="Handle type"/> |
| 153 |
<arg name="attribs" type="array" summary="Stream extra connection attribs"> |
| 154 |
<description summary="List of attributes with extra connection data"> |
| 155 |
It contains key-value pairs compatible with intptr_t type. A key must |
| 156 |
be one of wl_eglstream_display_attrib enumeration values. What a value |
| 157 |
represents is attribute-specific. |
| 158 |
</description> |
| 159 |
</arg> |
| 160 |
</request> |
| 161 |
|
| 162 |
<request name="swap_interval"> |
| 163 |
<description summary="change the swap interval of an EGLStream consumer"> |
| 164 |
Set the swap interval for the consumer of the given EGLStream. The swap |
| 165 |
interval is silently clamped to the valid range on the server side. |
| 166 |
</description> |
| 167 |
<arg name="stream" type="object" interface="wl_buffer" |
| 168 |
summary="wl_buffer corresponding to an EGLStream"/> |
| 169 |
<arg name="interval" type="int" summary="new swap interval"/> |
| 170 |
</request> |
| 171 |
</interface> |
| 172 |
</protocol> |