actf 0.0.1
An acute CTF reader
Loading...
Searching...
No Matches
/home/adwe/code/actf/decoder.h
Go to the documentation of this file.
1/*
2 * This file is a part of ACTF.
3 *
4 * Copyright (C) 2024 Adam Wendelin <adwe live se>
5 *
6 * ACTF is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * ACTF is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
14 * Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with ACTF. If not, see
18 * <https://www.gnu.org/licenses/>.
19 */
20
28#ifndef ACTF_DECODER_H
29#define ACTF_DECODER_H
30
31#include "metadata.h"
32#include "event_generator.h"
33#include "event.h"
34
37
48actf_decoder *actf_decoder_init(void *data, size_t data_len, size_t evs_cap,
49 const actf_metadata *metadata);
50
52int actf_decoder_decode(actf_decoder *dec, actf_event ***evs, size_t *evs_len);
53
56
59
65
76
77#endif /* ACTF_DECODER_H */
int actf_decoder_decode(actf_decoder *dec, actf_event ***evs, size_t *evs_len)
actf_decoder * actf_decoder_init(void *data, size_t data_len, size_t evs_cap, const actf_metadata *metadata)
Initialize a decoder.
const char * actf_decoder_last_error(actf_decoder *dec)
int actf_decoder_seek_ns_from_origin(actf_decoder *dec, int64_t tstamp)
struct actf_decoder actf_decoder
A CTF2 decoder, implements an actf_event_generator.
Definition decoder.h:36
struct actf_event_generator actf_decoder_to_generator(actf_decoder *dec)
Create an event generator based on a decoder.
void actf_decoder_free(actf_decoder *dec)
Free a decoder.
Event related methods.
struct actf_event actf_event
An event.
Definition event.h:35
Event generator API.
A CTF2 metadata representation.
struct actf_metadata actf_metadata
A CTF2 metadata.
Definition metadata.h:49
An event generator.
Definition event_generator.h:93