/* add option to es configuration */ static bool es_conf_add_option(struct es_conf *conf, const char *key, const char *value) { assert(conf); return ubase_check(udict_set_string(conf->options, value, UDICT_TYPE_STRING, key)); }
/** @internal @This sets the value of an option. * * @param upipe description structure of the pipe * @param key name of the option * @param value of the option, or NULL to delete it * @return an error code */ static int upipe_fdec_set_option(struct upipe *upipe, const char *key, const char *value) { struct upipe_fdec *upipe_fdec = upipe_fdec_from_upipe(upipe); assert(key != NULL); if (upipe_fdec->options == NULL) return UBASE_ERR_ALLOC; if (upipe_fdec->last_inner != NULL) { UBASE_RETURN(upipe_set_option(upipe_fdec->last_inner, key, value)) } if (value != NULL) return udict_set_string(upipe_fdec->options->udict, value, UDICT_TYPE_STRING, key); else udict_delete(upipe_fdec->options->udict, UDICT_TYPE_STRING, key); return UBASE_ERR_NONE; }