libweed  0.6.0
 All Data Structures Files Functions Variables Typedefs Macros
weed-effects.h
Go to the documentation of this file.
1 /* WEED is free software; you can redistribute it and/or
2  modify it under the terms of the GNU Lesser General Public
3  License as published by the Free Software Foundation; either
4  version 3 of the License, or (at your option) any later version.
5 
6  Weed is distributed in the hope that it will be useful,
7  but WITHOUT ANY WARRANTY; without even the implied warranty of
8  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9  Lesser General Public License for more details.
10 
11  You should have received a copy of the GNU Lesser General Public
12  License along with this source code; if not, write to the Free Software
13  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
14 
15 
16  Weed is developed by:
17 
18  Gabriel "Salsaman" Finch - http://lives.sourceforge.net
19 
20  mainly based on LiViDO, which is developed by:
21 
22 
23  Niels Elburg - http://veejay.sf.net
24 
25  Gabriel "Salsaman" Finch - http://lives.sourceforge.net
26 
27  Denis "Jaromil" Rojo - http://freej.dyne.org
28 
29  Tom Schouten - http://zwizwa.fartit.com
30 
31  Andraz Tori - http://cvs.cinelerra.org
32 
33  reviewed with suggestions and contributions from:
34 
35  Silvano "Kysucix" Galliani - http://freej.dyne.org
36 
37  Kentaro Fukuchi - http://megaui.net/fukuchi
38 
39  Jun Iio - http://www.malib.net
40 
41  Carlo Prelz - http://www2.fluido.as:8080/
42 
43 */
44 
45 /* (C) Gabriel "Salsaman" Finch, 2005 - 2011 */
46 
47 #ifndef __WEED_EFFECTS_H__
48 #define __WEED_EFFECTS_H__
49 
50 #ifndef __WEED_H__
51 #include <weed/weed.h>
52 #endif
53 
54 #ifdef __cplusplus
55 extern "C"
56 {
57 #endif /* __cplusplus */
58 
59 /* API version * 131 */
60 #define WEED_API_VERSION 131
61 #define WEED_API_VERSION_131
62 
63 /* plant types */
64 #define WEED_PLANT_PLUGIN_INFO 1
65 #define WEED_PLANT_FILTER_CLASS 2
66 #define WEED_PLANT_FILTER_INSTANCE 3
67 #define WEED_PLANT_CHANNEL_TEMPLATE 4
68 #define WEED_PLANT_PARAMETER_TEMPLATE 5
69 #define WEED_PLANT_CHANNEL 6
70 #define WEED_PLANT_PARAMETER 7
71 #define WEED_PLANT_GUI 8
72 #define WEED_PLANT_HOST_INFO 255
73 
74 /* Parameter hints */
75 #define WEED_HINT_UNSPECIFIED 0
76 #define WEED_HINT_INTEGER 1
77 #define WEED_HINT_FLOAT 2
78 #define WEED_HINT_TEXT 3
79 #define WEED_HINT_SWITCH 4
80 #define WEED_HINT_COLOR 5
81 
82 /* Colorspaces for Color parameters */
83 #define WEED_COLORSPACE_RGB 1
84 #define WEED_COLORSPACE_RGBA 2
85 
86 /* Filter flags */
87 #define WEED_FILTER_NON_REALTIME (1<<0)
88 #define WEED_FILTER_IS_CONVERTER (1<<1)
89 #define WEED_FILTER_HINT_IS_STATELESS (1<<2)
90 #define WEED_FILTER_HINT_IS_POINT_EFFECT (1<<3) // deprecated !!
91 
92 /* API version 132 */
93 #define WEED_FILTER_HINT_MAY_THREAD (1<<5)
94 
95 /* API version 131 */
96 #define WEED_FILTER_PROCESS_LAST (1<<4)
97 
98 /* Channel template flags */
99 #define WEED_CHANNEL_REINIT_ON_SIZE_CHANGE (1<<0)
100 
101 /* API version 130 */
102 #define WEED_CHANNEL_REINIT_ON_ROWSTRIDES_CHANGE (1<<6)
103 #define WEED_CHANNEL_OUT_ALPHA_PREMULT (1<<7)
104 
105 #define WEED_CHANNEL_REINIT_ON_PALETTE_CHANGE (1<<1)
106 #define WEED_CHANNEL_CAN_DO_INPLACE (1<<2)
107 #define WEED_CHANNEL_SIZE_CAN_VARY (1<<3)
108 #define WEED_CHANNEL_PALETTE_CAN_VARY (1<<4)
109 
110 
111 /* Channel flags */
112 #define WEED_CHANNEL_ALPHA_PREMULT (1<<0)
113 
114 
115 /* Parameter template flags */
116 #define WEED_PARAMETER_REINIT_ON_VALUE_CHANGE (1<<0)
117 #define WEED_PARAMETER_VARIABLE_ELEMENTS (1<<1)
118 
119 /* API version 110 */
120 #define WEED_PARAMETER_ELEMENT_PER_CHANNEL (1<<2)
121 
122 /* Plugin errors */
123 #define WEED_ERROR_TOO_MANY_INSTANCES 6
124 #define WEED_ERROR_HARDWARE 7
125 #define WEED_ERROR_INIT_ERROR 8
126 #define WEED_ERROR_PLUGIN_INVALID 64
127 
128 /* host bootstrap function */
129 typedef weed_plant_t *(*weed_bootstrap_f)(weed_default_getter_f *value, int num_versions, int *plugin_versions);
130 
131 /* plugin only functions */
132 typedef weed_plant_t *(*weed_setup_f)(weed_bootstrap_f weed_boot);
133 typedef void (*weed_desetup_f)(void);
134 typedef int (*weed_init_f)(weed_plant_t *filter_instance);
135 typedef int (*weed_process_f)(weed_plant_t *filter_instance, weed_timecode_t timestamp);
136 typedef int (*weed_deinit_f)(weed_plant_t *filter_instance);
137 
138 /* special plugin functions */
139 typedef void (*weed_display_f)(weed_plant_t *parameter);
140 typedef int (*weed_interpolate_f)(weed_plant_t **in_values, weed_plant_t *out_value);
141 
142 /* prototype here */
144 
145 #ifdef __cplusplus
146 }
147 #endif /* __cplusplus */
148 
149 #endif // #ifndef __WEED_EFFECTS_H__
int(* weed_init_f)(weed_plant_t *filter_instance)
Definition: weed-effects.h:134
int(* weed_process_f)(weed_plant_t *filter_instance, weed_timecode_t timestamp)
Definition: weed-effects.h:135
weed_plant_t * weed_setup(weed_bootstrap_f weed_boot)
weed_plant_t *(* weed_bootstrap_f)(weed_default_getter_f *value, int num_versions, int *plugin_versions)
Definition: weed-effects.h:129
void(* weed_display_f)(weed_plant_t *parameter)
Definition: weed-effects.h:139
void(* weed_desetup_f)(void)
Definition: weed-effects.h:133
int(* weed_interpolate_f)(weed_plant_t **in_values, weed_plant_t *out_value)
Definition: weed-effects.h:140
weed_leaf_t weed_plant_t
Definition: weed.h:99
int(* weed_deinit_f)(weed_plant_t *filter_instance)
Definition: weed-effects.h:136
int64_t weed_timecode_t
Definition: weed.h:119
int(* weed_default_getter_f)(weed_plant_t *plant, const char *key, int idx, void *value)
Definition: weed.h:122