Add support for async results

Add an async result code and an event to signal the completion.
Use async return values to signal completion of a method and potential
state change.
Add selected format to port update message.
Make it possible to parse into a custom copy of the command memory.
Remove state change events from the elements, we now just update the
state.
Implement async results in the proxy element
Add support for removing buffers in the client.
Fix up pinossink
Deal with async return in the links.
This commit is contained in:
Wim Taymans 2016-09-22 08:55:30 +02:00
parent 27acab7532
commit 68148188fa
25 changed files with 456 additions and 406 deletions

View file

@ -36,50 +36,10 @@ spa_format_to_string (const SpaFormat *format, char **result)
SpaResult
spa_format_fixate (SpaFormat *format)
{
#if 0
unsigned int i, j;
SpaProps *props;
uint32_t mask;
#endif
if (format == NULL)
return SPA_RESULT_INVALID_ARGUMENTS;
format->props.unset_mask = 0;
#if 0
props = &format->props;
mask = props->unset_mask;
for (i = 0; i < props->n_prop_info; i++) {
if (mask & 1) {
const SpaPropInfo *pi = &props->prop_info[i];
switch (pi->range_type) {
case SPA_PROP_RANGE_TYPE_NONE:
break;
case SPA_PROP_RANGE_TYPE_MIN_MAX:
break;
case SPA_PROP_RANGE_TYPE_STEP:
break;
case SPA_PROP_RANGE_TYPE_ENUM:
{
for (j = 0; j < pi->n_range_values; j++) {
const SpaPropRangeInfo *ri = &pi->range_values[j];
memcpy (SPA_MEMBER (props, pi->offset, void), ri->value, ri->size);
SPA_PROPS_INDEX_SET (props, i);
break;
}
break;
}
case SPA_PROP_RANGE_TYPE_FLAGS:
break;
default:
break;
}
}
mask >>= 1;
}
#endif
return SPA_RESULT_OK;
}