lib: use object pool for event and packet notifications
[babeltrace.git] / plugins / ctf / fs-src / fs.h
index f5eaabb8f739cfc5d6912f42e90eb1ea8e7298cc..b54e4722d323caa1a3746e9a8228ac1cd13fc1dd 100644 (file)
@@ -30,8 +30,7 @@
 
 #include <stdbool.h>
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/graph/component.h>
-#include <babeltrace/graph/clock-class-priority-map.h>
+#include <babeltrace/babeltrace.h>
 #include "data-stream-file.h"
 #include "metadata.h"
 
@@ -50,7 +49,7 @@ struct ctf_fs_file {
 
 struct ctf_fs_metadata {
        /* Owned by this */
-       struct bt_ctf_trace *trace;
+       struct bt_trace *trace;
 
        /* Owned by this */
        char *text;
@@ -88,6 +87,9 @@ struct ctf_fs_trace {
 
        /* Owned by this */
        GString *name;
+
+       /* Next automatic stream ID when not provided by packet header */
+       uint64_t next_stream_id;
 };
 
 struct ctf_fs_ds_file_group {
@@ -103,10 +105,10 @@ struct ctf_fs_ds_file_group {
        GPtrArray *ds_file_infos;
 
        /* Owned by this */
-       struct bt_ctf_stream_class *stream_class;
+       struct bt_stream_class *stream_class;
 
        /* Owned by this */
-       struct bt_ctf_stream *stream;
+       struct bt_stream *stream;
 
        /* Stream (instance) ID; -1ULL means none */
        uint64_t stream_id;
@@ -118,9 +120,15 @@ struct ctf_fs_ds_file_group {
 struct ctf_fs_port_data {
        /* Weak, belongs to ctf_fs_trace */
        struct ctf_fs_ds_file_group *ds_file_group;
+
+       /* Weak */
+       struct ctf_fs_component *ctf_fs;
 };
 
 struct ctf_fs_notif_iter_data {
+       /* Weak */
+       struct bt_graph *graph;
+
        /* Weak, belongs to ctf_fs_trace */
        struct ctf_fs_ds_file_group *ds_file_group;
 
@@ -131,7 +139,10 @@ struct ctf_fs_notif_iter_data {
        size_t ds_file_info_index;
 
        /* Owned by this */
-       struct bt_ctf_notif_iter *notif_iter;
+       struct bt_notif_iter *notif_iter;
+
+       /* True to skip BT_NOTIFICATION_TYPE_STREAM_BEGIN notifications */
+       bool skip_stream_begin_notifs;
 };
 
 BT_HIDDEN
@@ -149,7 +160,7 @@ struct bt_component_class_query_method_return ctf_fs_query(
 
 BT_HIDDEN
 struct ctf_fs_trace *ctf_fs_trace_create(const char *path, const char *name,
-               struct ctf_fs_metadata_config *config);
+               struct ctf_fs_metadata_config *config, struct bt_graph *graph);
 
 BT_HIDDEN
 void ctf_fs_trace_destroy(struct ctf_fs_trace *trace);
This page took 0.024731 seconds and 4 git commands to generate.