gst-indent
[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 {
29 #endif                          /* __cplusplus */
30
31   enum Flx_TypeChunk
32   {
33     /* frame chunks */
34     FLX_PREFIX_TYPE = 0xf100,
35     FLX_SCRIPT_CHUNK = 0xf1e0,
36     FLX_FRAME_TYPE = 0xf1fa,
37     FLX_SEGMENT_TABLE = 0xf1fb,
38     FLX_HUFFMAN_TABLE = 0xf1fc,
39
40     /* sub chunks */
41     FLX_CEL_DATA = 3,
42     FLX_COLOR256 = 4,
43     FLX_SS2 = 7,
44     FLX_COLOR64 = 11,
45     FLX_LC = 12,
46     FLX_BLACK = 13,
47     FLX_BRUN = 15,
48     FLX_COPY = 16,
49     FLX_MINI = 18,
50     FLX_DTA_RUN = 25,
51     FLX_DTA_COPY = 26,
52     FLX_DTA_LC = 27,
53     FLX_LABEL = 31,
54     FLX_BMP_MASK = 32,
55     FLX_MLEV_MASK = 33,
56     FLX_SEGMENT = 34,
57     FLX_KEY_IMAGE = 35,
58     FLX_KEY_PAL = 36,
59     FLX_REGION = 37,
60     FLX_WAVE = 38,
61     FLX_USERSTRING = 39,
62     FLX_RGN_MASK = 40,
63
64   };
65
66   enum Flx_MagicHdr
67   {
68     FLX_MAGICHDR_FLI = 0xaf11,
69     FLX_MAGICHDR_FLC = 0xaf12,
70     FLX_MAGICHDR_FLX = 0xaf44,
71     FLX_MAGICHDR_HUFFBWT = 0xaf30,
72   };
73
74
75
76   typedef struct _FlxHeader
77   {
78     guint32 size;
79     guint16 type;
80     guint16 frames;
81     guint16 width, height, depth, flags;
82     guint32 speed;
83     guint16 reserved1;
84     /* FLC */
85     guint32 created, creator, updated, updater;
86     guint16 aspect_dx, aspect_dy;
87     /* EGI */
88     guint16 ext_flags, keyframes, totalframes;
89     guint32 req_memory;
90     guint16 max_regions, transp_num;
91     guchar reserved2[24];
92     /* FLC */
93     guint32 oframe1, oframe2;
94     guchar reserved3[40];
95   } FlxHeader;
96 #define FlxHeaderSize 128
97
98   typedef struct _FlxFrameChunk
99   {
100     guint32 size;
101     guint16 id;
102   } FlxFrameChunk;
103 #define FlxFrameChunkSize 6
104
105   typedef struct _FlxPrefixChunk
106   {
107     guint16 chunks;
108     guchar reserved[8];
109   } FlxPrefixChunk;
110
111   typedef struct _FlxSegmentTable
112   {
113     guint16 segments;
114   } FlxSegmentTable;
115
116   typedef struct _FlxHuffmanTable
117   {
118     guint16 codelength;
119     guint16 numcodes;
120     guchar reserved[6];
121   } FlxHuffmanTable;
122
123   typedef struct _FlxFrameType
124   {
125     guint16 chunks;
126     guint16 delay;
127     guchar reserved[6];
128   } FlxFrameType;
129 #define FlxFrameTypeSize 10
130
131
132 #ifdef __cplusplus
133 }
134 #endif                          /* __cplusplus */
135
136
137 #endif                          /* __GST_FLX_FMT_H__ */