Statistics
| Branch: | Revision:

chunker-player / external_chunk_transcoding.h @ 63c21257

History | View | Annotate | Download (860 Bytes)

1
#ifndef _EXTERNAL_CHUNK_TRANSCODING_H
2
#define _EXTERNAL_CHUNK_TRANSCODING_H
3

    
4
#include <stdlib.h>
5
#include <stdint.h>
6
#include <stdbool.h>
7
#include <sys/time.h>
8
#include <chunk.h>
9

    
10
#include "external_chunk.h"
11

    
12
#define CHUNK_TRANSCODING_INT_SIZE 4
13
//this should be in chunk.h and used in som's chunk_encoding.c
14
#define GRAPES_ENCODED_CHUNK_HEADER_SIZE 20
15

    
16
/**
17
 * commodity function to dump a block of bytes
18
 */
19
void print_block(const uint8_t *b, int size);
20

    
21
/**
22
 * transform a grapes chunk into an external chunk
23
 * provided the grapes chunk has the appropriate attributes section
24
 */
25
ExternalChunk *grapesChunkToExternalChunk(Chunk *gchunk);
26

    
27
/**
28
 * pack the extra information held into the external chunk structure
29
 * into a proper attributes section of a grapes chunk
30
 */
31
void *packExternalChunkToAttributes(ExternalChunk *echunk, size_t attr_size);
32

    
33

    
34
#endif