From 2f6c4544fe5dc03bc6b4aff37024a68d417a7078 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 18 Sep 2017 21:47:44 +0200 Subject: [PATCH] Small cleanups and additions --- src/modules/module-protocol-native.c | 2 +- src/pipewire/node.c | 1 - src/pipewire/properties.h | 12 ++++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c index 26af4e6e6..95d9c3fe5 100644 --- a/src/modules/module-protocol-native.c +++ b/src/modules/module-protocol-native.c @@ -729,7 +729,7 @@ impl_add_server(struct pw_protocol *protocol, pw_loop_add_hook(pw_core_get_main_loop(core), &s->hook, &impl_hooks, s); - pw_log_info("protocol-native %p: Added server %p", protocol, this); + pw_log_info("protocol-native %p: Added server %p %s", protocol, this, name); return this; diff --git a/src/pipewire/node.c b/src/pipewire/node.c index 015a3d03d..c369f004b 100644 --- a/src/pipewire/node.c +++ b/src/pipewire/node.c @@ -257,7 +257,6 @@ update_info(struct pw_node *this) this->info.output_formats[this->info.n_output_formats] = spa_format_copy(fmt); } } - this->info.props = this->properties ? &this->properties->dict : NULL; } static void diff --git a/src/pipewire/properties.h b/src/pipewire/properties.h index f48959096..22faad4b0 100644 --- a/src/pipewire/properties.h +++ b/src/pipewire/properties.h @@ -71,6 +71,18 @@ static inline bool pw_properties_parse_bool(const char *value) { return (strcmp(value, "true") == 0 || atoi(value) == 1); } +static inline int pw_properties_parse_int(const char *value) { + return strtol(value, NULL, 0); +} + +static inline int64_t pw_properties_parse_int64(const char *value) { + return strtoll(value, NULL, 0); +} + +static inline uint64_t pw_properties_parse_uint64(const char *value) { + return strtoull(value, NULL, 0); +} + #ifdef __cplusplus } #endif