PipeWire  0.3.15
pw_impl_module Class Reference

Public Types

typedef int(* pw_impl_module_init_func_t) (struct pw_impl_module *module, const char *args)
 Module init function signature. More...
 

Public Member Functions

SPA_EXPORT struct pw_impl_modulepw_context_load_module (struct pw_context *context, const char *name, const char *args, struct pw_properties *properties)
 Load a module. More...
 
SPA_EXPORT void pw_impl_module_destroy (struct pw_impl_module *module)
 Destroy a module. More...
 

Detailed Description

A dynamically loadable module

Member Typedef Documentation

◆ pw_impl_module_init_func_t

typedef int(* pw_impl_module_init_func_t(struct pw_impl_module *module, const char *args)

Module init function signature.

Parameters
moduleA pw_impl_module
argsArguments to the module
Returns
0 on success, < 0 otherwise with an errno style error

A module should provide an init function with this signature. This function will be called when a module is loaded.

Member Function Documentation

◆ pw_context_load_module()

SPA_EXPORT struct pw_impl_module * pw_context_load_module ( struct pw_context context,
const char *  name,
const char *  args,
struct pw_properties properties 
)

Load a module.

Parameters
contexta pw_context
namename of the module to load
argsA string with arguments for the module
[out]errorReturn location for an error string, or NULL
Returns
A pw_impl_module if the module could be loaded, or NULL on failure.

References pw_log::pw_log_debug, pw_utils::pw_split_strv(), and res.

◆ pw_impl_module_destroy()

SPA_EXPORT void pw_impl_module_destroy ( struct pw_impl_module module)

Destroy a module.

Parameters
modulethe module to destroy

References NAME, pw_global::pw_global_destroy(), pw_in_valgrind(), pw_log::pw_log_debug, pw_log::pw_log_warn, and pw_properties::pw_properties_free().


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