PipeWire: Loop

PipeWire 1.2.5

Loading...
Searching...
No Matches
Files | Data Structures | Macros | Functions
Loop
Core API

## Files
file | loop.h
| `pipewire/loop.h`

## Data Structures
struct | pw_loop

## Macros
#define | pw_loop_add_source(l, ...)
#define | pw_loop_update_source(l, ...)
#define | pw_loop_remove_source(l, ...)
#define | pw_loop_invoke(l, ...)
#define | pw_loop_get_fd(l)
#define | pw_loop_add_hook(l, ...)
#define | pw_loop_enter(l)
#define | pw_loop_leave(l)
#define | pw_loop_iterate(l, ...)
#define | pw_loop_add_io(l, ...)
#define | pw_loop_update_io(l, ...)
#define | pw_loop_add_idle(l, ...)
#define | pw_loop_enable_idle(l, ...)
#define | pw_loop_add_event(l, ...)
#define | pw_loop_signal_event(l, ...)
#define | pw_loop_add_timer(l, ...)
#define | pw_loop_update_timer(l, ...)
#define | pw_loop_add_signal(l, ...)
#define | pw_loop_destroy_source(l, ...)

## Functions
struct pw_loop * | pw_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)

## 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_loop_add_source

#define pw_loop_add_source | ( |  | l,
|  |  | ... )

Value:
spa_loop_add_source((l)->loop,__VA_ARGS__)
spa_loop_add_source
#define spa_loop_add_source(l,...)
Add a source to the loop.
Definition loop.h:152

## ◆ pw_loop_update_source

#define pw_loop_update_source | ( |  | l,
|  |  | ... )

Value:
spa_loop_update_source((l)->loop,__VA_ARGS__)
spa_loop_update_source
#define spa_loop_update_source(l,...)
Update the source io mask.
Definition loop.h:155

## ◆ pw_loop_remove_source

#define pw_loop_remove_source | ( |  | l,
|  |  | ... )

Value:
spa_loop_remove_source((l)->loop,__VA_ARGS__)
spa_loop_remove_source
#define spa_loop_remove_source(l,...)
Remove a source from the loop.
Definition loop.h:158

## ◆ pw_loop_invoke

#define pw_loop_invoke | ( |  | l,
|  |  | ... )

Value:
spa_loop_invoke((l)->loop,__VA_ARGS__)
spa_loop_invoke
#define spa_loop_invoke(l,...)
Invoke a function in the context of this loop.
Definition loop.h:161

Examples
  export-sink.c.

## ◆ pw_loop_get_fd

#define pw_loop_get_fd | ( |  | l | ) |

Value:
spa_loop_control_get_fd((l)->control)
spa_loop_control_get_fd
#define spa_loop_control_get_fd(l)
Definition loop.h:286

## ◆ pw_loop_add_hook

#define pw_loop_add_hook | ( |  | l,
|  |  | ... )

Value:
spa_loop_control_add_hook((l)->control,__VA_ARGS__)
spa_loop_control_add_hook
#define spa_loop_control_add_hook(l,...)
Add a hook.
Definition loop.h:289

## ◆ pw_loop_enter

#define pw_loop_enter | ( |  | l | ) |

Value:
spa_loop_control_enter((l)->control)
spa_loop_control_enter
#define spa_loop_control_enter(l)
Enter a loop.
Definition loop.h:292

## ◆ pw_loop_leave

#define pw_loop_leave | ( |  | l | ) |

Value:
spa_loop_control_leave((l)->control)
spa_loop_control_leave
#define spa_loop_control_leave(l)
Leave a loop.
Definition loop.h:295

## ◆ pw_loop_iterate

#define pw_loop_iterate | ( |  | l,
|  |  | ... )

Value:
spa_loop_control_iterate_fast((l)->control,__VA_ARGS__)
spa_loop_control_iterate_fast
#define spa_loop_control_iterate_fast(l,...)
Definition loop.h:305

Examples
  internal.c.

## ◆ pw_loop_add_io

#define pw_loop_add_io | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_add_io((l)->utils,__VA_ARGS__)
spa_loop_utils_add_io
#define spa_loop_utils_add_io(l,...)
Definition loop.h:385

## ◆ pw_loop_update_io

#define pw_loop_update_io | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_update_io((l)->utils,__VA_ARGS__)
spa_loop_utils_update_io
#define spa_loop_utils_update_io(l,...)
Definition loop.h:388

## ◆ pw_loop_add_idle

#define pw_loop_add_idle | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_add_idle((l)->utils,__VA_ARGS__)
spa_loop_utils_add_idle
#define spa_loop_utils_add_idle(l,...)
Definition loop.h:391

## ◆ pw_loop_enable_idle

#define pw_loop_enable_idle | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_enable_idle((l)->utils,__VA_ARGS__)
spa_loop_utils_enable_idle
#define spa_loop_utils_enable_idle(l,...)
Definition loop.h:394

## ◆ pw_loop_add_event

#define pw_loop_add_event | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_add_event((l)->utils,__VA_ARGS__)
spa_loop_utils_add_event
#define spa_loop_utils_add_event(l,...)
Definition loop.h:397

Examples
  video-play-fixate.c.

## ◆ pw_loop_signal_event

#define pw_loop_signal_event | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_signal_event((l)->utils,__VA_ARGS__)
spa_loop_utils_signal_event
#define spa_loop_utils_signal_event(l,...)
Definition loop.h:400

Examples
  video-play-fixate.c.

## ◆ pw_loop_add_timer

#define pw_loop_add_timer | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_add_timer((l)->utils,__VA_ARGS__)
spa_loop_utils_add_timer
#define spa_loop_utils_add_timer(l,...)
Definition loop.h:403

Examples
  video-dsp-src.c, video-play-pull.c, video-play-reneg.c, video-src-alloc.c, video-src-fixate.c, video-src-reneg.c, and video-src.c.

## ◆ pw_loop_update_timer

#define pw_loop_update_timer | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_update_timer((l)->utils,__VA_ARGS__)
spa_loop_utils_update_timer
#define spa_loop_utils_update_timer(l,...)
Definition loop.h:406

Examples
  video-dsp-src.c, video-play-pull.c, video-play-reneg.c, video-src-alloc.c, video-src-fixate.c, video-src-reneg.c, and video-src.c.

## ◆ pw_loop_add_signal

#define pw_loop_add_signal | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_add_signal((l)->utils,__VA_ARGS__)
spa_loop_utils_add_signal
#define spa_loop_utils_add_signal(l,...)
Definition loop.h:409

Examples
  audio-capture.c, audio-dsp-filter.c, audio-dsp-src.c, audio-src.c, export-spa-device.c, export-spa.c, internal.c, midi-src.c, video-dsp-src.c, video-play-fixate.c, video-play-pull.c, video-play-reneg.c, video-play.c, video-src-alloc.c, video-src-fixate.c, video-src-reneg.c, and video-src.c.

## ◆ pw_loop_destroy_source

#define pw_loop_destroy_source | ( |  | l,
|  |  | ... )

Value:
spa_loop_utils_destroy_source((l)->utils,__VA_ARGS__)
spa_loop_utils_destroy_source
#define spa_loop_utils_destroy_source(l,...)
destroy a source allocated with this interface.
Definition loop.h:412

## 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

## ◆ pw_loop_destroy()

void pw_loop_destroy | ( | struct pw_loop * | loop | ) |

Destroy a loop.

Parameters

  loop | a loop to destroy

## ◆ pw_loop_set_name()

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