ac2062edc7a7002c7bbc57fbd1a75b4d044c145c
[platform/upstream/gst-plugins-good.git] / gst / flx / flx_fmt.h
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20
21 #ifndef __GST_FLX_FMT__H__
22 #define __GST_FLX_FMT_H__
23
24 #include <gst/gst.h>
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29
30 enum Flx_TypeChunk
31 {
32         /* frame chunks */
33         FLX_PREFIX_TYPE = 0xf100,
34         FLX_SCRIPT_CHUNK        = 0xf1e0,
35         FLX_FRAME_TYPE          = 0xf1fa,
36         FLX_SEGMENT_TABLE       = 0xf1fb,
37         FLX_HUFFMAN_TABLE       = 0xf1fc,
38
39         /* sub chunks */
40         FLX_CEL_DATA            = 3,
41         FLX_COLOR256            = 4,
42         FLX_SS2                 = 7,
43         FLX_COLOR64             = 11,
44         FLX_LC                  = 12,
45         FLX_BLACK               = 13,
46         FLX_BRUN                = 15,
47         FLX_COPY                = 16,
48         FLX_MINI                = 18,
49         FLX_DTA_RUN             = 25,
50         FLX_DTA_COPY            = 26,
51         FLX_DTA_LC              = 27,
52         FLX_LABEL               = 31,
53         FLX_BMP_MASK            = 32,
54         FLX_MLEV_MASK           = 33,
55         FLX_SEGMENT             = 34,
56         FLX_KEY_IMAGE           = 35,
57         FLX_KEY_PAL             = 36,
58         FLX_REGION              = 37,
59         FLX_WAVE                = 38,
60         FLX_USERSTRING          = 39,
61         FLX_RGN_MASK            = 40,
62
63 };
64
65 enum Flx_MagicHdr
66 {
67         FLX_MAGICHDR_FLI        = 0xaf11,
68         FLX_MAGICHDR_FLC        = 0xaf12,
69         FLX_MAGICHDR_FLX        = 0xaf44,
70         FLX_MAGICHDR_HUFFBWT    = 0xaf30,
71 };
72
73
74
75 typedef struct _FlxHeader 
76 {
77         guint32 size;
78         guint16 type;
79         guint16 frames;
80         guint16 width,height,depth,flags;
81         guint32 speed;
82         guint16 reserved1;
83         /* FLC */ 
84         guint32 created,creator,updated,updater;
85         guint16 aspect_dx, aspect_dy;
86         /* EGI */
87         guint16 ext_flags,keyframes,totalframes;
88         guint32 req_memory;
89         guint16 max_regions,transp_num;
90         guchar  reserved2[24];
91         /* FLC */
92         guint32 oframe1,oframe2;
93         guchar  reserved3[40];
94 } FlxHeader;
95 #define FlxHeaderSize 128
96
97 typedef struct _FlxFrameChunk
98 {
99         guint32 size;
100         guint16 id;
101 } FlxFrameChunk;
102 #define FlxFrameChunkSize 6
103
104 typedef struct _FlxPrefixChunk
105 {
106         guint16 chunks;
107         guchar  reserved[8];
108 } FlxPrefixChunk;
109
110 typedef struct _FlxSegmentTable
111 {
112         guint16 segments;
113 } FlxSegmentTable;
114
115 typedef struct _FlxHuffmanTable
116 {
117         guint16 codelength;
118         guint16 numcodes;
119         guchar  reserved[6];
120 } FlxHuffmanTable;
121
122 typedef struct _FlxFrameType
123 {
124         guint16 chunks;
125         guint16 delay;
126         guchar  reserved[6];
127 } FlxFrameType;
128 #define FlxFrameTypeSize 10
129
130
131 #ifdef __cplusplus
132 }
133 #endif /* __cplusplus */
134
135
136 #endif /* __GST_FLX_FMT_H__ */