LiVES  3.0.2
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 #define FX_DATA_KEY_OMC_MACRO -3
13 
14 #define EXTRA_PARAMS_OUT 1 // Activate
15 #define EXTRA_PARAMS_IN 1 // Activated
16 
17 #define FX_DATA_PARAM_ACTIVE -1
18 
19 // struct for connecting out params to in params
20 
21 typedef struct _lives_pconnect_t lives_pconnect_t;
22 
23 
24 // when an out parameter is mapped/updated, we add it to here
25 
26 // when unmapped we delete it
27 
28 
30  int okey;
31  int omode;
32 
33  int nparams;
34 
35  // index to parameters which are to be copied (|params|)
36  int *params;
37 
38  // previous vals, so we can see when state changed
40 
41  // number of connections for each param
42  int *nconns;
43 
44  // each param is mapped to nconns[i] of these
45  int *ikey;
46  int *imode;
47  int *ipnum;
48  boolean *autoscale;
49 
50  lives_pconnect_t *next;
51 };
52 
53 
55 void pconx_add_connection(int okey, int omode, int opnum, int ikey, int imode, int ipnum, boolean autoscale);
56 
57 // free all connections (and set mainw->pconx to NULL)
58 void pconx_delete_all();
59 
60 void pconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
61 
62 void pconx_remap_mode(int key, int omode, int nmode);
63 
64 // chain any output data into fx key/mode (pull)
65 boolean pconx_chain_data(int key, int mode);
66 
67 // chain any output data into OMC Macros (push)
68 int pconx_chain_data_omc(weed_plant_t *instance, int key, int mode);
69 
70 // return list of in keys/modes/params/autoscale
71 char *pconx_list(int okey, int omode, int opnum);
72 
73 // special version for compound fx internal connections
74 boolean pconx_chain_data_internal(weed_plant_t *inst);
75 
76 
77 // alpha channels
78 
79 
80 // struct for connecting out alphas to in alphas
81 
82 typedef struct _lives_cconnect_t lives_cconnect_t;
83 
84 
85 // when an out alpha is mapped/updated, we add it to here
86 
87 // when unmapped we delete it
88 
89 
90 
92  int okey;
93  int omode;
94 
95  int nchans;
96 
97  // index to chans which are to be copied
98  int *chans;
99 
100  // number of connections for each channel
101  int *nconns;
102 
103  // each param is mapped to nconns[i] of these
104  int *ikey;
105  int *imode;
106  int *icnum;
107 
108  lives_cconnect_t *next;
109 };
110 
111 
113 void cconx_add_connection(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
114 
115 // free all connections (and set mainw->cconx to NULL)
116 void cconx_delete_all();
117 
118 void cconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
119 
120 void cconx_remap_mode(int key, int omode, int nmode);
121 
122 // chain any output data into fx key/mode
123 boolean cconx_chain_data(int key, int mode);
124 
125 // return list of in chaannels/modes/params
126 char *cconx_list(int okey, int omode, int ocnum);
127 
128 boolean cconx_chain_data_internal(weed_plant_t *ichan);
129 
130 
132 
133 void override_if_active_input(int hotkey);
134 void end_override_if_activate_output(int hotkey);
135 
137 
138 typedef struct {
139  weed_plant_t *filter;
140 
141  int okey;
142  int omode;
145  int ntabs;
146 
147  lives_cconnect_t *cconx;
148  lives_pconnect_t *pconx;
149 
150  LiVESWidget *conx_dialog;
151  LiVESWidget *acbutton;
152  LiVESWidget *apbutton;
153  LiVESWidget *disconbutton;
154 
155  LiVESWidget **clabel;
156  LiVESWidget **pclabel;
157  LiVESWidget **cfxcombo;
158  LiVESWidget **pfxcombo;
159  LiVESWidget **pcombo;
160  LiVESWidget **ccombo;
161  LiVESWidget **acheck;
162  LiVESWidget **add_button;
163  LiVESWidget **del_button;
164  LiVESWidget *allcheckc;
165  LiVESWidget *allcheck_label;
166 
167  LiVESWidget *tablec;
168  LiVESWidget *tablep;
169 
170  // table row counts
171  int trowsc;
172  int trowsp;
173 
174  // # dislay rows for each param/channel
175  int *dispc;
176  int *dispp;
177 
178  int *ikeys;
179  int *imodes;
180  int *idx;
181 
185 } lives_conx_w;
186 
187 
188 
189 
190 LiVESWidget *make_datacon_window(int key, int mode);
191 
192 int pconx_check_connection(weed_plant_t *ofilter, int opnum, int ikey, int imode, int ipnum, boolean setup, weed_plant_t **iparam_ret,
193  int *idx_ret,
194  int *okey, int *omode, int *oopnum);
195 
196 int cconx_check_connection(int ikey, int imode, int icnum, boolean setup, weed_plant_t **ichan_ret, int *idx_ret, int *okey, int *omode,
197  int *ocnum);
198 
199 
200 
201 boolean feeds_to_video_filters(int okey, int omode);
202 boolean feeds_to_audio_filters(int okey, int omode);
int * nconns
Definition: effects-data.h:42
int num_params
Definition: effects-data.h:144
LiVESWidget * tablep
Definition: effects-data.h:168
int * icnum
Definition: effects-data.h:106
LiVESWidget * disconbutton
Definition: effects-data.h:153
LiVESWidget * allcheck_label
Definition: effects-data.h:165
int * dispp
Definition: effects-data.h:176
void cconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum)
Definition: effects-data.c:1718
int num_alpha
Definition: effects-data.h:143
int omode
Definition: effects-data.h:31
void pconx_delete_all()
Definition: effects-data.c:182
LiVESWidget ** pclabel
Definition: effects-data.h:156
int * nconns
Definition: effects-data.h:101
ulong * acheck_func
Definition: effects-data.h:184
int okey
okey is 0 based
Definition: effects-data.h:30
int * params
Definition: effects-data.h:36
boolean pconx_chain_data_internal(weed_plant_t *inst)
Definition: effects-data.c:1570
ulong * dpp_func
Definition: effects-data.h:183
LiVESWidget * conx_dialog
Definition: effects-data.h:150
LiVESWidget ** acheck
Definition: effects-data.h:161
weed_plant_t * filter
Definition: effects-data.h:139
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:3431
Definition: effects-data.h:29
int * imode
Definition: effects-data.h:105
int * ikey
ikey is 0 based :: values < 0 indicate an FX_DATA_KEY_*
Definition: effects-data.h:45
void end_override_if_activate_output(int hotkey)
Definition: effects-data.c:145
lives_cconnect_t * cconx
Definition: effects-data.h:147
int * dispc
Definition: effects-data.h:175
boolean cconx_chain_data_internal(weed_plant_t *ichan)
Definition: effects-data.c:2232
int ntabs
Definition: effects-data.h:145
LiVESWidget ** clabel
Definition: effects-data.h:155
Definition: effects-data.h:138
boolean cconx_chain_data(int key, int mode)
Definition: effects-data.c:2195
void pconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum)
Definition: effects-data.c:302
LiVESWidget ** pfxcombo
Definition: effects-data.h:158
int okey
okey is 0 based
Definition: effects-data.h:92
int trowsp
Definition: effects-data.h:172
void cconx_remap_mode(int key, int omode, int nmode)
Definition: effects-data.c:1808
int * idx
Definition: effects-data.h:180
int * last_boolval
Definition: effects-data.h:39
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:658
void cconx_delete_all()
Definition: effects-data.c:1613
lives_cconnect_t * next
Definition: effects-data.h:108
int nparams
number of parameters which are linked
Definition: effects-data.h:33
LiVESWidget * acbutton
Definition: effects-data.h:151
int omode
Definition: effects-data.h:93
int * ikeys
Definition: effects-data.h:178
int * ipnum
Definition: effects-data.h:47
int * chans
Definition: effects-data.h:98
int * ikey
ikey is 0 based
Definition: effects-data.h:104
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:2017
#define ulong
Definition: main.h:137
LiVESWidget * apbutton
Definition: effects-data.h:152
int * imode
Definition: effects-data.h:46
LiVESWidget * make_datacon_window(int key, int mode)
Definition: effects-data.c:4788
LiVESWidget ** pcombo
Definition: effects-data.h:159
boolean pconx_chain_data(int key, int mode)
Definition: effects-data.c:1464
int * imodes
Definition: effects-data.h:179
boolean feeds_to_audio_filters(int okey, int omode)
Definition: effects-data.c:2297
boolean feeds_to_video_filters(int okey, int omode)
Definition: effects-data.c:2245
LiVESWidget * allcheckc
Definition: effects-data.h:164
int trowsc
Definition: effects-data.h:171
char * cconx_list(int okey, int omode, int ocnum)
Definition: effects-data.c:1688
LiVESWidget * tablec
Definition: effects-data.h:167
void pconx_remap_mode(int key, int omode, int nmode)
Definition: effects-data.c:422
int pconx_chain_data_omc(weed_plant_t *instance, int key, int mode)
Definition: effects-data.c:1398
lives_pconnect_t * pconx
Definition: effects-data.h:148
int omode
Definition: effects-data.h:142
LiVESWidget ** add_button
Definition: effects-data.h:162
char * pconx_list(int okey, int omode, int opnum)
Definition: effects-data.c:271
int nchans
number of alpha channels which are linked (|chans|)
Definition: effects-data.h:95
LiVESWidget ** cfxcombo
Definition: effects-data.h:157
ulong * dpc_func
Definition: effects-data.h:182
void override_if_active_input(int hotkey)
Definition: effects-data.c:111
int okey
Definition: effects-data.h:141
LiVESWidget ** del_button
Definition: effects-data.h:163
LiVESWidget ** ccombo
Definition: effects-data.h:160
lives_pconnect_t * next
Definition: effects-data.h:50
boolean * autoscale
Definition: effects-data.h:48
Definition: effects-data.h:91
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:3685