format: make helper functions to create formats

Use helper functions to create a fully specified format.
This commit is contained in:
Wim Taymans 2018-08-29 15:53:26 +02:00
parent 80de83f38a
commit 514528f2c7
24 changed files with 158 additions and 430 deletions

View file

@ -984,14 +984,7 @@ impl_node_port_enum_params(struct spa_node *node,
if (*index > 0)
return 0;
param = spa_pod_builder_object(&b,
SPA_TYPE_OBJECT_Format, id,
"I", SPA_MEDIA_TYPE_audio,
"I", SPA_MEDIA_SUBTYPE_raw,
":", SPA_FORMAT_AUDIO_format, "I", this->current_format.info.raw.format,
":", SPA_FORMAT_AUDIO_layout, "I", this->current_format.info.raw.layout,
":", SPA_FORMAT_AUDIO_rate, "i", this->current_format.info.raw.rate,
":", SPA_FORMAT_AUDIO_channels, "i", this->current_format.info.raw.channels);
param = spa_format_audio_raw_build(&b, id, &this->current_format.info.raw);
break;
case SPA_PARAM_Buffers: