Subscribe to notifications when creating a notif. iterator
[babeltrace.git] / plugins / utils / trimmer / iterator.c
index 8b35cf984a4d9176f604dd47f8b4743b2519004c..2fba7f66eabae945db1a59df010e9abebf0addaa 100644 (file)
@@ -84,14 +84,15 @@ enum bt_notification_iterator_status trimmer_iterator_init(
        }
 
        /* Create a new iterator on the upstream component. */
-       input_port = bt_private_component_filter_get_default_input_private_port(
-               component);
+       input_port = bt_private_component_filter_get_input_private_port_by_name(
+               component, "in");
        assert(input_port);
        connection = bt_private_port_get_private_connection(input_port);
        assert(connection);
 
        it_data->input_iterator =
-               bt_private_connection_create_notification_iterator(connection);
+               bt_private_connection_create_notification_iterator(connection,
+                       NULL);
        if (!it_data->input_iterator) {
                ret = BT_NOTIFICATION_ITERATOR_STATUS_NOMEM;
                goto end;
@@ -214,7 +215,7 @@ struct bt_notification *evaluate_event_notification(
        assert(trace);
 
        /* FIXME multi-clock? */
-       clock_class = bt_ctf_trace_get_clock_class(trace, 0);
+       clock_class = bt_ctf_trace_get_clock_class_by_index(trace, 0);
        if (!clock_class) {
                goto end;
        }
@@ -348,7 +349,8 @@ int64_t get_raw_timestamp(struct bt_ctf_packet *writer_packet,
        assert(writer_trace);
 
        /* FIXME multi-clock? */
-       writer_clock_class = bt_ctf_trace_get_clock_class(writer_trace, 0);
+       writer_clock_class = bt_ctf_trace_get_clock_class_by_index(
+               writer_trace, 0);
        assert(writer_clock_class);
 
        ret = bt_ctf_clock_class_get_offset_s(writer_clock_class, &sec_offset);
This page took 0.024719 seconds and 4 git commands to generate.