buffer: make data and meta types dynamic

Use dynamic types for the data and meta types.
Move the meta into a separate header.
Remove port state, we can keep track of that ourselves.
Add size to MetaDataEnable params
This commit is contained in:
Wim Taymans 2017-04-26 18:42:50 +02:00
parent ed273ec465
commit b51d3e4862
36 changed files with 543 additions and 553 deletions

View file

@ -654,12 +654,12 @@ pinos_core_find_format (PinosCore *core,
pinos_log_debug ("core %p: finding best format %d %d", core, out_state, in_state);
if (out_state > SPA_PORT_STATE_CONFIGURE && output->node->state == PINOS_NODE_STATE_IDLE)
out_state = SPA_PORT_STATE_CONFIGURE;
if (in_state > SPA_PORT_STATE_CONFIGURE && input->node->state == PINOS_NODE_STATE_IDLE)
in_state = SPA_PORT_STATE_CONFIGURE;
if (out_state > PINOS_PORT_STATE_CONFIGURE && output->node->state == PINOS_NODE_STATE_IDLE)
out_state = PINOS_PORT_STATE_CONFIGURE;
if (in_state > PINOS_PORT_STATE_CONFIGURE && input->node->state == PINOS_NODE_STATE_IDLE)
in_state = PINOS_PORT_STATE_CONFIGURE;
if (in_state == SPA_PORT_STATE_CONFIGURE && out_state > SPA_PORT_STATE_CONFIGURE) {
if (in_state == PINOS_PORT_STATE_CONFIGURE && out_state > PINOS_PORT_STATE_CONFIGURE) {
/* only input needs format */
if ((res = spa_node_port_get_format (output->node->node,
SPA_DIRECTION_OUTPUT,
@ -668,7 +668,7 @@ pinos_core_find_format (PinosCore *core,
asprintf (error, "error get output format: %d", res);
goto error;
}
} else if (out_state == SPA_PORT_STATE_CONFIGURE && in_state > SPA_PORT_STATE_CONFIGURE) {
} else if (out_state == PINOS_PORT_STATE_CONFIGURE && in_state > PINOS_PORT_STATE_CONFIGURE) {
/* only output needs format */
if ((res = spa_node_port_get_format (input->node->node,
SPA_DIRECTION_INPUT,
@ -677,7 +677,7 @@ pinos_core_find_format (PinosCore *core,
asprintf (error, "error get input format: %d", res);
goto error;
}
} else if (in_state == SPA_PORT_STATE_CONFIGURE && out_state == SPA_PORT_STATE_CONFIGURE) {
} else if (in_state == PINOS_PORT_STATE_CONFIGURE && out_state == PINOS_PORT_STATE_CONFIGURE) {
again:
/* both ports need a format */
pinos_log_debug ("core %p: finding best format", core);