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

@ -31,6 +31,7 @@
#include <spa/node/node.h>
#include <spa/monitor/monitor.h>
#include <spa/pod/parser.h>
#include <spa/debug/pod.h>
#include <pipewire/log.h>
#include <pipewire/type.h>
@ -80,8 +81,11 @@ static struct monitor_item *add_item(struct pw_spa_monitor *this,
":", SPA_MONITOR_ITEM_name, "s", &name,
":", SPA_MONITOR_ITEM_class, "s", &klass,
":", SPA_MONITOR_ITEM_factory, "p", &factory,
":", SPA_MONITOR_ITEM_info, "T", &info, NULL) < 0)
":", SPA_MONITOR_ITEM_info, "T", &info, NULL) < 0) {
pw_log_warn("monitor %p: could not parse item", this);
spa_debug_pod(0, NULL, item);
return NULL;
}
pw_log_debug("monitor %p: add: \"%s\" (%s)", this, name, id);