bt_message_unlink_graph(msg);
}
-struct bt_graph *bt_graph_create(void)
+struct bt_graph *bt_graph_create(uint64_t mip_version)
{
struct bt_graph *graph;
int ret;
+ BT_ASSERT_PRE(mip_version <= bt_get_maximal_mip_version(),
+ "Unknown MIP version: mip-version=%" PRIu64 ", "
+ "max-mip-version=%" PRIu64,
+ mip_version, bt_get_maximal_mip_version());
BT_LOGI_STR("Creating graph object.");
graph = g_new0(struct bt_graph, 1);
if (!graph) {
}
bt_object_init_shared(&graph->base, destroy_graph);
+ graph->mip_version = mip_version;
graph->connections = g_ptr_array_new_with_free_func(
(GDestroyNotify) bt_object_try_spec_release);
if (!graph->connections) {
comp_init_method_t init_method,
const char *name, const struct bt_value *params,
void *init_method_data, bt_logging_level log_level,
- struct bt_component **user_component)
+ const struct bt_component **user_component)
{
int status = BT_FUNC_STATUS_OK;
enum bt_component_class_init_method_status init_status;
struct bt_graph *graph,
const struct bt_component_class_source *comp_cls,
const char *name, const struct bt_value *params,
- bt_logging_level log_level,
+ enum bt_logging_level log_level,
const struct bt_component_source **component)
{
return bt_graph_add_source_component_with_init_method_data(
struct bt_graph *graph,
const struct bt_component_class_filter *comp_cls,
const char *name, const struct bt_value *params,
- void *init_method_data, bt_logging_level log_level,
+ void *init_method_data, enum bt_logging_level log_level,
const struct bt_component_filter **component)
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
struct bt_graph *graph,
const struct bt_component_class_filter *comp_cls,
const char *name, const struct bt_value *params,
- bt_logging_level log_level,
+ enum bt_logging_level log_level,
const struct bt_component_filter **component)
{
return bt_graph_add_filter_component_with_init_method_data(
struct bt_graph *graph,
const struct bt_component_class_sink *comp_cls,
const char *name, const struct bt_value *params,
- void *init_method_data, bt_logging_level log_level,
+ void *init_method_data, enum bt_logging_level log_level,
const struct bt_component_sink **component)
{
BT_ASSERT_PRE_NON_NULL(comp_cls, "Component class");
struct bt_graph *graph,
const struct bt_component_class_sink *comp_cls,
const char *name, const struct bt_value *params,
- bt_logging_level log_level,
+ enum bt_logging_level log_level,
const struct bt_component_sink **component)
{
return bt_graph_add_sink_component_with_init_method_data(