spa: add result type

We need this to know the type of result, especially when serializing.
This commit is contained in:
Wim Taymans 2019-05-28 13:59:48 +02:00
parent c767ce62c9
commit 857b2a0cfb
33 changed files with 110 additions and 73 deletions

View file

@ -445,7 +445,7 @@ static int impl_node_enum_params(void *object, int seq,
if (spa_pod_filter(&b, &result.param, param, filter) < 0)
goto next;
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;
@ -563,11 +563,11 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
return 0;
}
static void on_node_result(void *data, int seq, int res, const void *result)
static void on_node_result(void *data, int seq, int res, uint32_t type, const void *result)
{
struct impl *this = data;
spa_log_debug(this->log, "%p: result %d %d", this, seq, res);
spa_node_emit_result(&this->hooks, seq, res, result);
spa_node_emit_result(&this->hooks, seq, res, type, result);
}
static void fmt_input_port_info(void *data,
@ -742,7 +742,7 @@ impl_node_port_enum_params(void *object, int seq,
if (spa_pod_filter(&b, &result.param, param, filter) < 0)
goto next;
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;

View file

@ -294,7 +294,7 @@ static int impl_node_enum_params(void *object, int seq,
if (spa_pod_filter(&b, &result.param, param, filter) < 0)
goto next;
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;
@ -588,7 +588,7 @@ impl_node_port_enum_params(void *object, int seq,
if (spa_pod_filter(&b, &result.param, param, filter) < 0)
goto next;
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;

View file

@ -510,7 +510,7 @@ impl_node_port_enum_params(void *object, int seq,
if (spa_pod_filter(&b, &result.param, param, filter) < 0)
goto next;
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;

View file

@ -224,7 +224,7 @@ static int impl_node_enum_params(void *object, int seq,
if (spa_pod_filter(&b, &result.param, param, filter) < 0)
goto next;
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;
@ -513,7 +513,7 @@ impl_node_port_enum_params(void *object, int seq,
goto next;
}
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;

View file

@ -466,7 +466,7 @@ impl_node_port_enum_params(void *object, int seq,
if (spa_pod_filter(&b, &result.param, param, filter) < 0)
goto next;
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;

View file

@ -218,7 +218,7 @@ static int impl_node_enum_params(void *object, int seq,
if (spa_pod_filter(&b, &result.param, param, filter) < 0)
goto next;
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;
@ -501,7 +501,7 @@ impl_node_port_enum_params(void *object, int seq,
if (spa_pod_filter(&b, &result.param, param, filter) < 0)
goto next;
spa_node_emit_result(&this->hooks, seq, 0, &result);
spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
if (++count != num)
goto next;