Statistics
| Branch: | Revision:

grapes / src / Chunkiser / output-stream.c @ 91e9c5d5

History | View | Annotate | Download (499 Bytes)

1
#include <stdint.h>
2
#include <stdlib.h>
3

    
4
#include "chunk.h"
5
#include "chunkiser.h"
6
#include "dechunkiser_iface.h"
7

    
8
extern struct dechunkiser_iface out_avf;
9
extern struct dechunkiser_iface out_raw;
10
static struct dechunkiser_iface *out;
11

    
12
struct output_stream *out_stream_init(const char *config)
13
{
14
#ifdef AVF
15
  out = &out_avf;
16
#else
17
  out = &out_raw;
18
#endif
19

    
20
  return out->open(config);
21
}
22

    
23
void chunk_write(struct output_stream *o, const struct chunk *c)
24
{
25
  out->write(o, c->id, c->data, c->size);
26
}