ir: make bt_ctf_stream_create() public
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 17 Feb 2016 21:52:05 +0000 (16:52 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Feb 2016 17:49:16 +0000 (12:49 -0500)
commit319fd969d5f098775f83f9a4c5c394d4a96db999
tree915f3dee58e32fcd3b3d3e92180aa71a0d460a90
parentb25d20adeabe34126cacaf6b7f93883c1c98ad90
ir: make bt_ctf_stream_create() public

This patch also removes bt_ctf_trace_create_stream(), so that the
only way to create a stream in non-writer mode is using
bt_ctf_stream_create(). Only the stream class is needed, and since
it needs to be part of a trace before calling the function, the
created stream gets associated to this trace on creation.

The function also knows if the stream class's trace was created by
a CTF writer thanks to a new flag. With this, it's able to create
a stream file and set the stream's FD if it's a writer stream.
Otherwise the FD is set to -1 and this stream cannot be passed to
stream writer functions like bt_ctf_stream_append_event() and
bt_ctf_stream_append_discarded_events(), for example.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/stream.c
formats/ctf/ir/trace.c
formats/ctf/writer/writer.c
include/babeltrace/ctf-ir/stream-internal.h
include/babeltrace/ctf-ir/stream.h
include/babeltrace/ctf-ir/trace-internal.h
include/babeltrace/ctf-ir/trace.h
include/babeltrace/ctf-writer/writer-internal.h
This page took 0.025391 seconds and 4 git commands to generate.