Revision fd1d8d92 src/Chunkiser/output-stream.c

View differences:

src/Chunkiser/output-stream.c
1 1
#include <stdint.h>
2 2
#include <stdlib.h>
3
#include <string.h>
3 4

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

  
......
11 13

  
12 14
struct output_stream *out_stream_init(const char *fname, const char *config)
13 15
{
16
  struct tag *cfg_tags;
17

  
14 18
#ifdef AVF
15 19
  out = &out_avf;
16 20
#else
17 21
  out = &out_raw;
18 22
#endif
23
  cfg_tags = config_parse(config);
24

  
25
  if (cfg_tags) {
26
    const char *type;
27

  
28
    type = config_value_str(cfg_tags, "dechunkiser");
29
    if (type && !strcmp(type, "raw")) {
30
      out = &out_raw;
31
    }
32
  }
19 33

  
20 34
  return out->open(fname, config);
21 35
}

Also available in: Unified diff