/* Visit stack */
struct stack *stack;
+ /* Current graph to create notifications (weak) */
+ struct bt_graph *graph;
+
/*
* Current dynamic scope field pointer.
*
notit, notit->meta.event_class,
bt_event_class_get_name(notit->meta.event_class),
notit->packet);
- notif = bt_notification_event_create(notit->meta.event_class,
- notit->packet, notit->meta.cc_prio_map);
+ BT_ASSERT(notit->graph);
+ notif = bt_notification_event_create(notit->graph,
+ notit->meta.event_class, notit->packet,
+ notit->meta.cc_prio_map);
if (!notif) {
BT_LOGE("Cannot create event notification: "
"notit-addr=%p, ec-addr=%p, ec-name=\"%s\", "
}
BT_ASSERT(notit->stream);
- ret = bt_notification_stream_begin_create(notit->stream);
+ BT_ASSERT(notit->graph);
+ ret = bt_notification_stream_begin_create(notit->graph, notit->stream);
if (!ret) {
BT_LOGE("Cannot create stream beginning notification: "
"notit-addr=%p, stream-addr=%p",
return;
}
- ret = bt_notification_stream_end_create(notit->stream);
+ BT_ASSERT(notit->graph);
+ ret = bt_notification_stream_end_create(notit->graph, notit->stream);
if (!ret) {
BT_LOGE("Cannot create stream beginning notification: "
"notit-addr=%p, stream-addr=%p",
notit->dscopes.stream_packet_context);
}
- notif = bt_notification_packet_begin_create(notit->packet);
+ BT_ASSERT(notit->graph);
+ notif = bt_notification_packet_begin_create(notit->graph,
+ notit->packet);
if (!notif) {
BT_LOGE("Cannot create packet beginning notification: "
"notit-addr=%p, packet-addr=%p",
return;
}
- notif = bt_notification_packet_end_create(notit->packet);
+ BT_ASSERT(notit->graph);
+ notif = bt_notification_packet_end_create(notit->graph, notit->packet);
if (!notif) {
BT_LOGE("Cannot create packet end notification: "
"notit-addr=%p, packet-addr=%p",
enum bt_notif_iter_status bt_notif_iter_get_next_notification(
struct bt_notif_iter *notit,
struct bt_clock_class_priority_map *cc_prio_map,
+ struct bt_graph *graph,
struct bt_notification **notification)
{
int ret;
BT_ASSERT(notit);
BT_ASSERT(notification);
+ if (notit->state == STATE_DONE) {
+ status = BT_NOTIF_ITER_STATUS_EOF;
+ goto end;
+ }
+
if (cc_prio_map != notit->meta.cc_prio_map) {
bt_put(notit->meta.cc_prio_map);
notit->meta.cc_prio_map = bt_get(cc_prio_map);
}
- if (notit->state == STATE_DONE) {
- status = BT_NOTIF_ITER_STATUS_EOF;
- goto end;
- }
+ notit->graph = graph;
BT_LOGV("Getting next notification: notit-addr=%p, cc-prio-map-addr=%p",
notit, cc_prio_map);