X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Fstream-internal.h;h=0cbd18b561539217621099ac837370d2f625dc74;hp=a39b1529108bfdbd511ab8162a0815f8c9c1548a;hb=44c440bc5fe8219cc17d1b786d91fd83c4c9860a;hpb=c44c3e709f9e95a847e9502c5297234aa1f01577 diff --git a/include/babeltrace/ctf-ir/stream-internal.h b/include/babeltrace/ctf-ir/stream-internal.h index a39b1529..0cbd18b5 100644 --- a/include/babeltrace/ctf-ir/stream-internal.h +++ b/include/babeltrace/ctf-ir/stream-internal.h @@ -1,5 +1,5 @@ -#ifndef BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H -#define BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H +#ifndef BABELTRACE_CTF_IR_STREAM_INTERNAL_H +#define BABELTRACE_CTF_IR_STREAM_INTERNAL_H /* * BabelTrace - CTF Writer: Stream internal @@ -28,28 +28,43 @@ */ #include +#include #include -#include -#include -#include +#include #include -#include #include -struct bt_ctf_stream { +struct bt_stream_class; +struct bt_stream; + +struct bt_stream { struct bt_object base; - uint32_t id; - struct bt_ctf_stream_class *stream_class; - /* Array of pointers to bt_ctf_event for the current packet */ - GPtrArray *events; - struct ctf_stream_pos pos; - unsigned int flushed_packet_count; - GString *name; - struct bt_ctf_field *packet_header; - struct bt_ctf_field *packet_context; + + /* Weak: parent is this class's trace */ + struct bt_stream_class *class; + + struct { + GString *str; + + /* NULL or `str->str` above */ + const char *value; + } name; + + uint64_t id; + + /* Pool of `struct bt_packet *` */ + struct bt_object_pool packet_pool; + + bool frozen; }; BT_HIDDEN -int bt_ctf_stream_set_fd(struct bt_ctf_stream *stream, int fd); +void _bt_stream_freeze(struct bt_stream *stream); + +#ifdef BT_DEV_MODE +# define bt_stream_freeze _bt_stream_freeze +#else +# define bt_stream_freeze(_stream) +#endif -#endif /* BABELTRACE_CTF_WRITER_STREAM_INTERNAL_H */ +#endif /* BABELTRACE_CTF_IR_STREAM_INTERNAL_H */