PipeWire 1.2.6

Loading...
Searching...
No Matches
Files | Functions
Initialization
Core API

Initializing PipeWire and loading SPA modules. More...

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

## Functions
void | pw_init (int *argc, char **argv[])
| Initialize PipeWire.
void | pw_deinit (void)
| Deinitialize PipeWire.
bool | pw_debug_is_category_enabled (const char *name)
| Check if a debug category is enabled.
const char * | pw_get_application_name (void)
| Get the application name.
const char * | pw_get_prgname (void)
| Get the program name.
const char * | pw_get_user_name (void)
| Get the user name.
const char * | pw_get_host_name (void)
| Get the host name.
const char * | pw_get_client_name (void)
| Get the client name.
bool | pw_check_option (const char *option, const char *value)
enum pw_direction | pw_direction_reverse (enum pw_direction direction)
| Reverse the direction.
int | pw_set_domain (const char *domain)
const char * | pw_get_domain (void)
uint32_t | pw_get_support (struct spa_support *support, uint32_t max_support)
struct spa_handle * | pw_load_spa_handle (const char *lib, const char *factory_name, const struct spa_dict *info, uint32_t n_support, const struct spa_support support[])
int | pw_unload_spa_handle (struct spa_handle *handle)

## Detailed Description

Initializing PipeWire and loading SPA modules.

## Function Documentation

## ◆ pw_init()

void pw_init | ( | int * | argc,
|  | char ** | argv[] )

Initialize PipeWire.

Parameters

  argc | pointer to argc
  argv | pointer to argv

Initialize the PipeWire system, parse and modify any parameters given by argc and argv and set up debugging.

This function can be called multiple times.

Examples
  audio-capture.c, audio-dsp-filter.c, audio-dsp-src.c, audio-src.c, bluez-session.c, export-sink.c, export-source.c, export-spa-device.c, export-spa.c, internal.c, midi-src.c, tutorial1.c, tutorial2.c, tutorial3.c, tutorial4.c, tutorial5.c, tutorial6.c, video-dsp-play.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_deinit()

void pw_deinit | ( | void |  | ) |

Deinitialize PipeWire.

Deinitialize the PipeWire system and free up all resources allocated by pw_init().

Before 0.3.49 this function can only be called once after which the pipewire library can not be used again. This is usually called by test programs to check for memory leaks.

Since 0.3.49 this function must be paired with an equal amount of pw_init() calls to deinitialize the PipeWire library. The PipeWire library can be used again after being deinitialized with a new pw_init() call.

Examples
  audio-capture.c, audio-dsp-filter.c, audio-dsp-src.c, audio-src.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_debug_is_category_enabled()

bool pw_debug_is_category_enabled | ( | const char * | name | ) |

Check if a debug category is enabled.

Parameters

  name | the name of the category to check

Returns
  true if enabled

Debugging categories can be enabled by using the PIPEWIRE_DEBUG environment variable

## ◆ pw_get_application_name()

const char * pw_get_application_name | ( | void |  | ) |

Get the application name.

## ◆ pw_get_prgname()

const char * pw_get_prgname | ( | void |  | ) |

Get the program name.

## ◆ pw_get_user_name()

const char * pw_get_user_name | ( | void |  | ) |

Get the user name.

## ◆ pw_get_host_name()

const char * pw_get_host_name | ( | void |  | ) |

Get the host name.

## ◆ pw_get_client_name()

const char * pw_get_client_name | ( | void |  | ) |

Get the client name.

Make a new PipeWire client name that can be used to construct a remote.

## ◆ pw_check_option()

bool pw_check_option | ( | const char * | option,
|  | const char * | value )

## ◆ pw_direction_reverse()

enum pw_direction pw_direction_reverse | ( | enum pw_direction | direction | ) |

Reverse the direction.

## ◆ pw_set_domain()

int pw_set_domain | ( | const char * | domain | ) |

## ◆ pw_get_domain()

const char * pw_get_domain | ( | void |  | ) |

## ◆ pw_get_support()

uint32_t pw_get_support | ( | struct spa_support * | support,
|  | uint32_t | max_support )

## ◆ pw_load_spa_handle()

struct spa_handle * pw_load_spa_handle | ( | const char * | lib,
|  | const char * | factory_name,
|  | const struct spa_dict * | info,
|  | uint32_t | n_support,
|  | const struct spa_support | support[] )

## ◆ pw_unload_spa_handle()

int pw_unload_spa_handle | ( | struct spa_handle * | handle | ) |

Examples
  bluez-session.c.