Type changes

Only allow properties inside objects, this makes it easier to
iterate the object, which is needed for efficiently processing
control streams.
Add a choice type to mark variable properties.
SPA_TYPE_Enum -> SPA_TYPE_Id to avoid confusion with choice enum
Make it easier to allocate and initialize properties on the stack
Make more efficient methods to make objects.
This commit is contained in:
Wim Taymans 2018-09-05 16:41:07 +02:00
parent 03fdabd155
commit cc842cbdc8
63 changed files with 2253 additions and 1880 deletions

View file

@ -360,8 +360,9 @@ static int negotiate_formats(struct data *data)
spa_pod_builder_init(&b, buffer, sizeof(buffer));
format = spa_pod_builder_object(&b,
SPA_TYPE_OBJECT_Format, 0,
":", SPA_FORMAT_mediaType, "I", SPA_MEDIA_TYPE_binary,
":", SPA_FORMAT_mediaSubtype, "I", SPA_MEDIA_SUBTYPE_raw);
SPA_FORMAT_mediaType, &SPA_POD_Id(SPA_MEDIA_TYPE_binary),
SPA_FORMAT_mediaSubtype, &SPA_POD_Id(SPA_MEDIA_SUBTYPE_raw),
0);
if ((res = spa_node_port_set_param(data->sink,
SPA_DIRECTION_INPUT, 0,