Go to index / Go to protocols

stream ↗

stream
wl_eglstream

Version 1
wl_eglstream
enum error {
    bad_alloc = 0,
    bad_handle = 1,
    bad_attribs = 2,
    bad_address = 3,
}
  • bad_alloc — Bad allocation error
  • bad_handle — Bad handle error
  • bad_attribs — Bad attributes error
  • bad_address — Bad IP address error
wl_eglstream
enum handle_type {
    fd = 0,
    inet = 1,
    socket = 2,
}
  • fd — File descriptor
  • inet — Inet connection
  • socket — Unix socket

Stream handle type

  • 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.

wl_eglstream
enum attrib {
    inet_addr = 0,
    inet_port = 1,
    y_inverted = 2,
}
  • inet_addr — Inet IPv4 address
  • inet_port — IP port
  • y_inverted — Image Y-inversion bit

Stream creation attributes

  • 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.

stream
wl_eglstream_display

Version 1
Compositor Support
Version 1
louvre 2.14.1
wl_eglstream_display
enum cap {
    stream_fd = 1,
    stream_inet = 2,
    stream_socket = 4,
}
  • stream_fd — Stream connection with FD
  • stream_inet — Stream inet connection
  • stream_socket — Stream unix connection

wl_eglstream_display capability codes

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.

wl_eglstream_display
event caps(
    caps: int,
)
  • caps — Capabilities mask

Server capabilities event

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.

wl_eglstream_display
event swapinterval_override(
    swapinterval: int,
    stream: object<wl_buffer>,
)
  • swapinterval — Server swap interval override value
  • stream — wl_buffer corresponding to an EGLStream

Server Swap interval override event

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.

wl_eglstream_display
request create_stream(
    id: new_id<wl_buffer>,
    width: int,
    height: int,
    handle: fd,
    type: int,
    attribs: array,
)
  • id — New ID
  • width — Stream framebuffer width
  • height — Stream framebuffer height
  • handle — Handle for the stream creation
  • type — Handle type
  • attribs — 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 from the given handle

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.

wl_eglstream_display
request swap_interval(
    stream: object<wl_buffer>,
    interval: int,
)
  • stream — wl_buffer corresponding to an EGLStream
  • interval — new swap interval

change the swap interval of an EGLStream consumer

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.