libweed 0.0.3
|
00001 /* WEED is free software; you can redistribute it and/or 00002 modify it under the terms of the GNU Lesser General Public 00003 License as published by the Free Software Foundation; either 00004 version 3 of the License, or (at your option) any later version. 00005 00006 Weed is distributed in the hope that it will be useful, 00007 but WITHOUT ANY WARRANTY; without even the implied warranty of 00008 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00009 Lesser General Public License for more details. 00010 00011 You should have received a copy of the GNU Lesser General Public 00012 License along with this source code; if not, write to the Free Software 00013 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00014 00015 00016 Weed is developed by: 00017 00018 Gabriel "Salsaman" Finch - http://lives.sourceforge.net 00019 00020 mainly based on LiViDO, which is developed by: 00021 00022 00023 Niels Elburg - http://veejay.sf.net 00024 00025 Gabriel "Salsaman" Finch - http://lives.sourceforge.net 00026 00027 Denis "Jaromil" Rojo - http://freej.dyne.org 00028 00029 Tom Schouten - http://zwizwa.fartit.com 00030 00031 Andraz Tori - http://cvs.cinelerra.org 00032 00033 reviewed with suggestions and contributions from: 00034 00035 Silvano "Kysucix" Galliani - http://freej.dyne.org 00036 00037 Kentaro Fukuchi - http://megaui.net/fukuchi 00038 00039 Jun Iio - http://www.malib.net 00040 00041 Carlo Prelz - http://www2.fluido.as:8080/ 00042 00043 */ 00044 00045 /* (C) Gabriel "Salsaman" Finch, 2005 - 2011 */ 00046 00047 #ifndef __WEED_EFFECTS_H__ 00048 #define __WEED_EFFECTS_H__ 00049 00050 #ifndef __WEED_H__ 00051 #include <weed/weed.h> 00052 #endif 00053 00054 #ifdef __cplusplus 00055 extern "C" 00056 { 00057 #endif /* __cplusplus */ 00058 00059 /* API version * 131 */ 00060 #define WEED_API_VERSION 131 00061 #define WEED_API_VERSION_131 00062 00063 /* plant types */ 00064 #define WEED_PLANT_PLUGIN_INFO 1 00065 #define WEED_PLANT_FILTER_CLASS 2 00066 #define WEED_PLANT_FILTER_INSTANCE 3 00067 #define WEED_PLANT_CHANNEL_TEMPLATE 4 00068 #define WEED_PLANT_PARAMETER_TEMPLATE 5 00069 #define WEED_PLANT_CHANNEL 6 00070 #define WEED_PLANT_PARAMETER 7 00071 #define WEED_PLANT_GUI 8 00072 #define WEED_PLANT_HOST_INFO 255 00073 00074 /* Parameter hints */ 00075 #define WEED_HINT_UNSPECIFIED 0 00076 #define WEED_HINT_INTEGER 1 00077 #define WEED_HINT_FLOAT 2 00078 #define WEED_HINT_TEXT 3 00079 #define WEED_HINT_SWITCH 4 00080 #define WEED_HINT_COLOR 5 00081 00082 /* Colorspaces for Color parameters */ 00083 #define WEED_COLORSPACE_RGB 1 00084 #define WEED_COLORSPACE_RGBA 2 00085 00086 /* Filter flags */ 00087 #define WEED_FILTER_NON_REALTIME (1<<0) 00088 #define WEED_FILTER_IS_CONVERTER (1<<1) 00089 #define WEED_FILTER_HINT_IS_STATELESS (1<<2) 00090 #define WEED_FILTER_HINT_IS_POINT_EFFECT (1<<3) // deprecated !! 00091 00092 /* API version 132 */ 00093 #define WEED_FILTER_HINT_MAY_THREAD (1<<5) 00094 00095 /* API version 131 */ 00096 #define WEED_FILTER_PROCESS_LAST (1<<4) 00097 00098 /* Channel flags */ 00099 #define WEED_CHANNEL_REINIT_ON_SIZE_CHANGE (1<<0) 00100 00101 /* API version 130 */ 00102 #define WEED_CHANNEL_REINIT_ON_ROWSTRIDES_CHANGE (1<<6) 00103 00104 #define WEED_CHANNEL_REINIT_ON_PALETTE_CHANGE (1<<1) 00105 #define WEED_CHANNEL_CAN_DO_INPLACE (1<<2) 00106 #define WEED_CHANNEL_SIZE_CAN_VARY (1<<3) 00107 #define WEED_CHANNEL_PALETTE_CAN_VARY (1<<4) 00108 00109 /* Parameter flags */ 00110 #define WEED_PARAMETER_REINIT_ON_VALUE_CHANGE (1<<0) 00111 #define WEED_PARAMETER_VARIABLE_ELEMENTS (1<<1) 00112 00113 /* API version 110 */ 00114 #define WEED_PARAMETER_ELEMENT_PER_CHANNEL (1<<2) 00115 00116 /* Plugin errors */ 00117 #define WEED_ERROR_TOO_MANY_INSTANCES 6 00118 #define WEED_ERROR_HARDWARE 7 00119 #define WEED_ERROR_INIT_ERROR 8 00120 #define WEED_ERROR_PLUGIN_INVALID 64 00121 00122 /* host bootstrap function */ 00123 typedef weed_plant_t *(*weed_bootstrap_f) (weed_default_getter_f *value, int num_versions, int *plugin_versions); 00124 00125 /* plugin only functions */ 00126 typedef weed_plant_t *(*weed_setup_f)(weed_bootstrap_f weed_boot); 00127 typedef void (*weed_desetup_f)(void); 00128 typedef int (*weed_init_f) (weed_plant_t *filter_instance); 00129 typedef int (*weed_process_f) (weed_plant_t *filter_instance, weed_timecode_t timestamp); 00130 typedef int (*weed_deinit_f) (weed_plant_t *filter_instance); 00131 00132 /* special plugin functions */ 00133 typedef void (*weed_display_f)(weed_plant_t *parameter); 00134 typedef int (*weed_interpolate_f)(weed_plant_t **in_values, weed_plant_t *out_value); 00135 00136 /* prototype here */ 00137 weed_plant_t *weed_setup (weed_bootstrap_f weed_boot); 00138 00139 #ifdef __cplusplus 00140 } 00141 #endif /* __cplusplus */ 00142 00143 #endif // #ifndef __WEED_EFFECTS_H__