|
libfunnel
|
libfunnel EGL API integration More...
Go to the source code of this file.
Enumerations | |
| enum | funnel_egl_format { FUNNEL_EGL_FORMAT_UNKNOWN = 0 , FUNNEL_EGL_FORMAT_RGB888 , FUNNEL_EGL_FORMAT_RGBA8888 } |
| Formats available for EGL integration. More... | |
Functions | |
| int | funnel_stream_init_egl (struct funnel_stream *stream, EGLDisplay display) |
| Set up a stream for EGL integration. | |
| int | funnel_stream_egl_add_format (struct funnel_stream *stream, enum funnel_egl_format format) |
| Add a supported EGL format. | |
| int | funnel_buffer_get_egl_image (struct funnel_buffer *buf, EGLImage *pimage) |
| Get the EGLImage for a Funnel buffer. | |
| int | funnel_buffer_get_egl_format (struct funnel_buffer *buf, enum funnel_egl_format *pformat) |
| Get the EGL format for a Funnel buffer. | |
| int | funnel_buffer_get_acquire_egl_sync (struct funnel_buffer *buf, EGLSync *psync) |
| Get the EGLSync for acquiring the buffer. | |
| int | funnel_buffer_set_release_egl_sync (struct funnel_buffer *buf, EGLSync sync) |
| Set the EGLSync for releasing the buffer. | |
libfunnel EGL API integration
See test-egl.c for a usage example.
| enum funnel_egl_format |
| int funnel_stream_init_egl | ( | struct funnel_stream * | stream, |
| EGLDisplay | display ) |
Set up a stream for EGL integration.
| stream | Stream [Lifetime: borrowed] |
| display | EGLDisplay to attach to the stream [Lifetime: borrowed-by stream] |
| -EEXIST | The API was already initialized once |
| -EOPNOTSUPP | Missing EGL extensions |
| -EPROTONOSUPPORT | GPU driver not supported (PipeWire version too old) |
| -ENODEV |
|
| int funnel_stream_egl_add_format | ( | struct funnel_stream * | stream, |
| enum funnel_egl_format | format ) |
Add a supported EGL format.
Must be called in preference order (highest to lowest).
| stream | Stream [Lifetime: borrowed] |
| format | enum funnel_egl_format format |
| -EINVAL |
|
| -ENOENT | Format is not supported by the device or not usable |
| int funnel_buffer_get_egl_image | ( | struct funnel_buffer * | buf, |
| EGLImage * | pimage ) |
Get the EGLImage for a Funnel buffer.
The EGLImage will only be valid until buf is returned or enqueued, or the stream is destroyed.
| buf | Buffer [Lifetime: borrowed] | |
| [out] | pimage | EGLImage for the buffer [Lifetime: borrowed-from buf] |
| -EINVAL |
|
| int funnel_buffer_get_egl_format | ( | struct funnel_buffer * | buf, |
| enum funnel_egl_format * | pformat ) |
Get the EGL format for a Funnel buffer.
| buf | Buffer [Lifetime: borrowed] | |
| [out] | pformat | EGL format |
| -EINVAL |
|
| int funnel_buffer_get_acquire_egl_sync | ( | struct funnel_buffer * | buf, |
| EGLSync * | psync ) |
Get the EGLSync for acquiring the buffer.
The user must wait on this sync object before accessing the buffer.
| buf | Buffer [Lifetime: borrowed] | |
| [out] | psync | EGLSync [Lifetime: owned] |
| -EINVAL |
|
| -EIO | Unable to create an acquire EGLSync |
| int funnel_buffer_set_release_egl_sync | ( | struct funnel_buffer * | buf, |
| EGLSync | sync ) |
Set the EGLSync for releasing the buffer.
This sync object must be signaled when access to the buffer is complete. The sync type must be EGL_SYNC_NATIVE_FENCE_ANDROID.
| buf | Buffer [Lifetime: borrowed] |
| sync | EGLSync [Lifetime: borrowed] |
| -EINVAL |
|
| -EIO | Unable to set the release EGLSync (is the sync type correct?) |