PipeWire  0.2.0
pw_data_loop Class Reference

PipeWire rt-loop object. More...

Public Member Functions

struct pw_data_looppw_data_loop_new (struct pw_properties *properties)
 Create a new pw_data_loop. More...
 
void pw_data_loop_destroy (struct pw_data_loop *loop)
 Destroy a data loop. More...
 
int pw_data_loop_start (struct pw_data_loop *loop)
 Start a data loop. More...
 
int pw_data_loop_stop (struct pw_data_loop *loop)
 Stop a data loop. More...
 
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()

void pw_data_loop_destroy ( struct pw_data_loop loop)

Destroy a data loop.

Parameters
loopthe data loop to destroy

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

Referenced by pw_core::pw_core_destroy().

◆ pw_data_loop_in_thread()

bool pw_data_loop_in_thread ( struct pw_data_loop loop)

Check if we are inside the data loop.

Parameters
loopthe data loop to check
Returns
true is the current thread is the data loop thread

References pw_loop::loop.

◆ pw_data_loop_new()

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

Referenced by pw_core::pw_core_new().

◆ pw_data_loop_start()

int pw_data_loop_start ( struct pw_data_loop loop)

Start a data loop.

Parameters
loopthe data loop to start
Returns
0 if ok, -1 on error

This will start the realtime thread that manages the loop.

References pw_loop::loop.

Referenced by pw_core::pw_core_new().

◆ pw_data_loop_stop()

int pw_data_loop_stop ( struct pw_data_loop loop)

Stop a data loop.

Parameters
loopthe data loop to Stop
Returns
0

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

References pw_loop::loop, and pw_loop_signal_event.

Referenced by pw_data_loop_destroy().


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