Library Initialization¶
-
wp::
WpInitFlags
¶ Flags for wp_init()
Values:
Initialize PipeWire by calling pw_init()
Initialize support for dynamic spa types. See wp_spa_dynamic_type_init()
Override PipeWire’s logging system with WirePlumber’s one
Set wp_log_writer_default() as GLib’s default log writer function
-
0xf
¶ Initialize all of the above
-
wp::
WpLookupDirs
¶ Flags to specify lookup directories.
Values:
$WIREPLUMBER_CONFIG_DIR
$WIREPLUMBER_DATA_DIR
XDG_CONFIG_HOME/wireplumber
($prefix)/etc/wireplumber
$prefix/share/wireplumber
-
void
wp_init
(WpInitFlags flags)¶ Initializes WirePlumber and PipeWire underneath.
flags can modify which parts are initialized, in cases where you want to handle part of this initialization externally.
- Parameters
flags
: initialization flags
-
const char*
wp_get_library_version
(void)¶ Gets the WirePlumber library version.
- Return
- WirePlumber library version
- Since
- 0.4.12
-
const char*
wp_get_library_api_version
(void)¶ Gets the WirePlumber library API version.
- Return
- WirePlumber library API version
- Since
- 0.4.12
-
const gchar*
wp_get_module_dir
(void)¶ Gets the WirePlumber module directory.
- Return
- WirePlumber’s module directory
-
const gchar*
wp_get_config_dir
(void)¶ Gets the full path to the WirePlumber configuration directory.
- Return
- The WirePlumber configuration directory
-
const gchar*
wp_get_data_dir
(void)¶ Gets full path to the WirePlumber data directory.
- Return
- The WirePlumber data directory
-
gchar*
wp_find_file
(WpLookupDirs dirs, const gchar * filename, const char * subdir)¶ Returns the full path of filename as found in the hierarchy of configuration and data directories.
- Return
- (transfer full): An allocated string with the configuration file path or NULL if the file was not found.
- Since
- 0.4.2
- Parameters
dirs
: the directories to look intofilename
: the name of the file to search forsubdir
: (nullable): the name of the subdirectory to search in, inside the configuration directories
-
WpIterator*
wp_new_files_iterator
(WpLookupDirs dirs, const gchar * subdir, const gchar * suffix)¶ Creates an iterator to iterate over configuration files in the subdir of the configuration directories.
Files are sorted across the hierarchy of configuration and data directories with files in higher-priority directories shadowing files in lower-priority directories. Files are only checked for existence, a caller must be able to handle read errors.
- Note
- the iterator may contain directories too; it is the responsibility of the caller to ignore or recurse into those.
- Return
- (transfer full): a new iterator iterating over strings which are absolute paths to the configuration files found
- Since
- 0.4.2
- Parameters
dirs
: the directories to look intosubdir
: (nullable): the name of the subdirectory to search in, inside the configuration directoriessuffix
: (nullable): The filename suffix, NULL matches all entries