PipeWire  0.3.33
PipeWire Work Queue Object

Typedefs

typedef void(* pw_work_func_t) (void *obj, void *data, int res, uint32_t id)
 

Functions

struct pw_work_queue * pw_work_queue_new (struct pw_loop *loop)
 Create a new PipeWire Work Queue Object. More...
 
void pw_work_queue_destroy (struct pw_work_queue *queue)
 Destroy a work queue. More...
 
uint32_t pw_work_queue_add (struct pw_work_queue *queue, void *obj, int res, pw_work_func_t func, void *data)
 Add an item to the work queue. More...
 
int pw_work_queue_cancel (struct pw_work_queue *queue, void *obj, uint32_t id)
 Cancel a work item. More...
 
int pw_work_queue_complete (struct pw_work_queue *queue, void *obj, uint32_t seq, int res)
 Complete a work item. More...
 

Detailed Description

Typedef Documentation

◆ pw_work_func_t

typedef void(* pw_work_func_t) (void *obj, void *data, int res, uint32_t id)

Function Documentation

◆ pw_work_queue_add()

uint32_t pw_work_queue_add ( struct pw_work_queue *  queue,
void *  obj,
int  res,
pw_work_func_t  func,
void *  data 
)

Add an item to the work queue.

Parameters
queuethe work queue
objthe object owning the work item
resa result code
funca work function
datapassed to func

References NAME, pw_log_debug, pw_loop_signal_event, SPA_ID_INVALID, spa_list_append, spa_list_first, spa_list_is_empty, spa_list_remove(), SPA_RESULT_ASYNC_SEQ, and SPA_RESULT_IS_ASYNC.

Referenced by pw_impl_link_prepare().

◆ pw_work_queue_cancel()

int pw_work_queue_cancel ( struct pw_work_queue *  queue,
void *  obj,
uint32_t  id 
)

Cancel a work item.

Parameters
queuethe work queue
objthe owner object
idthe wotk id to cancel

References NAME, pw_log_debug, pw_loop_signal_event, SPA_ID_INVALID, and spa_list_for_each.

◆ pw_work_queue_complete()

int pw_work_queue_complete ( struct pw_work_queue *  queue,
void *  obj,
uint32_t  seq,
int  res 
)

Complete a work item.

Parameters
queuethe work queue
objthe owner object
seqthe sequence number that completed
res0 if the item was found, < 0 on error

References NAME, pw_log_debug, pw_log_trace, pw_loop_signal_event, SPA_ID_INVALID, and spa_list_for_each.

◆ pw_work_queue_destroy()

void pw_work_queue_destroy ( struct pw_work_queue *  queue)

Destroy a work queue.

Parameters
queuethe work queue to destroy

References NAME, pw_log_debug, pw_loop_destroy_source, and spa_list_for_each_safe.

Referenced by pw_context_destroy().

◆ pw_work_queue_new()

struct pw_work_queue* pw_work_queue_new ( struct pw_loop loop)

Create a new PipeWire Work Queue Object.

Parameters
loopthe loop to use
Returns
a newly allocated work queue

References NAME, pw_log_debug, and pw_loop_add_event.

Referenced by pw_context_get_work_queue().