Statistics
| Branch: | Revision:

grapes / include / chunk.h @ b9e0d721

History | View | Annotate | Download (1.11 KB)

1
#ifndef CHUNK_H
2
#define CHUNK_H
3

    
4
/** 
5
 * @file chunk.h
6
 *
7
 * @brief Chunk structure.
8
 * Describes the structure of the chunk
9
 *
10
 */
11

    
12
/**
13
 * Structure describing a chunk. This is part of the 
14
 * public API
15
 */
16
typedef struct chunk {
17
   /**
18
    * Chunk ID. Should be unique in a stream, and is generally
19
    * an integer used as a sequence number.
20
    */
21
   int id;
22
   /**
23
    * Size of the data, in byte.
24
    */
25
   int size;
26
   /**
27
    * Pointer to a buffer containing the chunk payload.
28
    */
29
   uint8_t *data;
30
   /**
31
    * Chunk timestamp (can be the timestamp of the first frame in
32
    * the chunk, the chunk generation time, or something else).
33
    */
34
   uint64_t timestamp;
35
   /**
36
    * Pointer to an opaque structure containing some system-dependent
37
    * (or scheduler-dependent) data: for example, it can contain some
38
    * information from the video header, the ``chunk importance'' (in case
39
    * of media awareness and/or if layered encoding is used), the scheduling
40
    * deadline of the chunk, and so on...
41
    */
42
   void *attributes;
43
   /**
44
    * Size of the attributes, in byte.
45
    */
46
   int attributes_size;
47
} Chunk;
48
#endif