PipeWire: data-loop.c File Reference

PipeWire 0.3.6

Macros | Functions
data-loop.c File Reference
Include dependency graph for data-loop.c:

## Macros
#define | NAME "data-loop"

## Functions
SPA_EXPORT int | pw_data_loop_wait (struct pw_data_loop *this, int timeout)
| wait for activity on the loop up to timeout milliseconds. More...
SPA_EXPORT void | pw_data_loop_exit (struct pw_data_loop *this)
| make sure the thread will exit. More...
SPA_EXPORT void | pw_data_loop_add_listener (struct pw_data_loop *loop, struct spa_hook *listener, const struct pw_data_loop_events *events, void *data)
| Add an event listener to loop. More...
struct pw_loop * | pw_data_loop_get_loop (struct pw_data_loop *loop)
| Get the loop implementation of this data loop. More...
SPA_EXPORT int | pw_data_loop_invoke (struct pw_data_loop *loop, spa_invoke_func_t func, uint32_t seq, const void *data, size_t size, bool block, void *user_data)
| invoke func in the context of the thread or in the caller thread when the loop is not running. More...

## Macro Definition Documentation

## ◆ NAME

#define NAME "data-loop"

## Function Documentation

## ◆ pw_data_loop_add_listener()

SPA_EXPORT void pw_data_loop_add_listener | ( | struct pw_data_loop * | loop,
|  | struct spa_hook * | listener,
|  | const struct pw_data_loop_events * | events,
|  | void * | data
| ) |  |

Add an event listener to loop.

## ◆ pw_data_loop_exit()

SPA_EXPORT void pw_data_loop_exit | ( | struct pw_data_loop * | loop | ) |

make sure the thread will exit.

Can be called from a loop callback

## ◆ pw_data_loop_get_loop()

struct pw_loop* pw_data_loop_get_loop | ( | struct pw_data_loop * | loop | ) |

Get the loop implementation of this data loop.

References pw_loop::loop.

## ◆ pw_data_loop_invoke()

SPA_EXPORT int pw_data_loop_invoke | ( | struct pw_data_loop * | loop,
|  | spa_invoke_func_t | func,
|  | uint32_t | seq,
|  | const void * | data,
|  | size_t | size,
|  | bool | block,
|  | void * | user_data
| ) |  |

invoke func in the context of the thread or in the caller thread when the loop is not running.

Since 0.3.3

References pw_loop::loop, pw_loop_invoke, res, and seq.

## ◆ pw_data_loop_wait()

SPA_EXPORT int pw_data_loop_wait | ( | struct pw_data_loop * | loop,
|  | int | timeout
| ) |  |

wait for activity on the loop up to timeout milliseconds.

Should be called from the loop function

References pw_loop_iterate, and res.