pw_data_loop Class Reference

PipeWire rt-loop object. More...

## Public Member Functions

SPA_EXPORT struct pw_data_loop * | pw_data_loop_new (struct pw_properties *properties)
| Create a new pw_data_loop. More...
SPA_EXPORT void | pw_data_loop_destroy (struct pw_data_loop *loop)
| Destroy a data loop. More...
SPA_EXPORT int | pw_data_loop_start (struct pw_data_loop *loop)
| Start a data loop. More...
SPA_EXPORT int | pw_data_loop_stop (struct pw_data_loop *loop)
| Stop a data loop. More...
SPA_EXPORT bool | pw_data_loop_in_thread (struct pw_data_loop *loop)
| Check if we are inside the data loop. More...

## Detailed Description

PipeWire rt-loop object.

This loop starts a new real-time thread that is designed to run the processing graph.

## Member Function Documentation

## pw_data_loop_destroy()

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

Destroy a data loop.

Parameters

  loop | the data loop to destroy

References pw_data_loop_stop(), pw_log::pw_log_debug(), pw_loop::pw_loop_destroy(), and pw_loop_destroy_source.

## pw_data_loop_in_thread()

SPA_EXPORT bool pw_data_loop_in_thread | ( | struct pw_data_loop * | loop | ) |

Check if we are inside the data loop.

Parameters

  loop | the data loop to check

Returns
  true is the current thread is the data loop thread

## pw_data_loop_new()

SPA_EXPORT struct pw_data_loop * pw_data_loop_new | ( | struct pw_properties * | properties | ) |

Create a new pw_data_loop.

Returns
  a newly allocated data loop

References pw_log::pw_log_debug(), pw_loop_add_event, and pw_loop::pw_loop_new().

## pw_data_loop_start()

SPA_EXPORT int pw_data_loop_start | ( | struct pw_data_loop * | loop | ) |

Start a data loop.

Parameters

  loop | the data loop to start

Returns
  0 if ok, -1 on error

This will start the realtime thread that manages the loop.

## pw_data_loop_stop()

SPA_EXPORT int pw_data_loop_stop | ( | struct pw_data_loop * | loop | ) |

Stop a data loop.

Parameters

  loop | the data loop to Stop

Returns
  0

This will stop and join the realtime thread that manages the loop.

References pw_loop_signal_event.

Referenced by pw_data_loop_destroy().

The documentation for this class was generated from the following files:

- data-loop.h
- data-loop.c