mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
fix function types
This commit is contained in:
parent
098b80aa0c
commit
74e5f9fbcf
2 changed files with 11 additions and 11 deletions
|
|
@ -906,26 +906,26 @@ int pw_link_activate(struct pw_link *this)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
static void check_states(void *obj, void *user_data, int res, uint32_t id)
|
||||||
static int check_states(struct pw_link *this, void *user_data, int res)
|
|
||||||
{
|
{
|
||||||
|
struct pw_link *this = obj;
|
||||||
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this);
|
struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this);
|
||||||
int in_state, out_state;
|
int in_state, out_state;
|
||||||
struct pw_port *input, *output;
|
struct pw_port *input, *output;
|
||||||
int in_mix_state, out_mix_state;
|
int in_mix_state, out_mix_state;
|
||||||
|
|
||||||
if (this->info.state == PW_LINK_STATE_ERROR)
|
if (this->info.state == PW_LINK_STATE_ERROR)
|
||||||
return -EIO;
|
return;
|
||||||
|
|
||||||
input = this->input;
|
input = this->input;
|
||||||
output = this->output;
|
output = this->output;
|
||||||
|
|
||||||
if (input == NULL || output == NULL)
|
if (input == NULL || output == NULL)
|
||||||
return -EIO;
|
return;
|
||||||
|
|
||||||
if (input->node->info.state == PW_NODE_STATE_ERROR ||
|
if (input->node->info.state == PW_NODE_STATE_ERROR ||
|
||||||
output->node->info.state == PW_NODE_STATE_ERROR)
|
output->node->info.state == PW_NODE_STATE_ERROR)
|
||||||
return -EIO;
|
return;
|
||||||
|
|
||||||
in_state = input->state;
|
in_state = input->state;
|
||||||
out_state = output->state;
|
out_state = output->state;
|
||||||
|
|
@ -934,7 +934,7 @@ static int check_states(struct pw_link *this, void *user_data, int res)
|
||||||
|
|
||||||
if (in_state == PW_PORT_STATE_ERROR || out_state == PW_PORT_STATE_ERROR) {
|
if (in_state == PW_PORT_STATE_ERROR || out_state == PW_PORT_STATE_ERROR) {
|
||||||
pw_link_update_state(this, PW_LINK_STATE_ERROR, NULL);
|
pw_link_update_state(this, PW_LINK_STATE_ERROR, NULL);
|
||||||
return -EIO;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PW_PORT_IS_CONTROL(output) && PW_PORT_IS_CONTROL(input)) {
|
if (PW_PORT_IS_CONTROL(output) && PW_PORT_IS_CONTROL(input)) {
|
||||||
|
|
@ -947,7 +947,7 @@ static int check_states(struct pw_link *this, void *user_data, int res)
|
||||||
|
|
||||||
if (in_mix_state == PW_PORT_STATE_PAUSED && out_mix_state == PW_PORT_STATE_PAUSED) {
|
if (in_mix_state == PW_PORT_STATE_PAUSED && out_mix_state == PW_PORT_STATE_PAUSED) {
|
||||||
pw_link_update_state(this, PW_LINK_STATE_PAUSED, NULL);
|
pw_link_update_state(this, PW_LINK_STATE_PAUSED, NULL);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((res = do_negotiate(this, in_state, out_state)) != 0)
|
if ((res = do_negotiate(this, in_state, out_state)) != 0)
|
||||||
|
|
@ -959,12 +959,11 @@ static int check_states(struct pw_link *this, void *user_data, int res)
|
||||||
exit:
|
exit:
|
||||||
if (SPA_RESULT_IS_ERROR(res)) {
|
if (SPA_RESULT_IS_ERROR(res)) {
|
||||||
pw_log_debug("link %p: got error result %d", this, res);
|
pw_log_debug("link %p: got error result %d", this, res);
|
||||||
return res;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_work_queue_add(impl->work,
|
pw_work_queue_add(impl->work,
|
||||||
this, -EBUSY, (pw_work_func_t) check_states, this);
|
this, -EBUSY, (pw_work_func_t) check_states, this);
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -1110,8 +1110,9 @@ uint32_t pw_node_get_free_port_id(struct pw_node *node, enum pw_direction direct
|
||||||
return SPA_ID_INVALID;
|
return SPA_ID_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_state_complete(struct pw_node *node, void *data, int res)
|
static void on_state_complete(void *obj, void *data, int res, uint32_t seq)
|
||||||
{
|
{
|
||||||
|
struct pw_node *node = obj;
|
||||||
enum pw_node_state state = SPA_PTR_TO_INT(data);
|
enum pw_node_state state = SPA_PTR_TO_INT(data);
|
||||||
char *error = NULL;
|
char *error = NULL;
|
||||||
|
|
||||||
|
|
@ -1192,7 +1193,7 @@ int pw_node_set_state(struct pw_node *node, enum pw_node_state state)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
pw_work_queue_add(impl->work,
|
pw_work_queue_add(impl->work,
|
||||||
node, res, (pw_work_func_t) on_state_complete, SPA_INT_TO_PTR(state));
|
node, res, on_state_complete, SPA_INT_TO_PTR(state));
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue