From 3ce73327b9b6bd4ea139a1adcfa4dd20dd96e428 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Fri, 19 Jul 2019 09:24:04 -0400 Subject: [PATCH] flt.utils.muxer: support stream messages with default clock snapshot Signed-off-by: Francis Deslauriers Change-Id: I46fef189f846999dbfedc3504a7ed5d908464e99 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1724 Reviewed-by: Philippe Proulx Tested-by: jenkins --- src/plugins/utils/muxer/muxer.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/plugins/utils/muxer/muxer.c b/src/plugins/utils/muxer/muxer.c index e1603fed..e68c372c 100644 --- a/src/plugins/utils/muxer/muxer.c +++ b/src/plugins/utils/muxer/muxer.c @@ -601,6 +601,28 @@ int get_msg_ts_ns(struct muxer_comp *muxer_comp, } break; + case BT_MESSAGE_TYPE_STREAM_BEGINNING: + { + enum bt_message_stream_clock_snapshot_state snapshot_state = + bt_message_stream_beginning_borrow_default_clock_snapshot_const( + msg, &clock_snapshot); + if (snapshot_state == BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_UNKNOWN) { + goto no_clock_snapshot; + } + + break; + } + case BT_MESSAGE_TYPE_STREAM_END: + { + enum bt_message_stream_clock_snapshot_state snapshot_state = + bt_message_stream_end_borrow_default_clock_snapshot_const( + msg, &clock_snapshot); + if (snapshot_state == BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_UNKNOWN) { + goto no_clock_snapshot; + } + + break; + } case BT_MESSAGE_TYPE_DISCARDED_EVENTS: if (bt_stream_class_discarded_events_have_default_clock_snapshots( stream_class)) { -- 2.34.1