clean up types

This commit is contained in:
Wim Taymans 2017-03-23 21:15:52 +01:00
parent d9a51b5d14
commit acedfe71c0
64 changed files with 756 additions and 752 deletions

View file

@ -147,8 +147,8 @@ do_command (SpaLoop *loop,
SpaResult res;
SpaCommand *cmd = data;
if (SPA_COMMAND_TYPE (cmd) == this->uri.node_commands.Start ||
SPA_COMMAND_TYPE (cmd) == this->uri.node_commands.Pause) {
if (SPA_COMMAND_TYPE (cmd) == this->uri.command_node.Start ||
SPA_COMMAND_TYPE (cmd) == this->uri.command_node.Pause) {
res = spa_node_port_send_command (&this->node,
SPA_DIRECTION_INPUT,
0,
@ -158,7 +158,7 @@ do_command (SpaLoop *loop,
res = SPA_RESULT_NOT_IMPLEMENTED;
if (async) {
SpaNodeEventAsyncComplete ac = SPA_NODE_EVENT_ASYNC_COMPLETE_INIT (this->uri.node_events.AsyncComplete,
SpaEventNodeAsyncComplete ac = SPA_EVENT_NODE_ASYNC_COMPLETE_INIT (this->uri.event_node.AsyncComplete,
seq, res);
spa_loop_invoke (this->main_loop,
do_send_event,
@ -181,8 +181,8 @@ spa_alsa_sink_node_send_command (SpaNode *node,
this = SPA_CONTAINER_OF (node, SpaALSASink, node);
if (SPA_COMMAND_TYPE (command) == this->uri.node_commands.Start ||
SPA_COMMAND_TYPE (command) == this->uri.node_commands.Pause) {
if (SPA_COMMAND_TYPE (command) == this->uri.command_node.Start ||
SPA_COMMAND_TYPE (command) == this->uri.command_node.Pause) {
if (!this->have_format)
return SPA_RESULT_NO_FORMAT;
@ -203,7 +203,7 @@ spa_alsa_sink_node_send_command (SpaNode *node,
static SpaResult
spa_alsa_sink_node_set_event_callback (SpaNode *node,
SpaNodeEventCallback event,
SpaEventNodeCallback event,
void *user_data)
{
SpaALSASink *this;
@ -612,12 +612,12 @@ spa_alsa_sink_node_port_send_command (SpaNode *node,
if (port_id != 0)
return SPA_RESULT_INVALID_PORT;
if (SPA_COMMAND_TYPE (command) == this->uri.node_commands.Pause) {
if (SPA_COMMAND_TYPE (command) == this->uri.command_node.Pause) {
if (SPA_RESULT_IS_OK (res = spa_alsa_pause (this, false))) {
update_state (this, SPA_NODE_STATE_PAUSED);
}
}
else if (SPA_COMMAND_TYPE (command) == this->uri.node_commands.Start) {
else if (SPA_COMMAND_TYPE (command) == this->uri.command_node.Start) {
if (SPA_RESULT_IS_OK (res = spa_alsa_start (this, false))) {
update_state (this, SPA_NODE_STATE_STREAMING);
}
@ -753,13 +753,13 @@ alsa_sink_init (const SpaHandleFactory *factory,
this = (SpaALSASink *) handle;
for (i = 0; i < n_support; i++) {
if (strcmp (support[i].uri, SPA_ID_MAP_URI) == 0)
if (strcmp (support[i].uri, SPA_TYPE__IDMap) == 0)
this->map = support[i].data;
else if (strcmp (support[i].uri, SPA_LOG_URI) == 0)
else if (strcmp (support[i].uri, SPA_TYPE__Log) == 0)
this->log = support[i].data;
else if (strcmp (support[i].uri, SPA_LOOP__DataLoop) == 0)
else if (strcmp (support[i].uri, SPA_TYPE_LOOP__DataLoop) == 0)
this->data_loop = support[i].data;
else if (strcmp (support[i].uri, SPA_LOOP__MainLoop) == 0)
else if (strcmp (support[i].uri, SPA_TYPE_LOOP__MainLoop) == 0)
this->main_loop = support[i].data;
}
if (this->map == NULL) {
@ -787,7 +787,7 @@ alsa_sink_init (const SpaHandleFactory *factory,
static const SpaInterfaceInfo alsa_sink_interfaces[] =
{
{ SPA_NODE_URI, },
{ SPA_TYPE__Node, },
};
static SpaResult