spa: add keys for properties

Define and document property keys
This commit is contained in:
Wim Taymans 2019-06-03 16:48:01 +02:00
parent 1f250046a3
commit 49ef8f9b5f
35 changed files with 333 additions and 134 deletions

View file

@ -226,9 +226,9 @@ impl_init(const struct spa_handle_factory *factory,
loop = support[i].data;
}
if (info) {
if ((str = spa_dict_lookup(info, "log.colors")) != NULL)
if ((str = spa_dict_lookup(info, SPA_KEY_LOG_COLORS)) != NULL)
this->colors = (strcmp(str, "true") == 0 || atoi(str) == 1);
if ((str = spa_dict_lookup(info, "log.file")) != NULL) {
if ((str = spa_dict_lookup(info, SPA_KEY_LOG_FILE)) != NULL) {
this->file = fopen(str, "w");
if (this->file == NULL)
fprintf(stderr, "failed to open file %s: (%s)", str, strerror(errno));