LiVES 3.2.0
effects-data.h
Go to the documentation of this file.
1// effects-data.h
2// LiVES (lives-exe)
3// (c) G. Finch 2005 - 2012 (salsaman@gmail.com)
4// Released under the GPL 3 or later
5// see file ../COPYING for licensing details
6
7#define FX_DATA_WILDCARD -1000000
8#define FX_DATA_WILDCARD_KEEP_ACTIVATED -1000001
9
10// special input keys
11#define FX_DATA_KEY_SUBTITLES -1
12#define FX_DATA_KEY_PLAYBACK_PLUGIN -2
13#define FX_DATA_KEY_OMC_MACRO -3
14
15#define EXTRA_PARAMS_OUT 1
16#define EXTRA_PARAMS_IN 1
17
18#define FX_DATA_PARAM_ACTIVE -1
19
20// struct for connecting out params to in params
21
22typedef struct _lives_pconnect_t lives_pconnect_t;
23
24// when an out parameter is mapped/updated, we add it to here
25
26// when unmapped we delete it
27
29 int okey;
30 int omode;
31
32 int nparams;
33
34 // index to parameters which are to be copied (|params|)
35 int *params;
36
37 // previous vals, so we can see when state changed
39
40 // number of connections for each param
41 int *nconns;
42
43 // each param is mapped to nconns[i] of these
44 int *ikey;
45 int *imode;
46 int *ipnum;
47 boolean *autoscale;
48
49 lives_pconnect_t *next;
50};
51
53void pconx_add_connection(int okey, int omode, int opnum, int ikey, int imode, int ipnum, boolean autoscale);
54
55// free all connections (and set mainw->pconx to NULL)
56void pconx_delete_all();
57
58void pconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
59
60void pconx_remap_mode(int key, int omode, int nmode);
61
62// chain any output data into fx key/mode (pull)
63boolean pconx_chain_data(int key, int mode, boolean is_audio_thread);
64
65// chain any output data into OMC Macros (push)
66int pconx_chain_data_omc(weed_plant_t *instance, int key, int mode);
67
68// return list of in keys/modes/params/autoscale
69char *pconx_list(int okey, int omode, int opnum);
70
71// special version for compound fx internal connections
72boolean pconx_chain_data_internal(weed_plant_t *inst);
73
74// alpha channels
75
76// struct for connecting out alphas to in alphas
77
78typedef struct _lives_cconnect_t lives_cconnect_t;
79
80// when an out alpha is mapped/updated, we add it to here
81
82// when unmapped we delete it
83
85 int okey;
86 int omode;
87
88 int nchans;
89
90 // index to chans which are to be copied
91 int *chans;
92
93 // number of connections for each channel
94 int *nconns;
95
96 // each param is mapped to nconns[i] of these
97 int *ikey;
98 int *imode;
99 int *icnum;
100
101 lives_cconnect_t *next;
102};
103
105void cconx_add_connection(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
106
107// free all connections (and set mainw->cconx to NULL)
108void cconx_delete_all();
109
110void cconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
111
112void cconx_remap_mode(int key, int omode, int nmode);
113
114// chain any output data into fx key/mode
115boolean cconx_chain_data(int key, int mode);
116
117// return list of in chaannels/modes/params
118char *cconx_list(int okey, int omode, int ocnum);
119
120boolean cconx_chain_data_internal(weed_plant_t *ichan);
121
123
124void override_if_active_input(int hotkey);
125void end_override_if_activate_output(int hotkey);
126
128
129typedef struct {
130 weed_plant_t *filter;
131
132 int okey;
133 int omode;
136 int ntabs;
137
138 lives_cconnect_t *cconx;
139 lives_pconnect_t *pconx;
140
141 LiVESWidget *conx_dialog;
142 LiVESWidget *acbutton;
143 LiVESWidget *apbutton;
144 LiVESWidget *disconbutton;
145
146 LiVESWidget **clabel;
147 LiVESWidget **pclabel;
148 LiVESWidget **cfxcombo;
149 LiVESWidget **pfxcombo;
150 LiVESWidget **pcombo;
151 LiVESWidget **ccombo;
152 LiVESWidget **acheck;
153 LiVESWidget **add_button;
154 LiVESWidget **del_button;
155 LiVESWidget *allcheckc;
156 LiVESWidget *allcheck_label;
157
158 LiVESWidget *tablec;
159 LiVESWidget *tablep;
160
161 // table row counts
164
165 // # dislay rows for each param/channel
166 int *dispc;
167 int *dispp;
168
169 int *ikeys;
170 int *imodes;
171 int *idx;
172
177
178LiVESWidget *make_datacon_window(int key, int mode);
179
180int pconx_check_connection(weed_plant_t *ofilter, int opnum, int ikey, int imode, int ipnum, boolean setup,
181 weed_plant_t **iparam_ret,
182 int *idx_ret,
183 int *okey, int *omode, int *oopnum);
184
185int cconx_check_connection(int ikey, int imode, int icnum, boolean setup, weed_plant_t **ichan_ret, int *idx_ret, int *okey,
186 int *omode,
187 int *ocnum);
188
189boolean feeds_to_video_filters(int okey, int omode);
190boolean feeds_to_audio_filters(int okey, int omode);
191
void cconx_add_connection(int okey, int omode, int ocnum, int ikey, int imode, int icnum)
add a new connection from out_chan okey/omode/ocnum to in_chan ikey/imode/icnum
boolean feeds_to_video_filters(int okey, int omode)
boolean pconx_chain_data(int key, int mode, boolean is_audio_thread)
int cconx_check_connection(int ikey, int imode, int icnum, boolean setup, weed_plant_t **ichan_ret, int *idx_ret, int *okey, int *omode, int *ocnum)
int pconx_check_connection(weed_plant_t *ofilter, int opnum, int ikey, int imode, int ipnum, boolean setup, weed_plant_t **iparam_ret, int *idx_ret, int *okey, int *omode, int *oopnum)
void override_if_active_input(int hotkey)
Definition: effects-data.c:98
void pconx_delete_all()
Definition: effects-data.c:153
void cconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum)
void cconx_delete_all()
boolean cconx_chain_data_internal(weed_plant_t *ichan)
int pconx_chain_data_omc(weed_plant_t *instance, int key, int mode)
boolean cconx_chain_data(int key, int mode)
char * pconx_list(int okey, int omode, int opnum)
Definition: effects-data.c:231
LiVESWidget * make_datacon_window(int key, int mode)
void pconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum)
Definition: effects-data.c:262
boolean pconx_chain_data_internal(weed_plant_t *inst)
void end_override_if_activate_output(int hotkey)
Definition: effects-data.c:126
char * cconx_list(int okey, int omode, int ocnum)
void pconx_add_connection(int okey, int omode, int opnum, int ikey, int imode, int ipnum, boolean autoscale)
add a new connection from out_param okey/omode/opnum to in_param ikey/imode/ipnum
Definition: effects-data.c:618
void cconx_remap_mode(int key, int omode, int nmode)
void pconx_remap_mode(int key, int omode, int nmode)
Definition: effects-data.c:380
boolean feeds_to_audio_filters(int okey, int omode)
#define ulong
Definition: main.h:178
int okey
okey is 0 based
Definition: effects-data.h:85
lives_cconnect_t * next
Definition: effects-data.h:101
int nchans
number of alpha channels which are linked (|chans|)
Definition: effects-data.h:88
int * ikey
ikey is 0 based
Definition: effects-data.h:97
int okey
okey is 0 based
Definition: effects-data.h:29
lives_pconnect_t * next
Definition: effects-data.h:49
int nparams
number of parameters which are linked
Definition: effects-data.h:32
boolean * autoscale
Definition: effects-data.h:47
int * ikey
ikey is 0 based :: values < 0 indicate an FX_DATA_KEY_*
Definition: effects-data.h:44
ulong * acheck_func
Definition: effects-data.h:175
LiVESWidget ** clabel
Definition: effects-data.h:146
LiVESWidget ** cfxcombo
Definition: effects-data.h:148
LiVESWidget ** acheck
Definition: effects-data.h:152
LiVESWidget * conx_dialog
Definition: effects-data.h:141
LiVESWidget * allcheckc
Definition: effects-data.h:155
LiVESWidget * tablec
Definition: effects-data.h:158
LiVESWidget ** ccombo
Definition: effects-data.h:151
LiVESWidget ** pfxcombo
Definition: effects-data.h:149
LiVESWidget * allcheck_label
Definition: effects-data.h:156
ulong * dpp_func
Definition: effects-data.h:174
LiVESWidget ** del_button
Definition: effects-data.h:154
LiVESWidget ** add_button
Definition: effects-data.h:153
LiVESWidget * acbutton
Definition: effects-data.h:142
weed_plant_t * filter
Definition: effects-data.h:130
LiVESWidget * tablep
Definition: effects-data.h:159
lives_pconnect_t * pconx
Definition: effects-data.h:139
lives_cconnect_t * cconx
Definition: effects-data.h:138
LiVESWidget ** pclabel
Definition: effects-data.h:147
ulong * dpc_func
Definition: effects-data.h:173
LiVESWidget ** pcombo
Definition: effects-data.h:150
LiVESWidget * disconbutton
Definition: effects-data.h:144
LiVESWidget * apbutton
Definition: effects-data.h:143