iterator: move auto-seek data in its own struct, add comments
[babeltrace.git] / src / lib / graph / message / iterator.h
index 2c442a15db749f2ca4ff5610684806cf8b7d0b93..1ecaa95a991d29329a2816d1ffcc6dd0ca160bca 100644 (file)
@@ -112,7 +112,27 @@ struct bt_self_component_port_input_message_iterator {
        } methods;
 
        enum bt_self_component_port_input_message_iterator_state state;
-       GQueue *auto_seek_msgs;
+
+       /*
+        * Data necessary for auto seek (the seek-to-beginning then fast-forward
+        * seek strategy).
+        */
+       struct {
+               /*
+                * Queue of `const bt_message *` (owned by this queue).
+                *
+                * When fast-forwarding, we get the messages from upstream in
+                * batches. Once we have found the first message with timestamp
+                * greater or equal to the seek time, we put it and all of the
+                * following message of the batch in this queue.  They will be
+                * sent on the next "next" call on this iterator.
+                *
+                * The messages are in chronological order (i.e. the first to
+                * send is the first of the queue).
+                */
+               GQueue *msgs;
+       } auto_seek;
+
        void *user_data;
 };
 
This page took 0.032976 seconds and 4 git commands to generate.