EGL is our main vehicle for interoperability with multimedia, camera and graphics APIs. More...
Data Structures | |
struct | VPIWrapEGLImageParams |
Parameters for customizing EGLImage wrapping. More... | |
Functions | |
VPIStatus | vpiInitWrapEGLImageParams (VPIWrapEGLImageParams *params) |
Initialize VPIWrapEGLImageParams with default values. More... | |
VPIStatus | vpiImageCreateEGLImageWrapper (EGLImageKHR eglImage, const VPIWrapEGLImageParams *params, uint32_t flags, VPIImage *img) |
Create an image object by wrapping an existing EGLImage . More... | |
VPIStatus | vpiImageSetWrappedEGLImage (VPIImage img, EGLImageKHR eglImage) |
Redefines the wrapped EGLImage of an existing VPIImage wrapper. More... | |
VPIStatus | vpiEventCreateEGLSyncWrapper (EGLSyncKHR eglSync, VPIEvent *event) |
Create an event object by wrapping around an EGL sync object created from another client API. More... | |
VPIStatus | vpiEventExportEGLSync (VPIEvent event, EGLDisplay eglDpy, EGLSyncKHR *eglSync) |
Export a recorded VPI event to EGL sync object. More... | |
EGL is our main vehicle for interoperability with multimedia, camera and graphics APIs.
We provide function to export VPIEvent objects to be consumed by other APIs, as well as function to import images and sync objects from them.
struct VPIWrapEGLImageParams |
Parameters for customizing EGLImage wrapping.
These parameters are used to customize how EGLImage wrapping will be made. Make sure to call vpiInitWrapEGLImageParams to initialize this structure before updating its attributes. This guarantees that new attributes added in future versions will have a suitable default value assigned.
Definition at line 88 of file EGLInterop.h.
Data Fields | ||
---|---|---|
VPIColorSpec | colorSpec |
Overriden VPIColorSpec of the wrapped EGLImage. It it's a valid color spec, override the color spec information in the wrapped EGLImage. If VPI_COLOR_SPEC_DEFAULT, infer the color spec from the wrapped EGLImage. |
#include <vpi/EGLInterop.h>
Create an event object by wrapping around an EGL sync object created from another client API.
The created event can be used by vpiEventSync / vpiStreamWaitEvent to synchronize VPI tasks with a command queue from an external API.
[in] | eglSync | EGL sync handle |
[out] | event | pointer to an event handle |
#include <vpi/EGLInterop.h>
Export a recorded VPI event to EGL sync object.
The resulting object can be used to allow a command queue belonging to an external API to wait on a recorded VPI event.
The exported EGLSync
must be destroyed using eglDestroySyncKHR
before the VPI event object is destroyed.
[in] | event | Event to be exported. |
[in] | eglDpy | EGL display for which the sync object is being created. |
[out] | eglSync | Exported EGL sync handle |
VPIStatus vpiImageCreateEGLImageWrapper | ( | EGLImageKHR | eglImage, |
const VPIWrapEGLImageParams * | params, | ||
uint32_t | flags, | ||
VPIImage * | img | ||
) |
#include <vpi/EGLInterop.h>
Create an image object by wrapping an existing EGLImage
.
The object doesn't own the wrapped memory. The user is still responsible for wrapped memory lifetime, which must be valid until the array object is destroyed.
The returned handle must be destroyed when not being used anymore by calling vpiImageDestroy.
[in] | eglImage | EGL image created from another client API |
[in] | params | If not NULL, use the parameters to modify how the EGLImage is wrapped. Otherwise, it'll use default EGLImage handling. |
[in] | flags | Image flags. Here it can be specified in what backends the image can be used by or-ing together VPIBackend flags. Set flags to 0 to enable it in all backends supported by the active VPI context. |
[out] | img | Pointer to memory where the created image handle will be written to. |
#include <vpi/EGLInterop.h>
Redefines the wrapped EGLImage
of an existing VPIImage wrapper.
The new EGLImage
must have the same characteristics (type and dimensions) of the existing EGLImage
being wrapped.
The VPIImage must have been created by vpiImageCreateEGLImageWrapper.
This operation is efficient and does not allocate memory. The wrapped memory will be accessible to the same backends specified during wrapper creation.
The wrapped EGLImage
must be valid while it's still being wrapped.
[in] | img | Handle to an image created by vpiImageCreateEGLImageWrapper . |
[in] | eglImage | EGLImage object to be wrapped. |
VPIStatus vpiInitWrapEGLImageParams | ( | VPIWrapEGLImageParams * | params | ) |
#include <vpi/EGLInterop.h>
Initialize VPIWrapEGLImageParams with default values.
Default values are:
[in] | params | Structure to be initialized with default values. |