mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
daemon: add support for properties in the config file
Make a set-prop command to set a property from the config file into a pw_properties. Pass this to the pw_core_new() and the main-loop to tweak some stuff. Move some warns to errors
This commit is contained in:
parent
85caf0b485
commit
03eeb945f3
11 changed files with 122 additions and 65 deletions
|
|
@ -30,17 +30,26 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <pipewire/core.h>
|
||||
|
||||
struct pw_command;
|
||||
|
||||
typedef int (*pw_command_func_t) (struct pw_command *command, struct pw_core *core, char **err);
|
||||
|
||||
/** \class pw_command
|
||||
*
|
||||
* A configuration command
|
||||
*/
|
||||
struct pw_command;
|
||||
|
||||
#include <pipewire/core.h>
|
||||
|
||||
struct pw_command {
|
||||
struct spa_list link; /**< link in list of commands */
|
||||
pw_command_func_t func;
|
||||
char **args;
|
||||
uint32_t id; /**< id of command */
|
||||
int n_args;
|
||||
};
|
||||
|
||||
struct pw_command *
|
||||
pw_command_parse(const char *line, char **err);
|
||||
pw_command_parse(struct pw_properties *properties, const char *line, char **err);
|
||||
|
||||
void
|
||||
pw_command_free(struct pw_command *command);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue