rt-poll: make small poll helper object

Remove the event loop code into a separate object so that we can share
the same loop for multiple nodes.
Some cleanups
This commit is contained in:
Wim Taymans 2016-09-26 17:27:04 +02:00
parent b9409e297b
commit 7b53fa8685
11 changed files with 517 additions and 239 deletions

View file

@ -196,8 +196,6 @@ spa_alsa_sink_node_set_event_callback (SpaNode *node,
this->event_cb = event;
this->user_data = user_data;
update_state (this, SPA_NODE_STATE_CONFIGURE);
return SPA_RESULT_OK;
}
@ -656,6 +654,8 @@ alsa_sink_init (const SpaHandleFactory *factory,
this->status.flags = SPA_PORT_STATUS_FLAG_NEED_INPUT;
update_state (this, SPA_NODE_STATE_CONFIGURE);
return SPA_RESULT_OK;
}

View file

@ -200,8 +200,6 @@ spa_alsa_source_node_set_event_callback (SpaNode *node,
this->event_cb = event;
this->user_data = user_data;
update_state (this, SPA_NODE_STATE_CONFIGURE);
return SPA_RESULT_OK;
}
@ -820,6 +818,9 @@ alsa_source_init (const SpaHandleFactory *factory,
this->props[1].props.unset_mask &= ~1;
}
}
update_state (this, SPA_NODE_STATE_CONFIGURE);
return SPA_RESULT_OK;
}