summaryrefslogtreecommitdiffstats
path: root/src/sourceoutput.h
blob: c6c0a717e4036e62740eafb86b77e514a42e5832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef foooutputstreamhfoo
#define foooutputstreamhfoo

#include <inttypes.h>
#include "source.h"
#include "sample.h"
#include "memblockq.h"

struct output_stream {
    char *name;
    uint32_t index;

    struct source *source;
    struct sample_spec spec;
    
    struct memblockq *memblockq;
    void (*kill)(struct output_stream* i, void *userdata);
    void *kill_userdata;
};

struct output_stream* output_stream_new(struct source *s, struct sample_spec *spec, const char *name);
void output_stream_free(struct output_stream* o);

void output_stream_set_kill_callback(struct output_stream *i, void (*kill)(struct output_stream*i, void *userdata), void *userdata);
void output_stream_kill(struct output_stream*i);

#endif