The VVASKernel is a structure to hold the kernel context and is created and passed to the core APIs by the GStreamer infrastructure plug-ins (for example, the vvas_xfilter).
typedef struct _vvas_kernel VVASKernel;
struct _vvas_kernel {
void *xcl_handle; /* XRT handle provided by GStreamer infrastructure plug-in */
uint32_t cu_idx; /* compute unit index of IP/soft-kernel */
json_t *kernel_config; /* kernel specific config from app */
void *kernel_priv; /* to store kernel specific structures */
json_t *kernel_dyn_config; /* Dynamically changed kernel configuration */
xrt_buffer *ert_cmd_buf; /* ERT command buffer used to submit execution commands to XRT */
size_t min_offset;
size_t max_offset;
VVASBufAllocCBFunc alloc_func; /* callback function to allocate memory from GstBufferPool */
VVASBufFreeCBFunc free_func; /* callback function to free memory allocated by alloc_func */
void *cb_user_data; /* handle to be passed along with alloc_func & free_func callback */
vvaspads *padinfo;
uint8_t is_multiprocess; /* if true, ERT command buffer will be used to start kernel,
else direct register programming will be used */
uint8_t *name;
uint16_t in_mem_bank; /* Memory bank to which input port of kernel is attached to */
uint16_t out_mem_bank; /* Memory bank to which output port of kernel is attached to */
};