Statistics
| Branch: | Revision:

grapes / src / Chunkiser / output-stream.c @ 0c461e28

History | View | Annotate | Download (455 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
static struct dechunkiser_iface *out;
10

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

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

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