Skip to content

Commit 05efae8

Browse files
committed
[#100273] live-src: Receive metadata file path from params
1 parent 86cea84 commit 05efae8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/plugins/ctf/live-src/live-src.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,14 @@ ctf_live_init(bt_self_component_source *self_comp_src,
9393
}
9494
bt_self_component_set_data(bt_self_component_source_as_self_component(self_comp_src), comp);
9595

96+
std::string metadataPath = ".";
97+
if (bt_value_is_map(params) && bt_value_map_has_entry(params, "metadata-path")) {
98+
metadataPath =
99+
bt_value_string_get(bt_value_map_borrow_entry_value_const(params, "metadata-path"));
100+
}
101+
96102
// Parse the metadata file
97-
comp->trace = ctf_live_trace_create(".", "trace", ctf::src::ClkClsCfg {},
103+
comp->trace = ctf_live_trace_create(metadataPath.c_str(), "trace", ctf::src::ClkClsCfg {},
98104
static_cast<bt2::SelfComponent>(bt2::wrap(self_comp_src)));
99105
size_t idx = 0;
100106
// Create an output port for each of the streams found in the metadata

0 commit comments

Comments
 (0)