#include <babeltrace/format.h>
#include <babeltrace/context.h>
#include <babeltrace/ctf/types.h>
#include <babeltrace/format.h>
#include <babeltrace/context.h>
#include <babeltrace/ctf/types.h>
* bt_context_add_traces_recursive: Open a trace recursively
*
* Find each trace present in the subdirectory starting from the given
* bt_context_add_traces_recursive: Open a trace recursively
*
* Find each trace present in the subdirectory starting from the given
*
* Return: 0 on success, nonzero on failure.
* Unable to open toplevel: failure.
* Unable to open some subdirectory or file: warn and continue;
*/
int bt_context_add_traces_recursive(struct bt_context *ctx, const char *path,
*
* Return: 0 on success, nonzero on failure.
* Unable to open toplevel: failure.
* Unable to open some subdirectory or file: warn and continue;
*/
int bt_context_add_traces_recursive(struct bt_context *ctx, const char *path,
- const char *format_str)
+ const char *format_str,
+ void (*packet_seek)(struct stream_pos *pos,
+ size_t offset, int whence))
- node->fts_accpath, format_str);
+ node->fts_accpath, format_str,
+ packet_seek, NULL, NULL);
if (trace_id < 0) {
fprintf(stderr, "[error] [Context] opening trace \"%s\" from %s "
"for reading.\n", node->fts_accpath, path);
if (trace_id < 0) {
fprintf(stderr, "[error] [Context] opening trace \"%s\" from %s "
"for reading.\n", node->fts_accpath, path);
int ret;
sout = container_of(td_write, struct ctf_text_stream_pos,
trace_descriptor);
begin_pos.type = BT_SEEK_BEGIN;
int ret;
sout = container_of(td_write, struct ctf_text_stream_pos,
trace_descriptor);
begin_pos.type = BT_SEEK_BEGIN;
- while (bt_iter_read_event(iter, &stream, &event) == 0) {
- ret = sout->parent.event_cb(&sout->parent, stream);
+ while ((ctf_event = bt_ctf_iter_read_event(iter))) {
+ ret = sout->parent.event_cb(&sout->parent, ctf_event->parent->stream);
ctx = bt_context_create();
ret = bt_context_add_traces_recursive(ctx, opt_input_path,
ctx = bt_context_create();
ret = bt_context_add_traces_recursive(ctx, opt_input_path,