LiVES 3.2.0
effects-weed.h
Go to the documentation of this file.
1// effects-weed.h
2// LiVES (lives-exe)
3// (c) G. Finch 2005 - 2016 <salsaman@gmail.com>
4// Released under the GPL 3 or later
5// see file ../COPYING for licensing details
6
7#ifndef HAS_LIVES_EFFECTS_WEED_H
8#define HAS_LIVES_EFFECTS_WEED_H
9
10#define MAX_WEED_STRLEN 65535 // soft limit for LiVES
11#define MAX_WEED_ELEMENTS 65535 // soft limit for LiVES
12
14typedef enum {
38
43
44typedef enum {
45 FX_LIST_NAME, // just name
46 FX_LIST_EXTENDED_NAME, // name + author (if dupe) + subcat + observations
47 FX_LIST_HASHNAME, // hashnames - (packagefilterauthor) author and not extra_authors
49
50// set some custom Weed values
51
52#define WEED_FLAG_HOST_READONLY (1 << 16)
53
54// plugin specific values
55#define WEED_LEAF_HOST_SUSPICIOUS "host_suspicious" // plugin is badly behaved
56
57// internal values
58#define WEED_LEAF_HOST_AUDIO_PLAYER "host_audio_player" // exported to plugins
59
60#define WEED_LEAF_HOST_ORIG_PDATA "host_orig_pdata" // set if we "steal" an alpha channel to chain
61#define WEED_LEAF_HOST_MENU_HIDE "host_menu_hide" // hide from menus
62#define WEED_LEAF_HOST_DEFAULT "host_default" // user set default
63#define WEED_LEAF_HOST_WIDTH "host_width" // user set width
64#define WEED_LEAF_HOST_HEIGHT "host_height" // user set height
65#define WEED_LEAF_HOST_FPS "host_fps" // user set fps
66#define WEED_LEAF_HOST_TAG "host_tag" // internal key mapping (for higher keys)
67#define WEED_LEAF_HOST_KEY "host_key" // internal key mapping
68#define WEED_LEAF_HOST_MODE "host_mode" // internal mode mapping
69#define WEED_LEAF_HOST_INPLACE "host_inplace" // inplace effect
70#define WEED_LEAF_HOST_DISABLED "host_disabled" // channel is disabled
71#define WEED_LEAF_HOST_TEMP_DISABLED "host_temp_dis" // channel is temp disabled
72#define WEED_LEAF_HOST_REFS "host_refs" // host ref counting
73#define WEED_LEAF_HOST_REPEATS "host_repeats" // host channel repeats
74#define WEED_LEAF_HOST_INITED "host_inited" // inited or not
75#define WEED_LEAF_HOST_PLUGIN_PATH "host_plugin_path" // plugin path
76#define WEED_LEAF_HOST_HANDLE "host_handle" // dll handle
77#define WEED_LEAF_HOST_FILTER_LIST "host_filter_list" // host usable filters
78#define WEED_LEAF_HOST_NORECORD "host_norecord" // do not record parameter changes for this instance
79#define WEED_LEAF_DUPLICATE "host_duplicate"
80#define WEED_LEAF_HOST_REINITING "host_reiniting"
81#define WEED_LEAF_HOST_UNUSED "host_unused"
82
83#define WEED_LEAF_HOST_INSTANCE "host_instance" // special value for text widgets
84#define WEED_LEAF_HOST_IDX "host_idx" // special value for text widgets
85
86#define WEED_LEAF_FREED_PLANTS "host_freed_plants" // list of freed pointers to avoid freeing dupes during unload
87
88#define WEED_LEAF_HOST_SCRAP_FILE_OFFSET "scrap_offset" // special value for scrap_file
89
90#define WEED_LEAF_HOST_IDENTIFIER "host_unique_id"
91
92#define WEED_LEAF_HOST_EASING_END "host_easing_end"
93#define WEED_LEAF_HOST_EASE_OUT_COUNT "host_ease_out_count"
94#define WEED_LEAF_AUTO_EASING "host_auto_easing"
95
96#define WEED_LEAF_RFX_STRINGS "layout_rfx_strings"
97#define WEED_LEAF_RFX_DELIM "layout_rfx_delim"
98
99#define WEED_LEAF_HOST_PLUGIN_NAME "host_plugin_name"
100
101// compound plugins
102#define WEED_LEAF_HOST_INTERNAL_CONNECTION "host_internal_connection" // for chain plugins
103#define WEED_LEAF_HOST_INTERNAL_CONNECTION_AUTOSCALE "host_internal_connection_autoscale" // for chain plugins
104#define WEED_LEAF_HOST_NEXT_INSTANCE "host_next_instance" // for chain plugins
105#define WEED_LEAF_HOST_COMPOUND_CLASS "host_compound_class" // for chain plugins
106#define WEED_LEAF_HOST_CHANNEL_CONNECTION "host_channel_connection" // special value for text widgets
107
108// custom leaf flags, may evolve
109#define LIVES_FLAG_MAINTAIN_VALUE (1 << 16)
110
111weed_plant_t *get_weed_filter(int filter_idx); // TODO: make const
113char *weed_filter_idx_get_name(int idx, boolean add_subcats, boolean add_notes) WARN_UNUSED;
114char *weed_instance_get_filter_name(weed_plant_t *inst, boolean get_compound_parent) WARN_UNUSED;
115char *make_weed_hashname(int filter_idx, boolean fullname,
116 boolean use_extra_authors, char sep, boolean spc_to_underscore) WARN_UNUSED;
117int weed_get_idx_for_hashname(const char *hashname, boolean fullname) GNU_CONST;
118int *weed_get_indices_from_template(const char *package_name, const char *filter_name, const char *author, int version);
119int weed_filter_highest_version(const char *pkg, const char *fxname, const char *auth, int *return_version);
120int enabled_in_channels(weed_plant_t *plant, boolean count_repeats);
121int enabled_out_channels(weed_plant_t *plant, boolean count_repeats);
122weed_plant_t *get_enabled_channel(weed_plant_t *inst, int which, boolean is_in);
123weed_plant_t *get_enabled_audio_channel(weed_plant_t *inst, int which, boolean is_in);
124weed_plant_t *get_mandatory_channel(weed_plant_t *filter, int which, boolean is_in);
125boolean weed_instance_is_resizer(weed_plant_t *filt);
126weed_plant_t *weed_instance_get_filter(weed_plant_t *inst, boolean get_compound_parent);
127
128#define PLUGIN_COMPOUND_EFFECTS_BUILTIN "effects/compound/"
129#define PLUGIN_COMPOUND_EFFECTS_CUSTOM "plugins/effects/compound/"
130
131int num_compound_fx(weed_plant_t
132 *plant);
133
134boolean has_non_alpha_palette(weed_plant_t *ctmpl, weed_plant_t *filter);
135boolean has_alpha_palette(weed_plant_t *ctmpl, weed_plant_t *filter);
136
137boolean is_audio_channel_in(weed_plant_t *inst, int chnum);
138boolean has_video_chans_in(weed_plant_t *filter, boolean count_opt);
139boolean has_audio_chans_in(weed_plant_t *filter, boolean count_opt);
140boolean is_audio_channel_out(weed_plant_t *inst, int chnum);
141boolean has_video_chans_out(weed_plant_t *filter, boolean count_opt);
142boolean has_audio_chans_out(weed_plant_t *filter, boolean count_opt);
143boolean is_pure_audio(weed_plant_t *filter_or_instance, boolean count_opt);
144
145boolean has_video_filters(boolean analysers_only);
146
147#ifdef HAS_LIVES_EFFECTS_H
148lives_fx_cat_t weed_filter_categorise(weed_plant_t *pl, int in_channels, int out_channels);
149lives_fx_cat_t weed_filter_subcategorise(weed_plant_t *pl, lives_fx_cat_t category, boolean count_opt);
150boolean has_audio_filters(lives_af_t af_type);
151#endif
152
153boolean has_usable_palette(weed_plant_t *chantmpl);
154int best_palette_match(int *palete_list, int num_palettes, int palette);
155
156// instances
157weed_error_t weed_call_init_func(weed_plant_t *instance);
158weed_error_t weed_call_deinit_func(weed_plant_t *instance);
159lives_filter_error_t run_process_func(weed_plant_t *instance, weed_timecode_t tc, int key);
160
161char *cd_to_plugin_dir(weed_plant_t *filter);
162boolean weed_init_effect(int hotkey);
163boolean weed_deinit_effect(int hotkey);
164weed_plant_t *weed_instance_from_filter(weed_plant_t *filter);
165int _wood_instance_ref(weed_plant_t *inst);
166int _wood_instance_unref(weed_plant_t *inst);
167weed_plant_t *_wood_instance_obtain(int line, char *file, int key, int mode);
168void weed_in_parameters_free(weed_plant_t *inst);
169void weed_in_params_free(weed_plant_t **parameters, int num_parameters);
170void add_param_connections(weed_plant_t *inst);
171lives_filter_error_t weed_reinit_effect(weed_plant_t *inst, boolean reinit_compound);
172void weed_reinit_all(void);
173
174int weed_flagset_array_count(weed_plant_t **array, boolean set_readonly);
175
176int num_alpha_channels(weed_plant_t *filter, boolean out);
177
178int num_in_params(weed_plant_t *, boolean skip_hidden, boolean skip_internal);
179int num_out_params(weed_plant_t *);
180weed_plant_t *weed_inst_in_param(weed_plant_t *inst, int param_num, boolean skip_hidden, boolean skip_internal);
181weed_plant_t *weed_inst_out_param(weed_plant_t *inst, int param_num);
182weed_plant_t *weed_filter_in_paramtmpl(weed_plant_t *filter, int param_num, boolean skip_internal);
183weed_plant_t *weed_filter_out_paramtmpl(weed_plant_t *filter, int param_num);
184boolean is_hidden_param(weed_plant_t *, int i);
185int get_nth_simple_param(weed_plant_t *, int pnum);
186int count_simple_params(weed_plant_t *);
187weed_plant_t **weed_params_create(weed_plant_t *filter, boolean in);
188int get_transition_param(weed_plant_t *filter, boolean skip_internal);
189int get_master_vol_param(weed_plant_t *filter, boolean skip_internal);
190boolean is_perchannel_multiw(weed_plant_t *param);
191boolean has_perchannel_multiw(weed_plant_t *filter);
192boolean weed_parameter_has_variable_elements_strict(weed_plant_t *inst, weed_plant_t *ptmpl);
193
195boolean interpolate_param(weed_plant_t *param, void *pchain, ticks_t tc);
196boolean interpolate_params(weed_plant_t *inst, void **pchains, ticks_t tc);
197
198int filter_mutex_lock(int key); // 0 based key
199int filter_mutex_trylock(int key); // 0 based key
200int filter_mutex_unlock(int key); // 0 based key
201
202size_t weed_plant_serialise(int fd, weed_plant_t *plant, unsigned char **mem);
203weed_plant_t *weed_plant_deserialise(int fd, unsigned char **mem, weed_plant_t *plant);
204
206void rec_param_change(weed_plant_t *inst, int pnum);
207
208// copy values for "copy_value_to" params
209int set_copy_to(weed_plant_t *inst, int pnum, lives_rfx_t *rfx, boolean update);
210
211weed_plant_t *get_textparm();
212
213void weed_set_blend_factor(int hotkey); // 0 based key
214int weed_get_blend_factor(int hotkey); // 0 based key
215
217
218void weed_load_all(void);
219void weed_unload_all(void);
220int get_next_free_key(void);
221
222void weed_deinit_all(boolean shutdown);
223
224weed_plant_t *weed_apply_effects(weed_plant_t **layers, weed_plant_t *filter_map, ticks_t tc, int opwidth, int opheight,
225 void ***pchains);
226lives_filter_error_t weed_apply_instance(weed_plant_t *inst, weed_plant_t *init_event, weed_plant_t **layers,
227 int opwidth, int opheight, ticks_t tc);
228void weed_apply_audio_effects(weed_plant_t *filter_map, weed_layer_t **, int nbtracks, int nchans, int64_t nsamps, double arate,
229 ticks_t tc, double *vis);
230void weed_apply_audio_effects_rt(weed_layer_t *alayer, ticks_t tc, boolean analysers_only, boolean is_audio_thread);
231
232lives_filter_error_t weed_apply_audio_instance(weed_plant_t *init_event, weed_layer_t **layers, int nbtracks, int nchans,
233 int64_t nsamps,
234 double arate, ticks_t tc, double *vis);
235
236int weed_generator_start(weed_plant_t *inst, int key); // 0 based key
237void weed_generator_end(weed_plant_t *inst);
238boolean weed_playback_gen_start(void);
239void weed_bg_generator_end(weed_plant_t *inst);
240void wge_inner(weed_plant_t *inst);
241
242// layers
243weed_error_t weed_leaf_copy_or_delete(weed_layer_t *dlayer, const char *key, weed_layer_t *slayer);
244weed_plant_t *weed_layer_create_from_generator(weed_plant_t *inst, ticks_t tc, int clipno);
245
247void backup_weed_instances(void);
248void restore_weed_instances(void);
249
251// WARNING !! "key" here starts at 1, "mode" starts at 0
252
253boolean rte_key_valid(int key, boolean is_userkey);
254boolean rte_keymode_valid(int key, int mode,
255 boolean is_userkey);
257int rte_keymode_get_filter_idx(int key, int mode);
258char *rte_keymode_get_filter_name(int key, int mode,
259 boolean add_notes) WARN_UNUSED;
260char *rte_keymode_get_plugin_name(int key,
261 int mode) WARN_UNUSED;
262char *rte_keymode_get_type(int key, int mode) WARN_UNUSED;
263
264#ifdef HAS_LIVES_EFFECTS_H
266#endif
267
268weed_plant_t *rte_keymode_get_instance(int key, int mode);
269weed_plant_t *rte_keymode_get_filter(int key, int mode);
270
271boolean weed_delete_effectkey(int key, int mode);
272int weed_add_effectkey(int key, const char *hashname,
273 boolean fullname);
274
275int weed_add_effectkey_by_idx(int key, int idx);
276
277int rte_key_getmode(int key);
278int rte_key_getmaxmode(int key);
279
280weed_plant_t *get_new_inst_for_keymode(int key, int mode);
281
282boolean rte_key_setmode(int key, int newmode);
283
285int rte_switch_keymode(int key, int mode, const char *hashname);
286
288
289LiVESList *weed_get_all_names(lives_fx_list_t list_type);
290int rte_get_numfilters(void);
291int weed_get_sorted_filter(int i);
292
294// key starts at 0
295
296void free_key_defaults(int key, int mode);
297void apply_key_defaults(weed_plant_t *inst, int key, int mode);
298void write_key_defaults(int fd, int key, int mode);
299boolean read_key_defaults(int fd, int nparams, int key, int mode, int version);
300void set_key_defaults(weed_plant_t *inst, int key, int mode);
301boolean has_key_defaults(void);
302
304// 0 based keys
305void rte_swap_fg_bg(void);
306
307int rte_bg_gen_key(void) GNU_PURE;
308
309int rte_fg_gen_key(void) GNU_PURE;
310
311int rte_bg_gen_mode(void) GNU_PURE;
312int rte_fg_gen_mode(void) GNU_PURE;
313
315
316char *get_weed_display_string(weed_plant_t *inst, int pnum);
317weed_plant_t *add_filter_deinit_events(weed_plant_t *event_list);
318weed_plant_t *add_filter_init_events(weed_plant_t *event_list, ticks_t tc);
319void deinit_render_effects(void);
320void deinit_easing_effects(void);
321
322boolean write_filter_defaults(int fd, int idx);
323boolean read_filter_defaults(int fd);
324
325boolean write_generator_sizes(int fd, int idx);
326boolean read_generator_sizes(int fd);
327
328//void set_param_gui_readwrite(weed_plant_t *inst);
329//void set_param_gui_readonly(weed_plant_t *inst);
330
331void update_all_host_info(void);
332
334void fill_param_vals_to(weed_plant_t *param, weed_plant_t *ptmpl, int fill_slot);
335
336//#define DEBUG_FILTER_MUTEXES
337#ifdef DEBUG_FILTER_MUTEXES
338#define filter_mutex_lock(key) {g_print ("lock %d at line %d in file %s\n",key,__LINE__,__FILE__); \
339 if (key >= 0 && key < FX_KEYS_MAX) pthread_mutex_lock(&mainw->fx_mutex[key]); g_print("done\n");}
340#define filter_mutex_unlock(key) {g_print ("unlock %d at line %d in file %s\n\n",key,__LINE__,__FILE__); \
341 if (key >= 0 && key < FX_KEYS_MAX) pthread_mutex_unlock(&mainw->fx_mutex[key]); g_print("done\n");}
342#endif
343
344//#define DEBUG_REFCOUNT
345#ifdef DEBUG_REFCOUNT
346#define weed_instance_ref(a) {g_print ("ref %p at line %d in file %s\n",a,__LINE__,__FILE__); _weed_instance_ref(a);}
347#define weed_instance_unref(a) {g_print ("unref %p at line %d in file %s\n",a,__LINE__,__FILE__); _weed_instance_unref(a);}
348#define weed_instance_obtain(a,b) _weed_instance_obtain(__LINE__, __FILE__, a, b)
349#endif
350
351int _weed_instance_ref(weed_plant_t *inst);
352int _weed_instance_unref(weed_plant_t *inst);
353weed_plant_t *_weed_instance_obtain(int line, char *file, int key, int mode);
354
355#ifndef DEBUG_REFCOUNT
356int weed_instance_ref(weed_plant_t *inst);
357int weed_instance_unref(weed_plant_t *inst);
358weed_plant_t *weed_instance_obtain(int key, int mode);
359#endif
360
361#define WEED_ERROR_NOSUCH_PLANT 65536
362
363weed_plant_t *host_info_cb(weed_plant_t *xhost_info, void *data);
364
365weed_error_t weed_leaf_set_host(weed_plant_t *plant, const char *key, uint32_t seed_type, weed_size_t num_elems, void *value);
366weed_error_t weed_leaf_delete_host(weed_plant_t *plant, const char *key);
367weed_error_t weed_plant_free_host(weed_plant_t *plant);
368weed_plant_t *weed_plant_new_host(int type);
369//weed_error_t weed_leaf_get_monitor(weed_plant_t *plant, const char *key, int32_t idx, void *value);
370
371void show_weed_stats(weed_plant_t *statsplant);
372
373#endif
weed_plant_t weed_layer_t
Definition: colourspace.h:71
lives_fx_cat_t rte_keymode_get_category(int key, int mode)
lives_fx_cat_t weed_filter_subcategorise(weed_plant_t *pl, lives_fx_cat_t category, boolean count_opt)
Definition: effects-weed.c:290
lives_fx_cat_t weed_filter_categorise(weed_plant_t *pl, int in_channels, int out_channels)
Definition: effects-weed.c:243
boolean has_audio_filters(lives_af_t af_type)
int rte_key_getmaxmode(int key)
returns highest mode which is set
boolean has_key_defaults(void)
lives_filter_error_t
filter apply errors
Definition: effects-weed.h:14
@ FILTER_SUCCESS
Definition: effects-weed.h:15
@ FILTER_ERROR_INVALID_PALETTE_CONVERSION
Definition: effects-weed.h:19
@ FILTER_ERROR_COPYING_FAILED
Definition: effects-weed.h:36
@ FILTER_ERROR_BLANK_FRAME
Definition: effects-weed.h:17
@ FILTER_ERROR_INVALID_TRACK
Definition: effects-weed.h:25
@ FILTER_ERROR_BUSY
Definition: effects-weed.h:37
@ FILTER_ERROR_MISSING_CHANNEL
Definition: effects-weed.h:32
@ FILTER_ERROR_MISSING_LAYER
Definition: effects-weed.h:16
@ FILTER_ERROR_DONT_THREAD
Definition: effects-weed.h:35
@ FILTER_INFO_REDRAWN
Definition: effects-weed.h:41
@ FILTER_ERROR_INTERPOLATION_FAILED
Definition: effects-weed.h:26
@ FILTER_ERROR_NEEDS_REINIT
Definition: effects-weed.h:23
@ FILTER_ERROR_MEMORY_ERROR
Definition: effects-weed.h:34
@ FILTER_ERROR_INVALID_INSTANCE
Definition: effects-weed.h:27
@ FILTER_ERROR_NO_IN_CHANNELS
Definition: effects-weed.h:24
@ FILTER_ERROR_INVALID_FILTER
Definition: effects-weed.h:28
@ FILTER_ERROR_COULD_NOT_REINIT
Definition: effects-weed.h:21
@ FILTER_ERROR_IS_AUDIO
Definition: effects-weed.h:30
@ FILTER_ERROR_INVALID_INIT_EVENT
Definition: effects-weed.h:29
@ FILTER_ERROR_UNABLE_TO_RESIZE
Definition: effects-weed.h:20
@ FILTER_INFO_REINITED
values >= 512 are info
Definition: effects-weed.h:40
@ FILTER_ERROR_TEMPLATE_MISMATCH
Definition: effects-weed.h:33
@ FILTER_ERROR_IS_SCRAP_FILE
Definition: effects-weed.h:31
@ FILTER_ERROR_MISSING_FRAME
Definition: effects-weed.h:18
@ FILTER_ERROR_INVALID_PLUGIN
Definition: effects-weed.h:22
void fill_param_vals_to(weed_plant_t *param, weed_plant_t *ptmpl, int fill_slot)
add default filler values to a parameter or pchange.
int count_simple_params(weed_plant_t *)
int rte_get_numfilters(void)
boolean rte_keymode_valid(int key, int mode, boolean is_userkey)
returns TRUE if a filter_class is bound to key/mode, is_userkey should be set to TRUE
int rte_key_getmode(int key)
returns current active mode for a key (or -1)
boolean read_key_defaults(int fd, int nparams, int key, int mode, int version)
weed_plant_t * get_new_inst_for_keymode(int key, int mode)
get new refcounted inst (during recording playback)
weed_plant_t * get_mandatory_channel(weed_plant_t *filter, int which, boolean is_in)
for FILTER_CLASS
Definition: effects-weed.c:548
int _weed_instance_unref(weed_plant_t *inst)
weed_plant_t * weed_instance_get_filter(weed_plant_t *inst, boolean get_compound_parent)
Definition: effects-weed.c:180
int enabled_out_channels(weed_plant_t *plant, boolean count_repeats)
void weed_load_all(void)
load effects
void rec_param_change(weed_plant_t *inst, int pnum)
record a parameter value change in our event_list
boolean has_video_filters(boolean analysers_only)
weed_error_t weed_leaf_delete_host(weed_plant_t *plant, const char *key)
void weed_deinit_all(boolean shutdown)
deinit all active effects
char * weed_filter_idx_get_package_name(int filter_idx) WARN_UNUSED
int weed_generator_start(weed_plant_t *inst, int key)
boolean interpolate_param(weed_plant_t *param, void *pchain, ticks_t tc)
parameter interpolation
boolean interpolate_params(weed_plant_t *inst, void **pchains, ticks_t tc)
int filter_mutex_trylock(int key)
Definition: effects-weed.c:74
boolean has_video_chans_in(weed_plant_t *filter, boolean count_opt)
Definition: effects-weed.c:620
int * weed_get_indices_from_template(const char *package_name, const char *filter_name, const char *author, int version)
generate a list of filter indices from a given template.
boolean read_generator_sizes(int fd)
lives_filter_error_t weed_apply_audio_instance(weed_plant_t *init_event, weed_layer_t **layers, int nbtracks, int nchans, int64_t nsamps, double arate, ticks_t tc, double *vis)
void update_all_host_info(void)
Definition: effects-weed.c:478
void weed_generator_end(weed_plant_t *inst)
boolean is_perchannel_multiw(weed_plant_t *param)
int weed_add_effectkey(int key, const char *hashname, boolean fullname)
bind a filter_class to key/mode using its hashname
weed_plant_t * get_enabled_audio_channel(weed_plant_t *inst, int which, boolean is_in)
for FILTER_INST
Definition: effects-weed.c:542
int weed_add_effectkey_by_idx(int key, int idx)
see description
boolean has_perchannel_multiw(weed_plant_t *filter)
lives_filter_error_t weed_apply_instance(weed_plant_t *inst, weed_plant_t *init_event, weed_plant_t **layers, int opwidth, int opheight, ticks_t tc)
int best_palette_match(int *palete_list, int num_palettes, int palette)
check palette vs.
Definition: effects-weed.c:868
weed_plant_t * rte_keymode_get_instance(int key, int mode)
returns refcounted filter_instance bound to key/mode (or NULL)
weed_plant_t * weed_plant_deserialise(int fd, unsigned char **mem, weed_plant_t *plant)
boolean has_alpha_palette(weed_plant_t *ctmpl, weed_plant_t *filter)
Definition: effects-weed.c:162
int num_compound_fx(weed_plant_t *plant)
return number of filters in a compound fx (1 if it is not compound) - works for filter or inst
Definition: effects-weed.c:132
int get_master_vol_param(weed_plant_t *filter, boolean skip_internal)
boolean weed_deinit_effect(int hotkey)
hotkey starts at 1
weed_plant_t * weed_filter_out_paramtmpl(weed_plant_t *filter, int param_num)
void deinit_render_effects(void)
switch off effects after render preview during rendering/render preview, we use the "keys" FX_KEYS_MA...
void weed_set_blend_factor(int hotkey)
int weed_flagset_array_count(weed_plant_t **array, boolean set_readonly)
boolean write_generator_sizes(int fd, int idx)
int weed_instance_unref(weed_plant_t *inst)
weed_plant_t * weed_layer_create_from_generator(weed_plant_t *inst, ticks_t tc, int clipno)
boolean has_audio_chans_in(weed_plant_t *filter, boolean count_opt)
Definition: effects-weed.c:640
int weed_get_blend_factor(int hotkey)
weed_error_t weed_call_init_func(weed_plant_t *instance)
weed_plant_t * _wood_instance_obtain(int line, char *file, int key, int mode)
weed_plant_t * rte_keymode_get_filter(int key, int mode)
returns filter_class bound to key/mode (or NULL)
void weed_apply_audio_effects_rt(weed_layer_t *alayer, ticks_t tc, boolean analysers_only, boolean is_audio_thread)
size_t weed_plant_serialise(int fd, weed_plant_t *plant, unsigned char **mem)
int _wood_instance_ref(weed_plant_t *inst)
boolean is_audio_channel_in(weed_plant_t *inst, int chnum)
Definition: effects-weed.c:577
boolean is_hidden_param(weed_plant_t *, int i)
returns the permanent (structural) state c.f check_hidden_gui() which sets flag values for params lin...
void weed_unload_all(void)
unload all effects
int rte_fg_gen_key(void) GNU_PURE
boolean weed_instance_is_resizer(weed_plant_t *filt)
Definition: effects-weed.c:571
weed_error_t weed_leaf_set_host(weed_plant_t *plant, const char *key, uint32_t seed_type, weed_size_t num_elems, void *value)
void weed_in_params_free(weed_plant_t **parameters, int num_parameters)
weed_plant_t * get_textparm()
for rte textmode, get first string parameter for current key/mode instance we will then forward all k...
void backup_weed_instances(void)
for multitrack
Definition: effects-weed.c:410
char * cd_to_plugin_dir(weed_plant_t *filter)
change directory to plugin installation dir so it can find any data files
weed_plant_t * weed_instance_obtain(int key, int mode)
void weed_in_parameters_free(weed_plant_t *inst)
weed_plant_t * weed_apply_effects(weed_plant_t **layers, weed_plant_t *filter_map, ticks_t tc, int opwidth, int opheight, void ***pchains)
weed_plant_t ** weed_params_create(weed_plant_t *filter, boolean in)
lives_fx_list_t
Definition: effects-weed.h:44
@ FX_LIST_HASHNAME
Definition: effects-weed.h:47
@ FX_LIST_NAME
Definition: effects-weed.h:45
@ FX_LIST_EXTENDED_NAME
Definition: effects-weed.h:46
void weed_apply_audio_effects(weed_plant_t *filter_map, weed_layer_t **, int nbtracks, int nchans, int64_t nsamps, double arate, ticks_t tc, double *vis)
int rte_keymode_get_filter_idx(int key, int mode)
returns filter_class index of key/mode (or -1 if no filter bound)
void rte_swap_fg_bg(void)
boolean weed_init_effect(int hotkey)
hotkey starts at 1
int rte_switch_keymode(int key, int mode, const char *hashname)
int filter_mutex_unlock(int key)
Definition: effects-weed.c:108
int enabled_in_channels(weed_plant_t *plant, boolean count_repeats)
weed_plant_t * get_weed_filter(int filter_idx)
int set_copy_to(weed_plant_t *inst, int pnum, lives_rfx_t *rfx, boolean update)
void add_param_connections(weed_plant_t *inst)
weed_error_t weed_call_deinit_func(weed_plant_t *instance)
void wge_inner(weed_plant_t *inst)
deinit and instance(s) for generator, reset instance mapping
int get_next_free_key(void)
next free "key" for the multitrack system
char * get_weed_display_string(weed_plant_t *inst, int pnum)
weed_plant_t * _weed_instance_obtain(int line, char *file, int key, int mode)
weed_plant_t * host_info_cb(weed_plant_t *xhost_info, void *data)
int rte_bg_gen_key(void) GNU_PURE
boolean has_non_alpha_palette(weed_plant_t *ctmpl, weed_plant_t *filter)
Definition: effects-weed.c:143
LiVESList * weed_get_all_names(lives_fx_list_t list_type)
int filter_mutex_lock(int key)
Definition: effects-weed.c:96
boolean is_pure_audio(weed_plant_t *filter_or_instance, boolean count_opt)
TRUE if audio in or out and no vid in/out.
Definition: effects-weed.c:714
char * weed_filter_idx_get_name(int idx, boolean add_subcats, boolean add_notes) WARN_UNUSED
void restore_weed_instances(void)
Definition: effects-weed.c:423
boolean weed_delete_effectkey(int key, int mode)
unbinds a filter_class from a key/mode
weed_error_t weed_plant_free_host(weed_plant_t *plant)
boolean rte_key_setmode(int key, int newmode)
set mode for a given key; if key==0 then the active key is used
boolean has_audio_chans_out(weed_plant_t *filter, boolean count_opt)
Definition: effects-weed.c:695
boolean weed_parameter_has_variable_elements_strict(weed_plant_t *inst, weed_plant_t *ptmpl)
Definition: effects-weed.c:724
void apply_key_defaults(weed_plant_t *inst, int key, int mode)
boolean write_filter_defaults(int fd, int idx)
char * rte_keymode_get_filter_name(int key, int mode, boolean add_notes) WARN_UNUSED
returns name of filter_class bound to key/mode (or "")
weed_plant_t * weed_inst_out_param(weed_plant_t *inst, int param_num)
void weed_reinit_all(void)
lives_filter_error_t run_process_func(weed_plant_t *instance, weed_timecode_t tc, int key)
weed_plant_t * weed_filter_in_paramtmpl(weed_plant_t *filter, int param_num, boolean skip_internal)
boolean has_video_chans_out(weed_plant_t *filter, boolean count_opt)
Definition: effects-weed.c:676
int _weed_instance_ref(weed_plant_t *inst)
void weed_functions_init(void)
call weed_init() to set our weed core functions
int _wood_instance_unref(weed_plant_t *inst)
int rte_bg_gen_mode(void) GNU_PURE
void deinit_easing_effects(void)
switch off effects in easing out state after playback ends during playback, some effects don't deinit...
boolean is_audio_channel_out(weed_plant_t *inst, int chnum)
Definition: effects-weed.c:656
int weed_get_idx_for_hashname(const char *hashname, boolean fullname) GNU_CONST
fullname includes author and version
char * weed_instance_get_filter_name(weed_plant_t *inst, boolean get_compound_parent) WARN_UNUSED
weed_plant_t * add_filter_deinit_events(weed_plant_t *event_list)
add effect_deinit events to an event_list
Definition: effects-weed.c:803
boolean weed_playback_gen_start(void)
boolean read_filter_defaults(int fd)
int get_transition_param(weed_plant_t *filter, boolean skip_internal)
weed_plant_t * weed_inst_in_param(weed_plant_t *inst, int param_num, boolean skip_hidden, boolean skip_internal)
int num_in_params(weed_plant_t *, boolean skip_hidden, boolean skip_internal)
boolean has_usable_palette(weed_plant_t *chantmpl)
void show_weed_stats(weed_plant_t *statsplant)
weed_error_t weed_leaf_copy_or_delete(weed_layer_t *dlayer, const char *key, weed_layer_t *slayer)
Definition: effects-weed.c:68
void set_key_defaults(weed_plant_t *inst, int key, int mode)
int weed_get_sorted_filter(int i)
int weed_filter_highest_version(const char *pkg, const char *fxname, const char *auth, int *return_version)
int rte_fg_gen_mode(void) GNU_PURE
int num_alpha_channels(weed_plant_t *filter, boolean out)
Definition: effects-weed.c:321
int num_out_params(weed_plant_t *)
weed_plant_t * get_enabled_channel(weed_plant_t *inst, int which, boolean is_in)
for FILTER_INST
Definition: effects-weed.c:536
weed_plant_t * weed_plant_new_host(int type)
weed_plant_t * add_filter_init_events(weed_plant_t *event_list, ticks_t tc)
int get_nth_simple_param(weed_plant_t *, int pnum)
char * make_weed_hashname(int filter_idx, boolean fullname, boolean use_extra_authors, char sep, boolean spc_to_underscore) WARN_UNUSED
fullname includes author and version
void weed_bg_generator_end(weed_plant_t *inst)
void write_key_defaults(int fd, int key, int mode)
char * rte_keymode_get_plugin_name(int key, int mode) WARN_UNUSED
returns name of plugin package containing filter_class (or "")
char * rte_keymode_get_type(int key, int mode) WARN_UNUSED
returns a string filter/instance type (or "")
boolean rte_key_valid(int key, boolean is_userkey)
returns TRUE if there is a filter bound to active mode of hotkey
void free_key_defaults(int key, int mode)
int weed_instance_ref(weed_plant_t *inst)
weed_plant_t * weed_instance_from_filter(weed_plant_t *filter)
lives_filter_error_t weed_reinit_effect(weed_plant_t *inst, boolean reinit_compound)
lives_fx_cat_t
Definition: effects.h:11
lives_af_t
audio filter type (any, analyser only, non analyser only)
Definition: effects.h:40
_palette * palette
interface colour settings
Definition: main.c:101
#define WARN_UNUSED
Definition: main.h:77
#define GNU_CONST
Definition: main.h:79
int64_t ticks_t
Definition: main.h:97
#define GNU_PURE
Definition: main.h:78
const char * version(void)