#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
-#include <stdbool.h>
#include "common/assert.h"
#include <glib.h>
#include "common/uuid.h"
.self_comp = self_comp,
.clock_class_offset_s = config ? config->clock_class_offset_s : 0,
.clock_class_offset_ns = config ? config->clock_class_offset_ns : 0,
+ .force_clock_class_origin_unix_epoch =
+ config ? config->force_clock_class_origin_unix_epoch : false,
+ .create_trace_class = true,
};
bt_logging_level log_level = ctf_fs_trace->log_level;
file = get_file(ctf_fs_trace->path->str, log_level, self_comp);
if (!file) {
- BT_COMP_LOGE("Cannot create metadata file object");
+ BT_COMP_LOGE("Cannot create metadata file object.");
ret = -1;
goto end;
}
ctf_fs_trace->metadata->decoder = ctf_metadata_decoder_create(
&decoder_config);
if (!ctf_fs_trace->metadata->decoder) {
- BT_COMP_LOGE("Cannot create metadata decoder object");
+ BT_COMP_LOGE("Cannot create metadata decoder object.");
ret = -1;
goto end;
}
- ret = ctf_metadata_decoder_decode(ctf_fs_trace->metadata->decoder,
- file->fp);
+ ret = ctf_metadata_decoder_append_content(
+ ctf_fs_trace->metadata->decoder, file->fp);
if (ret) {
- BT_COMP_LOGE("Cannot decode metadata file");
+ BT_COMP_LOGE("Cannot update metadata decoder's content.");
goto end;
}