NVIDIA EGLStream
- external
wl_eglstream
error { bad_alloc, bad_handle, bad_attribs, bad_address }
Argument | Value | Description |
---|---|---|
bad_alloc | 0 | Bad allocation error |
bad_handle | 1 | Bad handle error |
bad_attribs | 2 | Bad attributes error |
bad_address | 3 | Bad IP address error |
- fd: The given handle represents a file descriptor, and the EGLStream connection must be done as described in EGL_KHR_stream_cross_process_fd
- inet: The EGLStream connection must be done using an inet address and port as described in EGL_NV_stream_socket. The given handle can be ignored, but both inet address and port must be given as attributes.
- socket: The given handle represents a unix socket, and the EGLStream connection must be done as described in EGL_NV_stream_socket.
attrib { inet_addr, inet_port, y_inverted }
Argument | Value | Description |
---|---|---|
inet_addr | 0 | Inet IPv4 address |
inet_port | 1 | IP port |
y_inverted | 2 | Image Y-inversion bit |
- inet_addr: The given attribute encodes an IPv4 address of a client socket. Both IPv4 address and port must be set at the same time.
- inet_port: The given attribute encodes a port of a client socket. Both IPv4 address and port must be set at the same time.
- y_inverted: The given attribute encodes the default value for a stream's image inversion relative to wayland protocol convention. Vulkan apps will be set to 'true', while OpenGL apps will be set to 'false'. NOTE: EGL_NV_stream_origin is the authorative source of truth regarding a stream's frame orientation and should be queried for an accurate value. The given attribute is a 'best guess' fallback mechanism which should only be used when a query to EGL_NV_stream_origin fails.
wl_eglstream_display
create_stream(id: new_id<wl_buffer>, width: int, height: int, handle: fd, type: int, attribs: array)
Argument | Type | Description |
---|---|---|
id | new_id<wl_buffer> | New ID |
width | int | Stream framebuffer width |
height | int | Stream framebuffer height |
handle | fd | Handle for the stream creation |
type | int | Handle type |
attribs | array | Stream extra connection attribs List of attributes with extra connection data It contains key-value pairs compatible with intptr_t type. A key must be one of wl_eglstream_display_attrib enumeration values. What a value represents is attribute-specific. |
Create a wl_buffer corresponding to given handle. The attributes list may be used to define additional EGLStream connection data (e.g inet address/port). The server can create its EGLStream handle using the information encoded in the wl_buffer.
Argument | Type | Description |
---|---|---|
stream | object<wl_buffer> | wl_buffer corresponding to an EGLStream |
interval | int | new swap interval |
Set the swap interval for the consumer of the given EGLStream. The swap interval is silently clamped to the valid range on the server side.
caps(caps: int)
Argument | Type | Description |
---|---|---|
caps | int | Capabilities mask |
The capabilities event is sent out at wl_eglstream_display binding time. It allows the server to advertise what features it supports so clients may know what is safe to be used.
swapinterval_override(swapinterval: int, stream: object<wl_buffer>)
Argument | Type | Description |
---|---|---|
swapinterval | int | Server swap interval override value |
stream | object<wl_buffer> | wl_buffer corresponding to an EGLStream |
The swapinterval_override event is sent out whenever a client requests a swapinterval setting through swap_interval() and there is an override in place that will make such request to be ignored. The swapinterval_override event will provide the override value so that the client is made aware of it.
cap { stream_fd, stream_inet, stream_socket }
Argument | Value | Description |
---|---|---|
stream_fd | 1 | Stream connection with FD |
stream_inet | 2 | Stream inet connection |
stream_socket | 4 | Stream unix connection |
This enum values should be used as bit masks.
- stream_fd: The server supports EGLStream connections as described in EGL_KHR_stream_cross_process_fd
- stream_inet: The server supports EGLStream inet connections as described in EGL_NV_stream_socket.
- stream_socket: The server supports EGLStream unix socket connections as described in EGL_NV_stream_socket.
Compositor Support
Mutter 46 | KWin 6.2 | Sway 1.9 | COSMIC 1.0.0 | Hyprland 0.42.0 | niri 0.1.8 | Weston 13 | Mir 2.18 | GameScope 3.15.14 | Jay 1.7.0 | |
---|---|---|---|---|---|---|---|---|---|---|
wl_eglstream_display | x | x | x | x | x | 1 | x | x | x | x |
Copyright
Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.