Line | |
---|
1 | #ifndef _LWCLIP_H_ |
---|
2 | #define _LWCLIP_H_ |
---|
3 | |
---|
4 | class lwClipStill |
---|
5 | { |
---|
6 | public: |
---|
7 | lwClipStill() |
---|
8 | { |
---|
9 | name = 0; |
---|
10 | } |
---|
11 | ~lwClipStill() |
---|
12 | { |
---|
13 | if (name) free(name); |
---|
14 | } |
---|
15 | char *name; |
---|
16 | }; |
---|
17 | |
---|
18 | class lwClipSeq |
---|
19 | { |
---|
20 | public: |
---|
21 | lwClipSeq() |
---|
22 | { |
---|
23 | prefix = 0; |
---|
24 | suffix = 0; |
---|
25 | } |
---|
26 | ~lwClipSeq() |
---|
27 | { |
---|
28 | if (prefix) free(prefix); |
---|
29 | if (suffix) free(suffix); |
---|
30 | } |
---|
31 | char *prefix; /* filename before sequence digits */ |
---|
32 | char *suffix; /* after digits, e.g. extensions */ |
---|
33 | int digits; |
---|
34 | int flags; |
---|
35 | int offset; |
---|
36 | int start; |
---|
37 | int end; |
---|
38 | }; |
---|
39 | |
---|
40 | class lwClipAnim |
---|
41 | { |
---|
42 | public: |
---|
43 | lwClipAnim() |
---|
44 | { |
---|
45 | name = 0; |
---|
46 | server = 0; |
---|
47 | data = 0; |
---|
48 | } |
---|
49 | ~lwClipAnim() |
---|
50 | { |
---|
51 | if (name) free(name); |
---|
52 | if (server) free(server); |
---|
53 | if (data) free(data); |
---|
54 | } |
---|
55 | char *name; |
---|
56 | char *server; /* anim loader plug-in */ |
---|
57 | void *data; |
---|
58 | }; |
---|
59 | |
---|
60 | class lwClipXRef |
---|
61 | { |
---|
62 | public: |
---|
63 | lwClipXRef() |
---|
64 | { |
---|
65 | string = 0; |
---|
66 | clip = 0; |
---|
67 | } |
---|
68 | ~lwClipXRef() |
---|
69 | { |
---|
70 | if (string) free(string); |
---|
71 | } |
---|
72 | |
---|
73 | char *string; |
---|
74 | int index; |
---|
75 | class lwClip *clip; |
---|
76 | }; |
---|
77 | |
---|
78 | class lwClipCycle { |
---|
79 | public: |
---|
80 | lwClipCycle() |
---|
81 | { |
---|
82 | name = 0; |
---|
83 | } |
---|
84 | ~lwClipCycle() |
---|
85 | { |
---|
86 | if (name) free(name); |
---|
87 | } |
---|
88 | char *name; |
---|
89 | int lo; |
---|
90 | int hi; |
---|
91 | }; |
---|
92 | |
---|
93 | class lwClip { |
---|
94 | public: |
---|
95 | lwClip() |
---|
96 | { |
---|
97 | source.still = 0; |
---|
98 | contrast.val = 1.0f; |
---|
99 | brightness.val = 1.0f; |
---|
100 | saturation.val = 1.0f; |
---|
101 | gamma.val = 1.0f; |
---|
102 | } |
---|
103 | |
---|
104 | ~lwClip() |
---|
105 | { |
---|
106 | unsigned int i; |
---|
107 | for (i=0; i < ifilters.size(); delete ifilters[i++]); |
---|
108 | for (i=0; i < pfilters.size(); delete pfilters[i++]); |
---|
109 | |
---|
110 | if (source.still) |
---|
111 | { |
---|
112 | switch (type) |
---|
113 | { |
---|
114 | case ID_STIL: |
---|
115 | delete source.still; |
---|
116 | break; |
---|
117 | case ID_ISEQ: |
---|
118 | delete source.seq; |
---|
119 | break; |
---|
120 | case ID_ANIM: |
---|
121 | delete source.anim; |
---|
122 | break; |
---|
123 | case ID_XREF: |
---|
124 | delete source.xref; |
---|
125 | break; |
---|
126 | case ID_STCC: |
---|
127 | delete source.cycle; |
---|
128 | break; |
---|
129 | default: |
---|
130 | ; |
---|
131 | } |
---|
132 | } |
---|
133 | } |
---|
134 | int index; |
---|
135 | unsigned int type; /* ID_STIL, ID_ISEQ, etc. */ |
---|
136 | union { |
---|
137 | lwClipStill *still; |
---|
138 | lwClipSeq *seq; |
---|
139 | lwClipAnim *anim; |
---|
140 | lwClipXRef *xref; |
---|
141 | lwClipCycle *cycle; |
---|
142 | } source; |
---|
143 | float start_time; |
---|
144 | float duration; |
---|
145 | float frame_rate; |
---|
146 | lwEParam contrast; |
---|
147 | lwEParam brightness; |
---|
148 | lwEParam saturation; |
---|
149 | lwEParam hue; |
---|
150 | lwEParam gamma; |
---|
151 | int negative; |
---|
152 | vplugins ifilters; /* linked list of image filters */ |
---|
153 | vplugins pfilters; /* linked list of pixel filters */ |
---|
154 | }; |
---|
155 | |
---|
156 | typedef vector<lwClip*> vclips; |
---|
157 | |
---|
158 | #endif // _LWCLIP_H_ |
---|
159 | |
---|
Note: See
TracBrowser
for help on using the repository browser.