bt_component_class_source_output_port_connected_method output_port_connected;
bt_component_class_source_message_iterator_init_method msg_iter_init;
bt_component_class_source_message_iterator_finalize_method msg_iter_finalize;
+ bt_component_class_source_message_iterator_seek_ns_from_origin_method msg_iter_seek_ns_from_origin;
+ bt_component_class_source_message_iterator_seek_beginning_method msg_iter_seek_beginning;
+ bt_component_class_source_message_iterator_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin;
+ bt_component_class_source_message_iterator_can_seek_beginning_method msg_iter_can_seek_beginning;
} source;
struct {
bt_component_class_filter_output_port_connected_method output_port_connected;
bt_component_class_filter_message_iterator_init_method msg_iter_init;
bt_component_class_filter_message_iterator_finalize_method msg_iter_finalize;
+ bt_component_class_filter_message_iterator_seek_ns_from_origin_method msg_iter_seek_ns_from_origin;
+ bt_component_class_filter_message_iterator_seek_beginning_method msg_iter_seek_beginning;
+ bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method msg_iter_can_seek_ns_from_origin;
+ bt_component_class_filter_message_iterator_can_seek_beginning_method msg_iter_can_seek_beginning;
} filter;
struct {
bt_component_class_sink_query_method query;
bt_component_class_sink_accept_input_port_connection_method accept_input_port_connection;
bt_component_class_sink_input_port_connected_method input_port_connected;
+ bt_component_class_sink_graph_is_configured_method graph_is_configured;
} sink;
} methods;
};
abort();
}
break;
+ case BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD:
+ switch (cc_type) {
+ case BT_COMPONENT_CLASS_TYPE_SINK:
+ cc_full_descr->methods.sink.graph_is_configured =
+ cur_cc_descr_attr->value.sink_graph_is_configured_method;
+ break;
+ default:
+ abort();
+ }
+ break;
case BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD:
switch (cc_type) {
case BT_COMPONENT_CLASS_TYPE_SOURCE:
abort();
}
break;
+ case BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD:
+ switch (cc_type) {
+ case BT_COMPONENT_CLASS_TYPE_SOURCE:
+ cc_full_descr->methods.source.msg_iter_seek_ns_from_origin =
+ cur_cc_descr_attr->value.source_msg_iter_seek_ns_from_origin_method;
+ break;
+ case BT_COMPONENT_CLASS_TYPE_FILTER:
+ cc_full_descr->methods.filter.msg_iter_seek_ns_from_origin =
+ cur_cc_descr_attr->value.filter_msg_iter_seek_ns_from_origin_method;
+ break;
+ default:
+ abort();
+ }
+ break;
+ case BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD:
+ switch (cc_type) {
+ case BT_COMPONENT_CLASS_TYPE_SOURCE:
+ cc_full_descr->methods.source.msg_iter_seek_beginning =
+ cur_cc_descr_attr->value.source_msg_iter_seek_beginning_method;
+ break;
+ case BT_COMPONENT_CLASS_TYPE_FILTER:
+ cc_full_descr->methods.filter.msg_iter_seek_beginning =
+ cur_cc_descr_attr->value.filter_msg_iter_seek_beginning_method;
+ break;
+ default:
+ abort();
+ }
+ break;
+ case BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD:
+ switch (cc_type) {
+ case BT_COMPONENT_CLASS_TYPE_SOURCE:
+ cc_full_descr->methods.source.msg_iter_can_seek_ns_from_origin =
+ cur_cc_descr_attr->value.source_msg_iter_can_seek_ns_from_origin_method;
+ break;
+ case BT_COMPONENT_CLASS_TYPE_FILTER:
+ cc_full_descr->methods.filter.msg_iter_can_seek_ns_from_origin =
+ cur_cc_descr_attr->value.filter_msg_iter_can_seek_ns_from_origin_method;
+ break;
+ default:
+ abort();
+ }
+ break;
+ case BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD:
+ switch (cc_type) {
+ case BT_COMPONENT_CLASS_TYPE_SOURCE:
+ cc_full_descr->methods.source.msg_iter_can_seek_beginning =
+ cur_cc_descr_attr->value.source_msg_iter_can_seek_beginning_method;
+ break;
+ case BT_COMPONENT_CLASS_TYPE_FILTER:
+ cc_full_descr->methods.filter.msg_iter_can_seek_beginning =
+ cur_cc_descr_attr->value.filter_msg_iter_can_seek_beginning_method;
+ break;
+ default:
+ abort();
+ }
+ break;
default:
/*
* WARN-level logging because this
}
}
+ if (cc_full_descr->methods.source.msg_iter_seek_ns_from_origin) {
+ ret = bt_component_class_source_set_message_iterator_seek_ns_from_origin_method(
+ src_comp_class,
+ cc_full_descr->methods.source.msg_iter_seek_ns_from_origin);
+ if (ret) {
+ BT_LOGE_STR("Cannot set source component class's message iterator \"seek nanoseconds from origin\" method.");
+ status = BT_PLUGIN_STATUS_ERROR;
+ BT_OBJECT_PUT_REF_AND_RESET(src_comp_class);
+ goto end;
+ }
+ }
+
+ if (cc_full_descr->methods.source.msg_iter_seek_beginning) {
+ ret = bt_component_class_source_set_message_iterator_seek_beginning_method(
+ src_comp_class,
+ cc_full_descr->methods.source.msg_iter_seek_beginning);
+ if (ret) {
+ BT_LOGE_STR("Cannot set source component class's message iterator \"seek beginning\" method.");
+ status = BT_PLUGIN_STATUS_ERROR;
+ BT_OBJECT_PUT_REF_AND_RESET(src_comp_class);
+ goto end;
+ }
+ }
+
+ if (cc_full_descr->methods.source.msg_iter_can_seek_ns_from_origin) {
+ ret = bt_component_class_source_set_message_iterator_can_seek_ns_from_origin_method(
+ src_comp_class,
+ cc_full_descr->methods.source.msg_iter_can_seek_ns_from_origin);
+ if (ret) {
+ BT_LOGE_STR("Cannot set source component class's message iterator \"can seek nanoseconds from origin\" method.");
+ status = BT_PLUGIN_STATUS_ERROR;
+ BT_OBJECT_PUT_REF_AND_RESET(src_comp_class);
+ goto end;
+ }
+ }
+
+ if (cc_full_descr->methods.source.msg_iter_can_seek_beginning) {
+ ret = bt_component_class_source_set_message_iterator_can_seek_beginning_method(
+ src_comp_class,
+ cc_full_descr->methods.source.msg_iter_can_seek_beginning);
+ if (ret) {
+ BT_LOGE_STR("Cannot set source component class's message iterator \"can seek beginning\" method.");
+ status = BT_PLUGIN_STATUS_ERROR;
+ BT_OBJECT_PUT_REF_AND_RESET(src_comp_class);
+ goto end;
+ }
+ }
+
break;
case BT_COMPONENT_CLASS_TYPE_FILTER:
if (cc_full_descr->methods.filter.init) {
}
}
+ if (cc_full_descr->methods.filter.msg_iter_seek_ns_from_origin) {
+ ret = bt_component_class_filter_set_message_iterator_seek_ns_from_origin_method(
+ flt_comp_class,
+ cc_full_descr->methods.filter.msg_iter_seek_ns_from_origin);
+ if (ret) {
+ BT_LOGE_STR("Cannot set filter component class's message iterator \"seek nanoseconds from origin\" method.");
+ status = BT_PLUGIN_STATUS_ERROR;
+ BT_OBJECT_PUT_REF_AND_RESET(flt_comp_class);
+ goto end;
+ }
+ }
+
+ if (cc_full_descr->methods.filter.msg_iter_seek_beginning) {
+ ret = bt_component_class_filter_set_message_iterator_seek_beginning_method(
+ flt_comp_class,
+ cc_full_descr->methods.filter.msg_iter_seek_beginning);
+ if (ret) {
+ BT_LOGE_STR("Cannot set filter component class's message iterator \"seek beginning\" method.");
+ status = BT_PLUGIN_STATUS_ERROR;
+ BT_OBJECT_PUT_REF_AND_RESET(flt_comp_class);
+ goto end;
+ }
+ }
+
+ if (cc_full_descr->methods.filter.msg_iter_can_seek_ns_from_origin) {
+ ret = bt_component_class_filter_set_message_iterator_can_seek_ns_from_origin_method(
+ flt_comp_class,
+ cc_full_descr->methods.filter.msg_iter_can_seek_ns_from_origin);
+ if (ret) {
+ BT_LOGE_STR("Cannot set filter component class's message iterator \"can seek nanoseconds from origin\" method.");
+ status = BT_PLUGIN_STATUS_ERROR;
+ BT_OBJECT_PUT_REF_AND_RESET(flt_comp_class);
+ goto end;
+ }
+ }
+
+ if (cc_full_descr->methods.filter.msg_iter_can_seek_beginning) {
+ ret = bt_component_class_filter_set_message_iterator_can_seek_beginning_method(
+ flt_comp_class,
+ cc_full_descr->methods.filter.msg_iter_can_seek_beginning);
+ if (ret) {
+ BT_LOGE_STR("Cannot set filter component class's message iterator \"can seek beginning\" method.");
+ status = BT_PLUGIN_STATUS_ERROR;
+ BT_OBJECT_PUT_REF_AND_RESET(flt_comp_class);
+ goto end;
+ }
+ }
+
break;
case BT_COMPONENT_CLASS_TYPE_SINK:
if (cc_full_descr->methods.sink.init) {
}
}
+ if (cc_full_descr->methods.sink.graph_is_configured) {
+ ret = bt_component_class_sink_set_graph_is_configured_method(
+ sink_comp_class,
+ cc_full_descr->methods.sink.graph_is_configured);
+ if (ret) {
+ BT_LOGE_STR("Cannot set sink component class's \"graph is configured\" method.");
+ status = BT_PLUGIN_STATUS_ERROR;
+ BT_OBJECT_PUT_REF_AND_RESET(sink_comp_class);
+ goto end;
+ }
+ }
+
break;
default:
abort();
"comp-cls-addr=%p", comp_class);
}
-BT_HIDDEN
void bt_plugin_so_on_add_component_class(struct bt_plugin *plugin,
struct bt_component_class *comp_class)
{