Add the concept of a static trace
[babeltrace.git] / lib / ctf-ir / stream.c
index 949b11e9512f66889a90fe02d609017e8cfdd07d..7ab3544a8f41c061780b884248242e9c990ccaaf 100644 (file)
@@ -36,6 +36,7 @@
 #include <babeltrace/ctf-ir/stream.h>
 #include <babeltrace/ctf-ir/stream-internal.h>
 #include <babeltrace/ctf-ir/stream-class-internal.h>
+#include <babeltrace/ctf-ir/trace.h>
 #include <babeltrace/ctf-ir/trace-internal.h>
 #include <babeltrace/ctf-writer/writer-internal.h>
 #include <babeltrace/graph/component-internal.h>
@@ -367,6 +368,15 @@ struct bt_ctf_stream *bt_ctf_stream_create(
                goto error;
        }
 
+       if (bt_ctf_trace_is_static(trace)) {
+               /*
+                * A static trace has the property that all its stream
+                * classes, clock classes, and streams are definitive:
+                * no more can be added, and each object is also frozen.
+                */
+               goto error;
+       }
+
        stream = g_new0(struct bt_ctf_stream, 1);
        if (!stream) {
                goto error;
This page took 0.023987 seconds and 4 git commands to generate.