media-session: subscribe to params when needed

Subscribe to params and collect them.
This commit is contained in:
Wim Taymans 2019-11-19 16:08:40 +01:00
parent 541f3a4cc6
commit b7aa8f5c85
4 changed files with 101 additions and 2 deletions

View file

@ -323,10 +323,10 @@ static void node_event_param(void *object, int seq,
struct impl *impl = n->impl;
struct spa_audio_info_raw info = { 0, };
pw_log_debug(NAME" %p: param for node %d, %d", impl, n->id, id);
pw_log_debug(NAME" %p: param for node %d %d", impl, n->id, id);
if (id != SPA_PARAM_EnumFormat)
goto error;
return;
if (spa_format_parse(param, &n->media_type, &n->media_subtype) < 0)
goto error;