mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-20 05:33:55 -04:00
impl-link: debug all kinds of negotiation errors
This commit is contained in:
parent
12b8e095c7
commit
955e1a6a18
1 changed files with 11 additions and 8 deletions
|
|
@ -197,15 +197,8 @@ static int do_negotiate(struct pw_impl_link *this)
|
||||||
/* find a common format for the ports */
|
/* find a common format for the ports */
|
||||||
if ((res = pw_context_find_format(context,
|
if ((res = pw_context_find_format(context,
|
||||||
output, input, NULL, 0, NULL,
|
output, input, NULL, 0, NULL,
|
||||||
&format, &b, &error)) < 0) {
|
&format, &b, &error)) < 0)
|
||||||
pw_context_debug_port_params(context, input->node->node, input->direction,
|
|
||||||
input->port_id, SPA_PARAM_EnumFormat,
|
|
||||||
"input format", res);
|
|
||||||
pw_context_debug_port_params(context, output->node->node, output->direction,
|
|
||||||
output->port_id, SPA_PARAM_EnumFormat,
|
|
||||||
"output format", res);
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
|
|
||||||
format = spa_pod_copy(format);
|
format = spa_pod_copy(format);
|
||||||
spa_pod_fixate(format);
|
spa_pod_fixate(format);
|
||||||
|
|
@ -292,6 +285,8 @@ static int do_negotiate(struct pw_impl_link *this)
|
||||||
SPA_PARAM_Format, SPA_NODE_PARAM_FLAG_NEAREST,
|
SPA_PARAM_Format, SPA_NODE_PARAM_FLAG_NEAREST,
|
||||||
format)) < 0) {
|
format)) < 0) {
|
||||||
error = spa_aprintf("error set output format: %d (%s)", res, spa_strerror(res));
|
error = spa_aprintf("error set output format: %d (%s)", res, spa_strerror(res));
|
||||||
|
pw_log_error("tried to set output format:");
|
||||||
|
pw_log_pod(SPA_LOG_LEVEL_ERROR, format);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (SPA_RESULT_IS_ASYNC(res)) {
|
if (SPA_RESULT_IS_ASYNC(res)) {
|
||||||
|
|
@ -308,6 +303,8 @@ static int do_negotiate(struct pw_impl_link *this)
|
||||||
SPA_PARAM_Format, SPA_NODE_PARAM_FLAG_NEAREST,
|
SPA_PARAM_Format, SPA_NODE_PARAM_FLAG_NEAREST,
|
||||||
format)) < 0) {
|
format)) < 0) {
|
||||||
error = spa_aprintf("error set input format: %d (%s)", res2, spa_strerror(res2));
|
error = spa_aprintf("error set input format: %d (%s)", res2, spa_strerror(res2));
|
||||||
|
pw_log_error("tried to set input format:");
|
||||||
|
pw_log_pod(SPA_LOG_LEVEL_ERROR, format);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (SPA_RESULT_IS_ASYNC(res2)) {
|
if (SPA_RESULT_IS_ASYNC(res2)) {
|
||||||
|
|
@ -332,6 +329,12 @@ static int do_negotiate(struct pw_impl_link *this)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
pw_context_debug_port_params(context, input->node->node, input->direction,
|
||||||
|
input->port_id, SPA_PARAM_EnumFormat,
|
||||||
|
"input format", res);
|
||||||
|
pw_context_debug_port_params(context, output->node->node, output->direction,
|
||||||
|
output->port_id, SPA_PARAM_EnumFormat,
|
||||||
|
"output format", res);
|
||||||
pw_impl_link_update_state(this, PW_LINK_STATE_ERROR, error);
|
pw_impl_link_update_state(this, PW_LINK_STATE_ERROR, error);
|
||||||
free(format);
|
free(format);
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue