mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	media-session: switch to new property helpers
This commit is contained in:
		
							parent
							
								
									fb884b9441
								
							
						
					
					
						commit
						12c5a9b7ea
					
				
					 5 changed files with 42 additions and 56 deletions
				
			
		| 
						 | 
					@ -1029,7 +1029,7 @@ static struct device *alsa_create_device(struct impl *impl, uint32_t id,
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct device *device;
 | 
						struct device *device;
 | 
				
			||||||
	int res;
 | 
						int res;
 | 
				
			||||||
	const char *str, *card, *rules;
 | 
						const char *card, *rules;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_log_debug("new device %u", id);
 | 
						pw_log_debug("new device %u", id);
 | 
				
			||||||
	if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
 | 
						if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
 | 
				
			||||||
| 
						 | 
					@ -1059,8 +1059,7 @@ static struct device *alsa_create_device(struct impl *impl, uint32_t id,
 | 
				
			||||||
	if ((rules = pw_properties_get(impl->conf, "rules")) != NULL)
 | 
						if ((rules = pw_properties_get(impl->conf, "rules")) != NULL)
 | 
				
			||||||
		sm_media_session_match_rules(rules, strlen(rules), device->props);
 | 
							sm_media_session_match_rules(rules, strlen(rules), device->props);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	str = pw_properties_get(device->props, "api.alsa.use-acp");
 | 
						device->use_acp = pw_properties_get_bool(device->props, "api.alsa.use-acp", true);
 | 
				
			||||||
	device->use_acp = str ? pw_properties_parse_bool(str) : true;
 | 
					 | 
				
			||||||
	if (device->use_acp)
 | 
						if (device->use_acp)
 | 
				
			||||||
		device->factory_name = strdup(SPA_NAME_API_ALSA_ACP_DEVICE);
 | 
							device->factory_name = strdup(SPA_NAME_API_ALSA_ACP_DEVICE);
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
| 
						 | 
					@ -1203,9 +1202,7 @@ int sm_alsa_monitor_start(struct sm_media_session *session)
 | 
				
			||||||
	if ((str = pw_properties_get(impl->conf, "properties")) != NULL)
 | 
						if ((str = pw_properties_get(impl->conf, "properties")) != NULL)
 | 
				
			||||||
		pw_properties_update_string(impl->props, str, strlen(str));
 | 
							pw_properties_update_string(impl->props, str, strlen(str));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((str = pw_properties_get(impl->props, "alsa.reserve")) == NULL ||
 | 
						impl->reserve = pw_properties_get_bool(impl->props, "alsa.reserve", true);
 | 
				
			||||||
	    pw_properties_parse_bool(str))
 | 
					 | 
				
			||||||
		impl->reserve = true;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	impl->handle = pw_context_load_spa_handle(context, SPA_NAME_API_ALSA_ENUM_UDEV, NULL);
 | 
						impl->handle = pw_context_load_spa_handle(context, SPA_NAME_API_ALSA_ENUM_UDEV, NULL);
 | 
				
			||||||
	if (impl->handle == NULL) {
 | 
						if (impl->handle == NULL) {
 | 
				
			||||||
| 
						 | 
					@ -1222,8 +1219,7 @@ int sm_alsa_monitor_start(struct sm_media_session *session)
 | 
				
			||||||
	spa_list_init(&impl->device_list);
 | 
						spa_list_init(&impl->device_list);
 | 
				
			||||||
	spa_device_add_listener(impl->monitor, &impl->listener, &alsa_udev_events, impl);
 | 
						spa_device_add_listener(impl->monitor, &impl->listener, &alsa_udev_events, impl);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((str = pw_properties_get(impl->props, "alsa.jack-device")) != NULL &&
 | 
						if (pw_properties_get_bool(impl->props, "alsa.jack-device", true)) {
 | 
				
			||||||
	    pw_properties_parse_bool(str)) {
 | 
					 | 
				
			||||||
		if ((res = alsa_start_jack_device(impl)) < 0)
 | 
							if ((res = alsa_start_jack_device(impl)) < 0)
 | 
				
			||||||
			goto out_free;
 | 
								goto out_free;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -134,18 +134,16 @@ static struct sm_object *find_by_id(struct impl *impl, const char *type, uint32_
 | 
				
			||||||
static struct sm_device *find_default_output_device(struct impl *impl)
 | 
					static struct sm_device *find_default_output_device(struct impl *impl)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct sm_object *obj;
 | 
						struct sm_object *obj;
 | 
				
			||||||
	const char *str;
 | 
					 | 
				
			||||||
	uint32_t device_id;
 | 
						uint32_t device_id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((obj = find_by_name(impl, PW_TYPE_INTERFACE_Node, impl->default_sink)) == NULL ||
 | 
						if ((obj = find_by_name(impl, PW_TYPE_INTERFACE_Node, impl->default_sink)) == NULL ||
 | 
				
			||||||
			!obj->props)
 | 
								!obj->props)
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((str = pw_properties_get(obj->props, PW_KEY_DEVICE_ID)) == NULL)
 | 
						if (pw_properties_fetch_uint32(obj->props, PW_KEY_DEVICE_ID, &device_id) < 0)
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!spa_atou32(str, &device_id, 10) ||
 | 
						if ((obj = find_by_id(impl, PW_TYPE_INTERFACE_Device, device_id)) == NULL)
 | 
				
			||||||
			(obj = find_by_id(impl, PW_TYPE_INTERFACE_Device, device_id)) == NULL)
 | 
					 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!spa_streq(obj->type, PW_TYPE_INTERFACE_Device) || !obj->props)
 | 
						if (!spa_streq(obj->type, PW_TYPE_INTERFACE_Device) || !obj->props)
 | 
				
			||||||
| 
						 | 
					@ -231,7 +229,7 @@ bool get_pending_save(struct impl *impl, const char *dev_name)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	char saved_profile_key[512];
 | 
						char saved_profile_key[512];
 | 
				
			||||||
	spa_scnprintf(saved_profile_key, sizeof(saved_profile_key), "%s:pending-save", dev_name);
 | 
						spa_scnprintf(saved_profile_key, sizeof(saved_profile_key), "%s:pending-save", dev_name);
 | 
				
			||||||
	return spa_atob(pw_properties_get(impl->properties, saved_profile_key));
 | 
						return pw_properties_get_bool(impl->properties, saved_profile_key, false);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void set_pending_save(struct impl *impl, const char *dev_name, bool pending)
 | 
					void set_pending_save(struct impl *impl, const char *dev_name, bool pending)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -667,16 +667,17 @@ static int node_init(void *object)
 | 
				
			||||||
	struct sm_node *node = object;
 | 
						struct sm_node *node = object;
 | 
				
			||||||
	struct impl *impl = SPA_CONTAINER_OF(node->obj.session, struct impl, this);
 | 
						struct impl *impl = SPA_CONTAINER_OF(node->obj.session, struct impl, this);
 | 
				
			||||||
	struct pw_properties *props = node->obj.props;
 | 
						struct pw_properties *props = node->obj.props;
 | 
				
			||||||
	const char *str;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spa_list_init(&node->port_list);
 | 
						spa_list_init(&node->port_list);
 | 
				
			||||||
	spa_list_init(&node->param_list);
 | 
						spa_list_init(&node->param_list);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (props) {
 | 
						if (props) {
 | 
				
			||||||
		if ((str = pw_properties_get(props, PW_KEY_DEVICE_ID)) != NULL)
 | 
							uint32_t id = SPA_ID_INVALID;
 | 
				
			||||||
			node->device = find_object(impl, atoi(str), NULL);
 | 
					
 | 
				
			||||||
		pw_log_debug("%p: node %d parent device %s (%p)", impl,
 | 
							if (pw_properties_fetch_uint32(props, PW_KEY_DEVICE_ID, &id) == 0)
 | 
				
			||||||
				node->obj.id, str, node->device);
 | 
								node->device = find_object(impl, id, NULL);
 | 
				
			||||||
 | 
							pw_log_debug("%p: node %d parent device %d (%p)", impl,
 | 
				
			||||||
 | 
									node->obj.id, id, node->device);
 | 
				
			||||||
		if (node->device) {
 | 
							if (node->device) {
 | 
				
			||||||
			spa_list_append(&node->device->node_list, &node->link);
 | 
								spa_list_append(&node->device->node_list, &node->link);
 | 
				
			||||||
			node->device->obj.avail |= SM_DEVICE_CHANGE_MASK_NODES;
 | 
								node->device->obj.avail |= SM_DEVICE_CHANGE_MASK_NODES;
 | 
				
			||||||
| 
						 | 
					@ -758,6 +759,8 @@ static int port_init(void *object)
 | 
				
			||||||
	const char *str;
 | 
						const char *str;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (props) {
 | 
						if (props) {
 | 
				
			||||||
 | 
							uint32_t id = SPA_ID_INVALID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ((str = pw_properties_get(props, PW_KEY_PORT_DIRECTION)) != NULL)
 | 
							if ((str = pw_properties_get(props, PW_KEY_PORT_DIRECTION)) != NULL)
 | 
				
			||||||
			port->direction = spa_streq(str, "out") ?
 | 
								port->direction = spa_streq(str, "out") ?
 | 
				
			||||||
				PW_DIRECTION_OUTPUT : PW_DIRECTION_INPUT;
 | 
									PW_DIRECTION_OUTPUT : PW_DIRECTION_INPUT;
 | 
				
			||||||
| 
						 | 
					@ -769,8 +772,8 @@ static int port_init(void *object)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if ((str = pw_properties_get(props, PW_KEY_AUDIO_CHANNEL)) != NULL)
 | 
							if ((str = pw_properties_get(props, PW_KEY_AUDIO_CHANNEL)) != NULL)
 | 
				
			||||||
			port->channel = find_channel(str);
 | 
								port->channel = find_channel(str);
 | 
				
			||||||
		if ((str = pw_properties_get(props, PW_KEY_NODE_ID)) != NULL)
 | 
							if (pw_properties_fetch_uint32(props, PW_KEY_NODE_ID, &id) == 0)
 | 
				
			||||||
			port->node = find_object(impl, atoi(str), PW_TYPE_INTERFACE_Node);
 | 
								port->node = find_object(impl, id, PW_TYPE_INTERFACE_Node);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		pw_log_debug("%p: port %d parent node %s (%p) direction:%d type:%d", impl,
 | 
							pw_log_debug("%p: port %d parent node %s (%p) direction:%d type:%d", impl,
 | 
				
			||||||
				port->obj.id, str, port->node, port->direction, port->type);
 | 
									port->obj.id, str, port->node, port->direction, port->type);
 | 
				
			||||||
| 
						 | 
					@ -921,13 +924,14 @@ static int endpoint_init(void *object)
 | 
				
			||||||
	struct sm_endpoint *endpoint = object;
 | 
						struct sm_endpoint *endpoint = object;
 | 
				
			||||||
	struct impl *impl = SPA_CONTAINER_OF(endpoint->obj.session, struct impl, this);
 | 
						struct impl *impl = SPA_CONTAINER_OF(endpoint->obj.session, struct impl, this);
 | 
				
			||||||
	struct pw_properties *props = endpoint->obj.props;
 | 
						struct pw_properties *props = endpoint->obj.props;
 | 
				
			||||||
	const char *str;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (props) {
 | 
						if (props) {
 | 
				
			||||||
		if ((str = pw_properties_get(props, PW_KEY_SESSION_ID)) != NULL)
 | 
							uint32_t id = SPA_ID_INVALID;
 | 
				
			||||||
			endpoint->session = find_object(impl, atoi(str), PW_TYPE_INTERFACE_Session);
 | 
					
 | 
				
			||||||
		pw_log_debug("%p: endpoint %d parent session %s", impl,
 | 
							if (pw_properties_fetch_uint32(props, PW_KEY_SESSION_ID, &id) == 0)
 | 
				
			||||||
				endpoint->obj.id, str);
 | 
								endpoint->session = find_object(impl, id, PW_TYPE_INTERFACE_Session);
 | 
				
			||||||
 | 
							pw_log_debug("%p: endpoint %d parent session %d", impl,
 | 
				
			||||||
 | 
									endpoint->obj.id, id);
 | 
				
			||||||
		if (endpoint->session) {
 | 
							if (endpoint->session) {
 | 
				
			||||||
			spa_list_append(&endpoint->session->endpoint_list, &endpoint->link);
 | 
								spa_list_append(&endpoint->session->endpoint_list, &endpoint->link);
 | 
				
			||||||
			endpoint->session->obj.avail |= SM_SESSION_CHANGE_MASK_ENDPOINTS;
 | 
								endpoint->session->obj.avail |= SM_SESSION_CHANGE_MASK_ENDPOINTS;
 | 
				
			||||||
| 
						 | 
					@ -1006,13 +1010,14 @@ static int endpoint_stream_init(void *object)
 | 
				
			||||||
	struct sm_endpoint_stream *stream = object;
 | 
						struct sm_endpoint_stream *stream = object;
 | 
				
			||||||
	struct impl *impl = SPA_CONTAINER_OF(stream->obj.session, struct impl, this);
 | 
						struct impl *impl = SPA_CONTAINER_OF(stream->obj.session, struct impl, this);
 | 
				
			||||||
	struct pw_properties *props = stream->obj.props;
 | 
						struct pw_properties *props = stream->obj.props;
 | 
				
			||||||
	const char *str;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (props) {
 | 
						if (props) {
 | 
				
			||||||
		if ((str = pw_properties_get(props, PW_KEY_ENDPOINT_ID)) != NULL)
 | 
							uint32_t id = SPA_ID_INVALID;
 | 
				
			||||||
			stream->endpoint = find_object(impl, atoi(str), PW_TYPE_INTERFACE_Endpoint);
 | 
					
 | 
				
			||||||
		pw_log_debug("%p: stream %d parent endpoint %s", impl,
 | 
							if (pw_properties_fetch_uint32(props, PW_KEY_ENDPOINT_ID, &id) == 0)
 | 
				
			||||||
				stream->obj.id, str);
 | 
								stream->endpoint = find_object(impl, id, PW_TYPE_INTERFACE_Endpoint);
 | 
				
			||||||
 | 
							pw_log_debug("%p: stream %d parent endpoint %d", impl,
 | 
				
			||||||
 | 
									stream->obj.id, id);
 | 
				
			||||||
		if (stream->endpoint) {
 | 
							if (stream->endpoint) {
 | 
				
			||||||
			spa_list_append(&stream->endpoint->stream_list, &stream->link);
 | 
								spa_list_append(&stream->endpoint->stream_list, &stream->link);
 | 
				
			||||||
			stream->endpoint->obj.avail |= SM_ENDPOINT_CHANGE_MASK_STREAMS;
 | 
								stream->endpoint->obj.avail |= SM_ENDPOINT_CHANGE_MASK_STREAMS;
 | 
				
			||||||
| 
						 | 
					@ -2430,8 +2435,7 @@ static const struct {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static bool is_module_enabled(struct impl *impl, const char *val)
 | 
					static bool is_module_enabled(struct impl *impl, const char *val)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	const char *str = pw_properties_get(impl->modules, val);
 | 
						return pw_properties_get_bool(impl->modules, val, false);
 | 
				
			||||||
	return str ? pw_properties_parse_bool(str) : false;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void show_help(const char *name, struct impl *impl, const char *config_name)
 | 
					static void show_help(const char *name, struct impl *impl, const char *config_name)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -110,14 +110,13 @@ struct stream {
 | 
				
			||||||
static int
 | 
					static int
 | 
				
			||||||
handle_endpoint(struct impl *impl, struct sm_object *object)
 | 
					handle_endpoint(struct impl *impl, struct sm_object *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	const char *str, *media_class;
 | 
						const char *media_class;
 | 
				
			||||||
	enum pw_direction direction;
 | 
						enum pw_direction direction;
 | 
				
			||||||
	struct endpoint *ep;
 | 
						struct endpoint *ep;
 | 
				
			||||||
	uint32_t client_id = SPA_ID_INVALID;
 | 
						uint32_t client_id = SPA_ID_INVALID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (object->props) {
 | 
						if (object->props) {
 | 
				
			||||||
		if ((str = pw_properties_get(object->props, PW_KEY_CLIENT_ID)) != NULL)
 | 
							pw_properties_fetch_uint32(object->props, PW_KEY_CLIENT_ID, &client_id);
 | 
				
			||||||
			client_id = atoi(str);
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	media_class = object->props ? pw_properties_get(object->props, PW_KEY_MEDIA_CLASS) : NULL;
 | 
						media_class = object->props ? pw_properties_get(object->props, PW_KEY_MEDIA_CLASS) : NULL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -407,14 +407,13 @@ static const struct sm_object_events object_events = {
 | 
				
			||||||
static int
 | 
					static int
 | 
				
			||||||
handle_node(struct impl *impl, struct sm_object *object)
 | 
					handle_node(struct impl *impl, struct sm_object *object)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	const char *str, *media_class = NULL, *role;
 | 
						const char *media_class = NULL, *role;
 | 
				
			||||||
	enum pw_direction direction;
 | 
						enum pw_direction direction;
 | 
				
			||||||
	struct node *node;
 | 
						struct node *node;
 | 
				
			||||||
	uint32_t client_id = SPA_ID_INVALID;
 | 
						uint32_t client_id = SPA_ID_INVALID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (object->props) {
 | 
						if (object->props) {
 | 
				
			||||||
		if ((str = pw_properties_get(object->props, PW_KEY_CLIENT_ID)) != NULL)
 | 
							pw_properties_fetch_uint32(object->props, PW_KEY_CLIENT_ID, &client_id);
 | 
				
			||||||
			client_id = atoi(str);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		media_class = pw_properties_get(object->props, PW_KEY_MEDIA_CLASS);
 | 
							media_class = pw_properties_get(object->props, PW_KEY_MEDIA_CLASS);
 | 
				
			||||||
		role = pw_properties_get(object->props, PW_KEY_MEDIA_ROLE);
 | 
							role = pw_properties_get(object->props, PW_KEY_MEDIA_ROLE);
 | 
				
			||||||
| 
						 | 
					@ -453,10 +452,8 @@ handle_node(struct impl *impl, struct sm_object *object)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (spa_strstartswith(media_class, "Video")) {
 | 
							if (spa_strstartswith(media_class, "Video")) {
 | 
				
			||||||
			if (direction == PW_DIRECTION_OUTPUT) {
 | 
								if (direction == PW_DIRECTION_OUTPUT) {
 | 
				
			||||||
				if ((str = pw_properties_get(object->props, PW_KEY_NODE_PLUGGED)) != NULL)
 | 
									node->plugged = pw_properties_get_uint64(object->props, PW_KEY_NODE_PLUGGED,
 | 
				
			||||||
					node->plugged = pw_properties_parse_uint64(str);
 | 
														 SPA_TIMESPEC_TO_NSEC(&impl->now));
 | 
				
			||||||
				else
 | 
					 | 
				
			||||||
					node->plugged = SPA_TIMESPEC_TO_NSEC(&impl->now);
 | 
					 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			node->active = node->configured = true;
 | 
								node->active = node->configured = true;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					@ -496,15 +493,9 @@ handle_node(struct impl *impl, struct sm_object *object)
 | 
				
			||||||
		} else
 | 
							} else
 | 
				
			||||||
			return 0;
 | 
								return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ((str = pw_properties_get(object->props, PW_KEY_NODE_PLUGGED)) != NULL)
 | 
							node->plugged = pw_properties_get_uint64(object->props, PW_KEY_NODE_PLUGGED,
 | 
				
			||||||
			node->plugged = pw_properties_parse_uint64(str);
 | 
												 SPA_TIMESPEC_TO_NSEC(&impl->now));
 | 
				
			||||||
		else
 | 
							node->priority = pw_properties_get_uint32(object->props, PW_KEY_PRIORITY_SESSION, 0);
 | 
				
			||||||
			node->plugged = SPA_TIMESPEC_TO_NSEC(&impl->now);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		if ((str = pw_properties_get(object->props, PW_KEY_PRIORITY_SESSION)) != NULL)
 | 
					 | 
				
			||||||
			node->priority = pw_properties_parse_int(str);
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			node->priority = 0;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		node->direction = direction;
 | 
							node->direction = direction;
 | 
				
			||||||
		node->virtual = virtual;
 | 
							node->virtual = virtual;
 | 
				
			||||||
| 
						 | 
					@ -1410,7 +1401,6 @@ static const struct pw_metadata_events metadata_events = {
 | 
				
			||||||
int sm_policy_node_start(struct sm_media_session *session)
 | 
					int sm_policy_node_start(struct sm_media_session *session)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct impl *impl;
 | 
						struct impl *impl;
 | 
				
			||||||
	const char *flag;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	PW_LOG_TOPIC_INIT(mod_topic);
 | 
						PW_LOG_TOPIC_INIT(mod_topic);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1434,10 +1424,9 @@ int sm_policy_node_start(struct sm_media_session *session)
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
	impl->defaults[3] = (struct default_node){ NULL, NULL, NULL, NULL };
 | 
						impl->defaults[3] = (struct default_node){ NULL, NULL, NULL, NULL };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flag = pw_properties_get(session->props, NAME ".streams-follow-default");
 | 
					
 | 
				
			||||||
	impl->streams_follow_default = (flag != NULL && pw_properties_parse_bool(flag));
 | 
						impl->streams_follow_default = pw_properties_get_bool(session->props, NAME ".streams-follow-default", false);
 | 
				
			||||||
	flag = pw_properties_get(session->props, NAME ".alsa-no-dsp");
 | 
						impl->alsa_no_dsp = pw_properties_get_bool(session->props, NAME ".alsa-no-dsp", false);
 | 
				
			||||||
	impl->alsa_no_dsp = (flag != NULL && pw_properties_parse_bool(flag));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spa_list_init(&impl->node_list);
 | 
						spa_list_init(&impl->node_list);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue