add layout to format

This commit is contained in:
Wim Taymans 2018-04-19 20:09:10 +02:00
parent 1f73143d55
commit 30d8df7d25
5 changed files with 7 additions and 2 deletions

View file

@ -56,10 +56,10 @@ spa_format_audio_raw_parse(const struct spa_pod *format,
{
return spa_pod_object_parse(format,
":",type->format, "I", &info->format,
":",type->layout, "i", &info->layout,
":",type->rate, "i", &info->rate,
":",type->channels, "i", &info->channels,
":",type->flags, "?i", &info->flags,
":",type->layout, "?i", &info->layout,
":",type->channel_mask, "?i", &info->channel_mask, NULL);
}

View file

@ -339,6 +339,7 @@ impl_node_port_enum_params(struct spa_node *node,
"I", t->media_type.audio,
"I", t->media_subtype.raw,
":", t->format_audio.format, "I", this->current_format.info.raw.format,
":", t->format_audio.layout, "i", this->current_format.info.raw.layout,
":", t->format_audio.rate, "i", this->current_format.info.raw.rate,
":", t->format_audio.channels, "i", this->current_format.info.raw.channels);
}

View file

@ -304,6 +304,7 @@ static int port_get_format(struct spa_node *node,
"I", t->media_type.audio,
"I", t->media_subtype.raw,
":", t->format_audio.format, "I", this->current_format.info.raw.format,
":", t->format_audio.layout, "i", this->current_format.info.raw.layout,
":", t->format_audio.rate, "i", this->current_format.info.raw.rate,
":", t->format_audio.channels, "i", this->current_format.info.raw.channels);

View file

@ -204,6 +204,7 @@ static int port_enum_formats(struct spa_node *node,
":", d->type.format_audio.format, "Ieu", d->type.audio_format.S16,
SPA_POD_PROP_ENUM(2, d->type.audio_format.S16,
d->type.audio_format.F32),
":", d->type.format_audio.layout, "i", SPA_AUDIO_LAYOUT_NON_INTERLEAVED,
":", d->type.format_audio.channels, "iru", 2,
SPA_POD_PROP_MIN_MAX(1, INT32_MAX),
":", d->type.format_audio.rate, "iru", 44100,
@ -234,6 +235,7 @@ static int port_get_format(struct spa_node *node,
"I", d->type.media_type.audio,
"I", d->type.media_subtype.raw,
":", d->type.format_audio.format, "I", d->format.format,
":", d->type.format_audio.layout, "i", d->format.layout,
":", d->type.format_audio.channels, "i", d->format.channels,
":", d->type.format_audio.rate, "i", d->format.rate);

View file

@ -387,6 +387,7 @@ static int port_enum_formats(struct spa_node *node,
"I", t->media_type.audio,
"I", t->media_subtype.raw,
":", t->format_audio.format, "I", t->audio_format.S16,
":", t->format_audio.layout, "i", SPA_AUDIO_LAYOUT_INTERLEAVED,
":", t->format_audio.rate, "i", n->sample_rate,
":", t->format_audio.channels, "i", n->channels);
}