projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bt_trace_class_create(): accept mandatory self component
[babeltrace.git]
/
plugins
/
ctf
/
common
/
metadata
/
decoder.h
diff --git
a/plugins/ctf/common/metadata/decoder.h
b/plugins/ctf/common/metadata/decoder.h
index cf8ed00d9a9ce92759d265581fd98e3898872cff..fac2f1d7ebaab4a964112f268bb6948786eadccd 100644
(file)
--- a/
plugins/ctf/common/metadata/decoder.h
+++ b/
plugins/ctf/common/metadata/decoder.h
@@
-16,8
+16,9
@@
*/
#include <stdint.h>
*/
#include <stdint.h>
+#include <stdbool.h>
-struct bt_ctf_trace;
+#include <babeltrace/babeltrace.h>
/* A CTF metadata decoder object */
struct ctf_metadata_decoder;
/* A CTF metadata decoder object */
struct ctf_metadata_decoder;
@@
-31,17
+32,21
@@
enum ctf_metadata_decoder_status {
CTF_METADATA_DECODER_STATUS_IR_VISITOR_ERROR = -4,
};
CTF_METADATA_DECODER_STATUS_IR_VISITOR_ERROR = -4,
};
+/* Decoding configuration */
+struct ctf_metadata_decoder_config {
+ int64_t clock_class_offset_s;
+ int64_t clock_class_offset_ns;
+};
+
/*
/*
- * Creates a CTF metadata decoder with `err` as the error stream (can
- * be `NULL` to disable error output). `clock_class_offset_ns` is an
- * offset to apply to the decoded clock classes's offsets. `name` is
- * this decoder's trace's name.
+ * Creates a CTF metadata decoder.
*
* Returns `NULL` on error.
*/
BT_HIDDEN
*
* Returns `NULL` on error.
*/
BT_HIDDEN
-struct ctf_metadata_decoder *ctf_metadata_decoder_create(FILE *err,
- uint64_t clock_class_offset_ns, const char *name);
+struct ctf_metadata_decoder *ctf_metadata_decoder_create(
+ bt_self_component_source *self_comp,
+ const struct ctf_metadata_decoder_config *config);
/*
* Destroys a CTF metadata decoder that you created with
/*
* Destroys a CTF metadata decoder that you created with
@@
-58,7
+63,7
@@
void ctf_metadata_decoder_destroy(
* until the end of this file stream. If it finds new information (new
* event class, new stream class, or new clock class), it appends this
* information to the decoder's trace object (as returned by
* until the end of this file stream. If it finds new information (new
* event class, new stream class, or new clock class), it appends this
* information to the decoder's trace object (as returned by
- * ctf_metadata_
get_trace
()), or it creates this trace.
+ * ctf_metadata_
decoder_get_ir_trace_class
()), or it creates this trace.
*
* The metadata can be packetized or not.
*
*
* The metadata can be packetized or not.
*
@@
-82,16
+87,13
@@
BT_HIDDEN
enum ctf_metadata_decoder_status ctf_metadata_decoder_decode(
struct ctf_metadata_decoder *metadata_decoder, FILE *fp);
enum ctf_metadata_decoder_status ctf_metadata_decoder_decode(
struct ctf_metadata_decoder *metadata_decoder, FILE *fp);
-/*
- * Returns a new reference to the current CTF IR trace object which is
- * the result of the metadata decoding process.
- *
- * The trace object, once created, remains the same until you call
- * ctf_metadata_decoder_destroy().
- */
BT_HIDDEN
BT_HIDDEN
-struct bt_ctf_trace *ctf_metadata_decoder_get_trace(
- struct ctf_metadata_decoder *metadata_decoder);
+bt_trace_class *ctf_metadata_decoder_get_ir_trace_class(
+ struct ctf_metadata_decoder *mdec);
+
+BT_HIDDEN
+struct ctf_trace_class *ctf_metadata_decoder_borrow_ctf_trace_class(
+ struct ctf_metadata_decoder *mdec);
/*
* Checks whether or not a given metadata file stream is packetized, and
/*
* Checks whether or not a given metadata file stream is packetized, and
This page took
0.030875 seconds
and
4
git commands to generate.