media-session: always activate DSP nodes

They don't need to be activated with a profile.
This commit is contained in:
Wim Taymans 2020-06-03 12:03:20 +02:00
parent 94cbb54517
commit e4e03fa7dd

View file

@ -169,7 +169,7 @@ 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; const char *str, *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;
@ -177,9 +177,10 @@ handle_node(struct impl *impl, struct sm_object *object)
if (object->props) { if (object->props) {
if ((str = pw_properties_get(object->props, PW_KEY_CLIENT_ID)) != NULL) if ((str = pw_properties_get(object->props, PW_KEY_CLIENT_ID)) != NULL)
client_id = atoi(str); client_id = atoi(str);
}
media_class = object->props ? pw_properties_get(object->props, PW_KEY_MEDIA_CLASS) : NULL; media_class = pw_properties_get(object->props, PW_KEY_MEDIA_CLASS);
role = pw_properties_get(object->props, PW_KEY_MEDIA_ROLE);
}
pw_log_debug(NAME" %p: node "PW_KEY_MEDIA_CLASS" %s", impl, media_class); pw_log_debug(NAME" %p: node "PW_KEY_MEDIA_CLASS" %s", impl, media_class);
@ -194,6 +195,9 @@ handle_node(struct impl *impl, struct sm_object *object)
node->type = NODE_TYPE_UNKNOWN; node->type = NODE_TYPE_UNKNOWN;
spa_list_append(&impl->node_list, &node->link); spa_list_append(&impl->node_list, &node->link);
if (role && !strcmp(role, "DSP"))
node->active = true;
if (strstr(media_class, "Stream/") == media_class) { if (strstr(media_class, "Stream/") == media_class) {
media_class += strlen("Stream/"); media_class += strlen("Stream/");