Statistics
| Branch: | Revision:

chunker-player / chunk.h @ 8ed82699

History | View | Annotate | Download (1.12 KB)

1
#ifndef CHUNK_H
2
#define CHUNK_H
3

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

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