PipeWire 1.4.2
Loading...
Searching...
No Matches

PipeWire loop object provides an implementation of the spa loop interfaces. More...

Files

file  loop.h
 pipewire/loop.h
 

Data Structures

struct  pw_loop
 

Macros

#define PW_API_LOOP_IMPL   static inline
 

Functions

struct pw_looppw_loop_new (const struct spa_dict *props)
 Create a new loop.
 
void pw_loop_destroy (struct pw_loop *loop)
 Destroy a loop.
 
int pw_loop_set_name (struct pw_loop *loop, const char *name)
 
PW_API_LOOP_IMPL int pw_loop_add_source (struct pw_loop *object, struct spa_source *source)
 
PW_API_LOOP_IMPL int pw_loop_update_source (struct pw_loop *object, struct spa_source *source)
 
PW_API_LOOP_IMPL int pw_loop_remove_source (struct pw_loop *object, struct spa_source *source)
 
PW_API_LOOP_IMPL int pw_loop_invoke (struct pw_loop *object, spa_invoke_func_t func, uint32_t seq, const void *data, size_t size, bool block, void *user_data)
 
PW_API_LOOP_IMPL int pw_loop_get_fd (struct pw_loop *object)
 
PW_API_LOOP_IMPL void pw_loop_add_hook (struct pw_loop *object, struct spa_hook *hook, const struct spa_loop_control_hooks *hooks, void *data)
 
PW_API_LOOP_IMPL void pw_loop_enter (struct pw_loop *object)
 
PW_API_LOOP_IMPL void pw_loop_leave (struct pw_loop *object)
 
PW_API_LOOP_IMPL int pw_loop_iterate (struct pw_loop *object, int timeout)
 
PW_API_LOOP_IMPL struct spa_sourcepw_loop_add_io (struct pw_loop *object, int fd, uint32_t mask, bool close, spa_source_io_func_t func, void *data)
 
PW_API_LOOP_IMPL int pw_loop_update_io (struct pw_loop *object, struct spa_source *source, uint32_t mask)
 
PW_API_LOOP_IMPL struct spa_sourcepw_loop_add_idle (struct pw_loop *object, bool enabled, spa_source_idle_func_t func, void *data)
 
PW_API_LOOP_IMPL int pw_loop_enable_idle (struct pw_loop *object, struct spa_source *source, bool enabled)
 
PW_API_LOOP_IMPL struct spa_sourcepw_loop_add_event (struct pw_loop *object, spa_source_event_func_t func, void *data)
 
PW_API_LOOP_IMPL int pw_loop_signal_event (struct pw_loop *object, struct spa_source *source)
 
PW_API_LOOP_IMPL struct spa_sourcepw_loop_add_timer (struct pw_loop *object, spa_source_timer_func_t func, void *data)
 
PW_API_LOOP_IMPL int pw_loop_update_timer (struct pw_loop *object, struct spa_source *source, struct timespec *value, struct timespec *interval, bool absolute)
 
PW_API_LOOP_IMPL struct spa_sourcepw_loop_add_signal (struct pw_loop *object, int signal_number, spa_source_signal_func_t func, void *data)
 
PW_API_LOOP_IMPL void pw_loop_destroy_source (struct pw_loop *object, struct spa_source *source)
 

Detailed Description

PipeWire loop object provides an implementation of the spa loop interfaces.

It can be used to implement various event loops.

The members of Loop are read-only.

Macro Definition Documentation

◆ PW_API_LOOP_IMPL

#define PW_API_LOOP_IMPL   static inline

Function Documentation

◆ pw_loop_new()

struct pw_loop * pw_loop_new ( const struct spa_dict props)

Create a new loop.

Returns
a newly allocated loop
Examples
gmain.c.

◆ pw_loop_destroy()

void pw_loop_destroy ( struct pw_loop loop)

Destroy a loop.

Parameters
loopa loop to destroy
Examples
gmain.c.

◆ pw_loop_set_name()

int pw_loop_set_name ( struct pw_loop loop,
const char *  name 
)

◆ pw_loop_add_source()

PW_API_LOOP_IMPL int pw_loop_add_source ( struct pw_loop object,
struct spa_source source 
)

◆ pw_loop_update_source()

PW_API_LOOP_IMPL int pw_loop_update_source ( struct pw_loop object,
struct spa_source source 
)

◆ pw_loop_remove_source()

PW_API_LOOP_IMPL int pw_loop_remove_source ( struct pw_loop object,
struct spa_source source 
)

◆ pw_loop_invoke()

PW_API_LOOP_IMPL int pw_loop_invoke ( struct pw_loop object,
spa_invoke_func_t  func,
uint32_t  seq,
const void *  data,
size_t  size,
bool  block,
void *  user_data 
)
Examples
export-sink.c, and local-v4l2.c.

◆ pw_loop_get_fd()

PW_API_LOOP_IMPL int pw_loop_get_fd ( struct pw_loop object)
Examples
gmain.c.

◆ pw_loop_add_hook()

PW_API_LOOP_IMPL void pw_loop_add_hook ( struct pw_loop object,
struct spa_hook hook,
const struct spa_loop_control_hooks hooks,
void *  data 
)

◆ pw_loop_enter()

PW_API_LOOP_IMPL void pw_loop_enter ( struct pw_loop object)

◆ pw_loop_leave()

PW_API_LOOP_IMPL void pw_loop_leave ( struct pw_loop object)

◆ pw_loop_iterate()

PW_API_LOOP_IMPL int pw_loop_iterate ( struct pw_loop object,
int  timeout 
)

◆ pw_loop_add_io()

PW_API_LOOP_IMPL struct spa_source * pw_loop_add_io ( struct pw_loop object,
int  fd,
uint32_t  mask,
bool  close,
spa_source_io_func_t  func,
void *  data 
)

◆ pw_loop_update_io()

PW_API_LOOP_IMPL int pw_loop_update_io ( struct pw_loop object,
struct spa_source source,
uint32_t  mask 
)

◆ pw_loop_add_idle()

PW_API_LOOP_IMPL struct spa_source * pw_loop_add_idle ( struct pw_loop object,
bool  enabled,
spa_source_idle_func_t  func,
void *  data 
)

◆ pw_loop_enable_idle()

PW_API_LOOP_IMPL int pw_loop_enable_idle ( struct pw_loop object,
struct spa_source source,
bool  enabled 
)

◆ pw_loop_add_event()

PW_API_LOOP_IMPL struct spa_source * pw_loop_add_event ( struct pw_loop object,
spa_source_event_func_t  func,
void *  data 
)

◆ pw_loop_signal_event()

PW_API_LOOP_IMPL int pw_loop_signal_event ( struct pw_loop object,
struct spa_source source 
)

◆ pw_loop_add_timer()

◆ pw_loop_update_timer()

PW_API_LOOP_IMPL int pw_loop_update_timer ( struct pw_loop object,
struct spa_source source,
struct timespec *  value,
struct timespec *  interval,
bool  absolute 
)

◆ pw_loop_add_signal()

◆ pw_loop_destroy_source()

PW_API_LOOP_IMPL void pw_loop_destroy_source ( struct pw_loop object,
struct spa_source source 
)
Examples
audio-src-ring.c.