LiVES  2.8.9
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 
8 #define FX_DATA_WILDCARD -1000000
9 
10 #define FX_DATA_KEY_SUBTITLES -1
11 #define FX_DATA_KEY_PLAYBACK_PLUGIN -2
12 
13 #define EXTRA_PARAMS_OUT 1
14 #define EXTRA_PARAMS_IN 1
15 
16 #define FX_DATA_PARAM_ACTIVE -1
17 
18 // struct for connecting out params to in params
19 
20 typedef struct _lives_pconnect_t lives_pconnect_t;
21 
22 
23 // when an out parameter is mapped/updated, we add it to here
24 
25 // when unmapped we delete it
26 
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  // number of connections for each param
38  int *nconns;
39 
40  // each param is mapped to nconns[i] of these
41  int *ikey;
42  int *imode;
43  int *ipnum;
44  boolean *autoscale;
45 
46  lives_pconnect_t *next;
47 };
48 
49 
51 void pconx_add_connection(int okey, int omode, int opnum, int ikey, int imode, int ipnum, boolean autoscale);
52 
53 // free all connections (and set mainw->pconx to NULL)
54 void pconx_delete_all();
55 
56 void pconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
57 
58 void pconx_remap_mode(int key, int omode, int nmode);
59 
60 // chain any output data into fx key/mode
61 boolean pconx_chain_data(int key, int mode);
62 
63 // return list of in keys/modes/params/autoscale
64 char *pconx_list(int okey, int omode, int opnum);
65 
66 // special version for compound fx internal connections
67 boolean pconx_chain_data_internal(weed_plant_t *inst);
68 
69 
70 // alpha channels
71 
72 
73 // struct for connecting out alphas to in alphas
74 
75 typedef struct _lives_cconnect_t lives_cconnect_t;
76 
77 
78 // when an out alpha is mapped/updated, we add it to here
79 
80 // when unmapped we delete it
81 
82 
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 
104 
106 void cconx_add_connection(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
107 
108 // free all connections (and set mainw->cconx to NULL)
109 void cconx_delete_all();
110 
111 void cconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
112 
113 void cconx_remap_mode(int key, int omode, int nmode);
114 
115 // chain any output data into fx key/mode
116 boolean cconx_chain_data(int key, int mode);
117 
118 // return list of in chaannels/modes/params
119 char *cconx_list(int okey, int omode, int ocnum);
120 
121 boolean cconx_chain_data_internal(weed_plant_t *ichan);
122 
123 
125 
126 void override_if_active_input(int hotkey);
127 void end_override_if_activate_output(int hotkey);
128 
130 
131 typedef struct {
132  weed_plant_t *filter;
133 
134  int okey;
135  int omode;
138  int ntabs;
139 
140  lives_cconnect_t *cconx;
141  lives_pconnect_t *pconx;
142 
143  LiVESWidget *conx_dialog;
144  LiVESWidget *acbutton;
145  LiVESWidget *apbutton;
146  LiVESWidget *disconbutton;
147 
148  LiVESWidget **clabel;
149  LiVESWidget **pclabel;
150  LiVESWidget **cfxcombo;
151  LiVESWidget **pfxcombo;
152  LiVESWidget **pcombo;
153  LiVESWidget **ccombo;
154  LiVESWidget **acheck;
155  LiVESWidget **add_button;
156  LiVESWidget **del_button;
157  LiVESWidget *allcheckc;
158  LiVESWidget *allcheck_label;
159 
160  LiVESWidget *tablec;
161  LiVESWidget *tablep;
162 
163  // table row counts
164  int trowsc;
165  int trowsp;
166 
167  // # dislay rows for each param/channel
168  int *dispc;
169  int *dispp;
170 
171  int *ikeys;
172  int *imodes;
173  int *idx;
174 
178 } lives_conx_w;
179 
180 
181 
182 
183 LiVESWidget *make_datacon_window(int key, int mode);
184 
185 int pconx_check_connection(weed_plant_t *ofilter, int opnum, int ikey, int imode, int ipnum, boolean setup, weed_plant_t **iparam_ret,
186  int *idx_ret,
187  int *okey, int *omode, int *oopnum);
188 
189 int cconx_check_connection(int ikey, int imode, int icnum, boolean setup, weed_plant_t **ichan_ret, int *idx_ret, int *okey, int *omode,
190  int *ocnum);
191 
192 
193 
194 boolean feeds_to_video_filters(int okey, int omode);
195 boolean feeds_to_audio_filters(int okey, int omode);
int * nconns
Definition: effects-data.h:38
int num_params
Definition: effects-data.h:137
LiVESWidget * tablep
Definition: effects-data.h:161
int * icnum
Definition: effects-data.h:99
LiVESWidget * disconbutton
Definition: effects-data.h:146
LiVESWidget * allcheck_label
Definition: effects-data.h:158
int * dispp
Definition: effects-data.h:169
void cconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum)
Definition: effects-data.c:1596
int num_alpha
Definition: effects-data.h:136
int omode
Definition: effects-data.h:30
void pconx_delete_all()
Definition: effects-data.c:138
LiVESWidget ** pclabel
Definition: effects-data.h:149
int * nconns
Definition: effects-data.h:94
ulong * acheck_func
Definition: effects-data.h:177
int okey
okey is 0 based
Definition: effects-data.h:29
int * params
Definition: effects-data.h:35
boolean pconx_chain_data_internal(weed_plant_t *inst)
Definition: effects-data.c:1446
ulong * dpp_func
Definition: effects-data.h:176
LiVESWidget * conx_dialog
Definition: effects-data.h:143
LiVESWidget ** acheck
Definition: effects-data.h:154
weed_plant_t * filter
Definition: effects-data.h:132
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)
Definition: effects-data.c:3289
Definition: effects-data.h:28
int * imode
Definition: effects-data.h:98
int * ikey
ikey is 0 based
Definition: effects-data.h:41
void end_override_if_activate_output(int hotkey)
Definition: effects-data.c:101
lives_cconnect_t * cconx
Definition: effects-data.h:140
int * dispc
Definition: effects-data.h:168
boolean cconx_chain_data_internal(weed_plant_t *ichan)
Definition: effects-data.c:2114
int ntabs
Definition: effects-data.h:138
LiVESWidget ** clabel
Definition: effects-data.h:148
Definition: effects-data.h:131
boolean cconx_chain_data(int key, int mode)
Definition: effects-data.c:2076
void pconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum)
Definition: effects-data.c:258
LiVESWidget ** pfxcombo
Definition: effects-data.h:151
int okey
okey is 0 based
Definition: effects-data.h:85
int trowsp
Definition: effects-data.h:165
void cconx_remap_mode(int key, int omode, int nmode)
Definition: effects-data.c:1686
int * idx
Definition: effects-data.h:173
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:599
void cconx_delete_all()
Definition: effects-data.c:1490
lives_cconnect_t * next
Definition: effects-data.h:101
int nparams
number of parameters which are linked
Definition: effects-data.h:32
LiVESWidget * acbutton
Definition: effects-data.h:144
int omode
Definition: effects-data.h:86
int * ikeys
Definition: effects-data.h:171
int * ipnum
Definition: effects-data.h:43
int * chans
Definition: effects-data.h:91
int * ikey
ikey is 0 based
Definition: effects-data.h:97
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
Definition: effects-data.c:1902
#define ulong
Definition: main.h:156
LiVESWidget * apbutton
Definition: effects-data.h:145
int * imode
Definition: effects-data.h:42
LiVESWidget * make_datacon_window(int key, int mode)
Definition: effects-data.c:4678
LiVESWidget ** pcombo
Definition: effects-data.h:152
boolean pconx_chain_data(int key, int mode)
Definition: effects-data.c:1337
int * imodes
Definition: effects-data.h:172
boolean feeds_to_audio_filters(int okey, int omode)
Definition: effects-data.c:2181
boolean feeds_to_video_filters(int okey, int omode)
Definition: effects-data.c:2128
LiVESWidget * allcheckc
Definition: effects-data.h:157
int trowsc
Definition: effects-data.h:164
char * cconx_list(int okey, int omode, int ocnum)
Definition: effects-data.c:1566
LiVESWidget * tablec
Definition: effects-data.h:160
void pconx_remap_mode(int key, int omode, int nmode)
Definition: effects-data.c:359
lives_pconnect_t * pconx
Definition: effects-data.h:141
int omode
Definition: effects-data.h:135
LiVESWidget ** add_button
Definition: effects-data.h:155
char * pconx_list(int okey, int omode, int opnum)
Definition: effects-data.c:224
int nchans
number of alpha channels which are linked (|chans|)
Definition: effects-data.h:88
LiVESWidget ** cfxcombo
Definition: effects-data.h:150
ulong * dpc_func
Definition: effects-data.h:175
void override_if_active_input(int hotkey)
Definition: effects-data.c:68
int okey
Definition: effects-data.h:134
LiVESWidget ** del_button
Definition: effects-data.h:156
LiVESWidget ** ccombo
Definition: effects-data.h:153
lives_pconnect_t * next
Definition: effects-data.h:46
boolean * autoscale
Definition: effects-data.h:44
Definition: effects-data.h:84
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)
Definition: effects-data.c:3541