X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf%2Ftypes.h;h=c5c824fdb8bab26f3d6808ec9562a6f70a807fa9;hp=cebaca7ac8f19c516876163c1108540dd958a898;hb=7d97fad984e6abfd809225a86983b12eab90b3bd;hpb=90bf3cefc3f8799b3a822bf9123f21e81220574e diff --git a/include/babeltrace/ctf/types.h b/include/babeltrace/ctf/types.h index cebaca7a..c5c824fd 100644 --- a/include/babeltrace/ctf/types.h +++ b/include/babeltrace/ctf/types.h @@ -31,6 +31,8 @@ #include #include +struct bt_stream_callbacks; + struct packet_index { off_t offset; /* offset of the packet in the file, in bytes */ off_t data_offset; /* offset of data within the packet, in bits */ @@ -38,6 +40,7 @@ struct packet_index { size_t content_size; /* content size, in bits */ uint64_t timestamp_begin; uint64_t timestamp_end; + uint32_t events_discarded; }; /* @@ -58,8 +61,11 @@ struct ctf_stream_pos { char *base; /* mmap base address */ ssize_t offset; /* offset from base, in bits. EOF for end of file. */ size_t cur_index; /* current index in packet index */ + void (*move_pos_slow)(struct ctf_stream_pos *pos, size_t offset, + int whence); /* function called to switch packet */ int dummy; /* dummy position, for length calculation */ + struct bt_stream_callbacks *cb; /* Callbacks registered for iterator. */ }; static inline @@ -187,10 +193,13 @@ void ctf_pos_get_event(struct ctf_stream_pos *pos) if (pos->offset == pos->content_size) { printf_debug("ctf_move_pos_slow (before call): %zd\n", pos->offset); - ctf_move_pos_slow(pos, 0, SEEK_CUR); + pos->move_pos_slow(pos, 0, SEEK_CUR); printf_debug("ctf_move_pos_slow (after call): %zd\n", pos->offset); } } +void ctf_print_timestamp(FILE *fp, struct ctf_stream *stream, + uint64_t timestamp); + #endif /* _BABELTRACE_CTF_TYPES_H */