PipeWire 0.3.77
Loading...
Searching...
No Matches

Queued processing of work items. More...

Files

file  work-queue.h
 pipewire/work-queue.h
 

Data Structures

struct  pw_work_queue
 

Typedefs

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

Functions

struct pw_work_queuepw_work_queue_new (struct pw_loop *loop)
 Create a new Work Queue. 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

Queued processing of work items.

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_new()

struct pw_work_queue * pw_work_queue_new ( struct pw_loop loop)

Create a new Work Queue.

Parameters
loopthe loop to use
Returns
a newly allocated work queue

◆ pw_work_queue_destroy()

void pw_work_queue_destroy ( struct pw_work_queue queue)

Destroy a work queue.

Parameters
queuethe work queue to destroy

◆ 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

◆ 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

◆ 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