00001
00002
00003
00004
00005
00006
00008 typedef enum {
00009 FILTER_NO_ERROR=0,
00010 FILTER_ERROR_MISSING_LAYER=1,
00011 FILTER_ERROR_BLANK_FRAME=2,
00012 FILTER_ERROR_MISSING_FRAME=3,
00013 FILTER_ERROR_INVALID_PALETTE_CONVERSION=4,
00014 FILTER_ERROR_UNABLE_TO_RESIZE=5,
00015 FILTER_ERROR_INVALID_PALETTE_SETTINGS=6,
00016 FILTER_ERROR_COULD_NOT_REINIT=7,
00017 FILTER_ERROR_MUST_RELOAD=8,
00018 FILTER_ERROR_NO_IN_CHANNELS=9,
00019 FILTER_ERROR_INVALID_TRACK=10,
00020 FILTER_ERROR_INTERPOLATION_FAILED=11,
00021 FILTER_ERROR_INVALID_INSTANCE=12,
00022 FILTER_ERROR_INVALID_FILTER=13,
00023 FILTER_ERROR_INVALID_INIT_EVENT=14,
00024 FILTER_ERROR_IS_AUDIO=15,
00025 FILTER_ERROR_IS_SCRAP_FILE=16,
00026
00027 FILTER_INFO_REINITED=512
00028 } lives_filter_error_t;
00029
00030
00031 weed_plant_t *get_weed_filter(int filter_idx);
00032 gchar *weed_filter_get_name(int filter_idx);
00033 gchar *make_weed_hashname(int filter_idx, gboolean fullname) WARN_UNUSED;
00034 int weed_get_idx_for_hashname (const gchar *hashname, gboolean fullname);
00035 gint enabled_in_channels (weed_plant_t *plant, gboolean count_repeats);
00036 gint enabled_out_channels (weed_plant_t *plant, gboolean count_repeats);
00037 weed_plant_t *get_enabled_channel (weed_plant_t *inst, gint which, gboolean is_in);
00038 weed_plant_t *get_mandatory_channel (weed_plant_t *filter, gint which, gboolean is_in);
00039 gboolean weed_filter_is_resizer(weed_plant_t *filt);
00040 gboolean weed_instance_is_resizer(weed_plant_t *filt);
00041
00042 gboolean is_audio_channel_in(weed_plant_t *inst, int chnum);
00043 gboolean has_video_chans_in(weed_plant_t *filter, gboolean count_opt);
00044 gboolean has_audio_chans_in(weed_plant_t *filter, gboolean count_opt);
00045 gboolean is_audio_channel_out(weed_plant_t *inst, int chnum);
00046 gboolean has_video_chans_out(weed_plant_t *filter, gboolean count_opt);
00047 gboolean has_audio_chans_out(weed_plant_t *filter, gboolean count_opt);
00048
00049 gint weed_filter_categorise (weed_plant_t *pl, int in_channels, int out_channels);
00050 gint weed_filter_subcategorise (weed_plant_t *pl, int category, gboolean count_opt);
00051 gchar *weed_category_to_text(int cat, gboolean plural);
00052 gboolean has_usable_palette(weed_plant_t *chantmpl);
00053
00054 void weed_call_init_func(weed_plant_t *instance);
00055 void weed_call_deinit_func(weed_plant_t *instance);
00056
00057 gchar *cd_to_plugin_dir(weed_plant_t *filter);
00058 gboolean weed_init_effect(int hotkey);
00059 void weed_deinit_effect(int hotkey);
00060 weed_plant_t *weed_instance_from_filter(weed_plant_t *filter);
00061 void weed_instance_ref(weed_plant_t *inst);
00062 void weed_instance_unref(weed_plant_t *inst);
00063 gint weed_reinit_effect (weed_plant_t *inst, gboolean deinit_first);
00064 void weed_reinit_all(void);
00065
00066 int num_in_params(weed_plant_t *, gboolean count_reinits, gboolean count_variable);
00067 weed_plant_t *weed_inst_in_param (weed_plant_t *inst, int param_num, gboolean skip_hidden);
00068 gboolean is_hidden_param(weed_plant_t *plant, int i);
00069 int get_nth_simple_param(weed_plant_t *plant, int pnum);
00070 int count_simple_params(weed_plant_t *plant);
00071 weed_plant_t **weed_params_create (weed_plant_t *filter, gboolean in);
00072 int get_transition_param(weed_plant_t *filter);
00073 int get_master_vol_param(weed_plant_t *filter);
00074 gboolean is_perchannel_multiw(weed_plant_t *param);
00075 gboolean has_perchannel_multiw(weed_plant_t *filter);
00076
00077
00079 gboolean interpolate_param(weed_plant_t *inst, int i, void *pchain, weed_timecode_t tc);
00080 gboolean interpolate_params(weed_plant_t *inst, void **pchains, weed_timecode_t tc);
00081
00082 void update_visual_params(lives_rfx_t *rfx, gboolean update_hidden);
00083
00084 gboolean weed_plant_serialise(int fd, weed_plant_t *plant, unsigned char **mem);
00085 weed_plant_t *weed_plant_deserialise(int fd, unsigned char **mem);
00086
00087
00089 void rec_param_change(weed_plant_t *inst, int pnum);
00090
00091 weed_plant_t *get_textparm();
00092
00093 void weed_set_blend_factor(int hotkey);
00094 gint weed_get_blend_factor(int hotkey);
00095
00096 void weed_memory_init(void);
00097
00098 void weed_load_all (void);
00099 void weed_unload_all(void);
00100 int get_next_free_key(void);
00101
00102 void weed_deinit_all(void);
00103
00104 weed_plant_t *weed_apply_effects (weed_plant_t **layers, weed_plant_t *filter_map, weed_timecode_t tc, int opwidth, int opheight, void ***pchains);
00105 lives_filter_error_t weed_apply_instance (weed_plant_t *inst, weed_plant_t *init_event, weed_plant_t **layers, int opwidth, int opheight, weed_timecode_t tc);
00106 void weed_apply_audio_effects (weed_plant_t *filter_map, float **abuf, int nbtracks, int nchans, long nsamps, gdouble arate, weed_timecode_t tc, double *vis);
00107 lives_filter_error_t weed_apply_audio_instance (weed_plant_t *init_event, float **abuf, int nbtracks, int nchans, long nsamps, gdouble arate, weed_timecode_t tc, double *vis);
00108
00109 gboolean weed_generator_start (weed_plant_t *inst);
00110 weed_plant_t *weed_layer_new_from_generator (weed_plant_t *inst, weed_timecode_t tc);
00111 void weed_generator_end (weed_plant_t *inst);
00112 gboolean weed_playback_gen_start (void);
00113 void weed_bg_generator_end (weed_plant_t *inst);
00114
00115
00117 void backup_weed_instances(void);
00118 void restore_weed_instances(void);
00119
00120
00122
00123
00124 gboolean rte_key_valid (gint key, gboolean is_userkey);
00125 gboolean rte_keymode_valid (gint key, gint mode, gboolean is_userkey);
00126 gint rte_keymode_get_filter_idx(gint key, gint mode);
00127 gchar *rte_keymode_get_filter_name (gint key, gint mode);
00128 gchar *rte_keymode_get_plugin_name(gint key, gint mode);
00129 gchar *rte_keymode_get_type (gint key, gint mode);
00130 weed_plant_t *rte_keymode_get_instance(gint key, gint mode);
00131 weed_plant_t *rte_keymode_get_filter(gint key, gint mode);
00132
00133 gboolean weed_delete_effectkey (gint key, gint mode);
00134 int weed_add_effectkey (gint key, const gchar *hashname, gboolean fullname);
00135
00136 int weed_add_effectkey_by_idx (gint key, int idx);
00137
00138 int rte_key_getmode (gint key);
00139 int rte_key_getmaxmode(gint key);
00140
00141 gboolean rte_key_setmode (gint key, gint newmode);
00142
00144 gint rte_switch_keymode (gint key, gint mode, const gchar *hashname);
00145
00146
00147
00148
00150
00151 int rte_getmodespk (void);
00152 GList *weed_get_all_names (gshort list_type);
00153 gint rte_get_numfilters(void);
00154
00156
00157
00158 void free_key_defaults(gint key, gint mode);
00159 void apply_key_defaults(weed_plant_t *inst, gint key, gint mode);
00160 void write_key_defaults(int fd, gint key, gint mode);
00161 void read_key_defaults(int fd, int nparams, int key, int mode, int version);
00162 void set_key_defaults(weed_plant_t *inst, gint key, gint mode);
00163 gboolean has_key_defaults(void);
00164
00165
00167
00168 void rte_swap_fg_bg (void);
00169
00170
00171 gint rte_bg_gen_key (void);
00172 gint rte_fg_gen_key (void);
00173
00174 gint rte_bg_gen_mode (void);
00175 gint rte_fg_gen_mode (void);
00176
00177
00178
00180
00181 char *get_weed_display_string (weed_plant_t *inst, int pnum);
00182 weed_plant_t *add_filter_deinit_events (weed_plant_t *event_list);
00183 weed_plant_t *add_filter_init_events (weed_plant_t *event_list, weed_timecode_t tc);
00184 void deinit_render_effects (void);
00185
00186 void write_filter_defaults (int fd, int idx);
00187 void read_filter_defaults(int fd);
00188
00189 void write_generator_sizes (int fd, int idx);
00190 void read_generator_sizes(int fd);
00191
00192 gint step_val(gint val, gint step);
00193
00194 void set_param_gui_readwrite (weed_plant_t *inst);
00195 void set_param_gui_readonly (weed_plant_t *inst);
00196
00197 void weed_add_plant_flags (weed_plant_t *plant, int flags);
00198
00199 void update_host_info (weed_plant_t *inst);
00200
00202 void fill_param_vals_to (weed_plant_t *paramtmpl, weed_plant_t *param, int pnum, int hint, int index);
00203
00204
00205
00206
00207 #define WEED_PLANT_IS_PLUGIN_INFO(plant) (weed_get_plant_type(plant)==WEED_PLANT_PLUGIN_INFO?1:0)
00208 #define WEED_PLANT_IS_HOST_INFO(plant) (weed_get_plant_type(plant)==WEED_PLANT_HOST_INFO?1:0)
00209 #define WEED_PLANT_IS_FILTER_CLASS(plant) (weed_get_plant_type(plant)==WEED_PLANT_FILTER_CLASS?1:0)
00210 #define WEED_PLANT_IS_FILTER_INSTANCE(plant) (weed_get_plant_type(plant)==WEED_PLANT_FILTER_INSTANCE?1:0)
00211 #define WEED_PLANT_IS_CHANNEL(plant) (weed_get_plant_type(plant)==WEED_PLANT_CHANNEL?1:0)
00212 #define WEED_PLANT_IS_CHANNEL_TEMPLATE(plant) (weed_get_plant_type(plant)==WEED_PLANT_CHANNEL_TEMPLATE?1:0)
00213 #define WEED_PLANT_IS_PARAMETER(plant) (weed_get_plant_type(plant)==WEED_PLANT_PARAMETER?1:0)
00214 #define WEED_PLANT_IS_PARAMETER_TEMPLATE(plant) (weed_get_plant_type(plant)==WEED_PLANT_PARAMETER_TEMPLATE?1:0)
00215 #define WEED_PLANT_IS_GUI(plant) (weed_get_plant_type(plant)==WEED_PLANT_GUI?1:0)
00216
00217