end:
return ret;
}
-
-BT_HIDDEN
-int bt_event_class_update_event_pool_clock_values(
- struct bt_event_class *event_class)
-{
- int ret = 0;
- uint64_t i;
- struct bt_stream_class *stream_class =
- bt_event_class_borrow_stream_class(event_class);
-
- BT_ASSERT(stream_class->common.clock_class);
-
- for (i = 0; i < event_class->event_pool.size; i++) {
- struct bt_clock_value *cv;
- struct bt_event *event =
- event_class->event_pool.objects->pdata[i];
-
- BT_ASSERT(event);
-
- cv = g_hash_table_lookup(event->clock_values,
- stream_class->common.clock_class);
- if (cv) {
- continue;
- }
-
- cv = bt_clock_value_create(stream_class->common.clock_class);
- if (!cv) {
- BT_LIB_LOGE("Cannot create clock value from clock class: "
- "%![cc-]+K", stream_class->common.clock_class);
- ret = -1;
- goto end;
- }
-
- g_hash_table_insert(event->clock_values,
- stream_class->common.clock_class, cv);
- }
-
-end:
- return ret;
-}