LV2  1.0.13
Data Fields
LV2_Worker_Interface Struct Reference

LV2 Plugin Worker Interface. More...

Data Fields

LV2_Worker_Status(* work )(LV2_Handle instance, LV2_Worker_Respond_Function respond, LV2_Worker_Respond_Handle handle, uint32_t size, const void *data)
 The worker method. More...
 
LV2_Worker_Status(* work_response )(LV2_Handle instance, uint32_t size, const void *body)
 Handle a response from the worker. More...
 
LV2_Worker_Status(* end_run )(LV2_Handle instance)
 Called when all responses for this cycle have been delivered. More...
 

Detailed Description

LV2 Plugin Worker Interface.

This is the interface provided by the plugin to implement a worker method. The plugin's extension_data() method should return an LV2_Worker_Interface when called with LV2_WORKER__interface as its argument.

Field Documentation

LV2_Worker_Status(* LV2_Worker_Interface::work) (LV2_Handle instance, LV2_Worker_Respond_Function respond, LV2_Worker_Respond_Handle handle, uint32_t size, const void *data)

The worker method.

This is called by the host in a non-realtime context as requested, possibly with an arbitrary message to handle.

A response can be sent to run() using respond. The plugin MUST NOT make any assumptions about which thread calls this method, other than the fact that there are no real-time requirements.

Parameters
instanceThe LV2 instance this is a method on.
respondA function for sending a response to run().
handleMust be passed to respond if it is called.
sizeThe size of data.
dataData from run(), or NULL.
LV2_Worker_Status(* LV2_Worker_Interface::work_response) (LV2_Handle instance, uint32_t size, const void *body)

Handle a response from the worker.

This is called by the host in the run() context when a response from the worker is ready.

Parameters
instanceThe LV2 instance this is a method on.
sizeThe size of body.
bodyMessage body, or NULL.
LV2_Worker_Status(* LV2_Worker_Interface::end_run) (LV2_Handle instance)

Called when all responses for this cycle have been delivered.

Since work_response() may be called after run() finished, this provides a hook for code that must run after the cycle is completed.

This field may be NULL if the plugin has no use for it. Otherwise, the host MUST call it after every run(), regardless of whether or not any responses were sent that cycle.


The documentation for this struct was generated from the following file: