LiVES  2.4.1-svn
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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 
50 
52 void pconx_add_connection(int okey, int omode, int opnum, int ikey, int imode, int ipnum, boolean autoscale);
53 
54 // free all connections (and set mainw->pconx to NULL)
55 void pconx_delete_all();
56 
57 void pconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
58 
59 void pconx_remap_mode(int key, int omode, int nmode);
60 
61 // chain any output data into fx key/mode
62 boolean pconx_chain_data(int key, int mode);
63 
64 // return list of in keys/modes/params/autoscale
65 char *pconx_list(int okey, int omode, int opnum);
66 
67 // special version for compound fx internal connections
68 boolean pconx_chain_data_internal(weed_plant_t *inst);
69 
70 
71 // alpha channels
72 
73 
74 // struct for connecting out alphas to in alphas
75 
76 typedef struct _lives_cconnect_t lives_cconnect_t;
77 
78 
79 // when an out alpha is mapped/updated, we add it to here
80 
81 // when unmapped we delete it
82 
83 
84 
86  int okey;
87  int omode;
88 
89  int nchans;
90 
91  // index to chans which are to be copied
92  int *chans;
93 
94  // number of connections for each channel
95  int *nconns;
96 
97  // each param is mapped to nconns[i] of these
98  int *ikey;
99  int *imode;
100  int *icnum;
101 
102  lives_cconnect_t *next;
103 
104 };
105 
106 
108 void cconx_add_connection(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
109 
110 // free all connections (and set mainw->cconx to NULL)
111 void cconx_delete_all();
112 
113 void cconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum);
114 
115 void cconx_remap_mode(int key, int omode, int nmode);
116 
117 // chain any output data into fx key/mode
118 boolean cconx_chain_data(int key, int mode);
119 
120 // return list of in chaannels/modes/params
121 char *cconx_list(int okey, int omode, int ocnum);
122 
123 boolean cconx_chain_data_internal(weed_plant_t *ichan);
124 
125 
127 
128 void override_if_active_input(int hotkey);
129 void end_override_if_activate_output(int hotkey);
130 
132 
133 typedef struct {
134  weed_plant_t *filter;
135 
136  int okey;
137  int omode;
140  int ntabs;
141 
142  lives_cconnect_t *cconx;
143  lives_pconnect_t *pconx;
144 
145  LiVESWidget *conx_dialog;
146  LiVESWidget *acbutton;
147  LiVESWidget *apbutton;
148  LiVESWidget *disconbutton;
149 
150  LiVESWidget **clabel;
151  LiVESWidget **pclabel;
152  LiVESWidget **cfxcombo;
153  LiVESWidget **pfxcombo;
154  LiVESWidget **pcombo;
155  LiVESWidget **ccombo;
156  LiVESWidget **acheck;
157  LiVESWidget **add_button;
158  LiVESWidget **del_button;
159  LiVESWidget *allcheckc;
160  LiVESWidget *allcheck_label;
161 
162  LiVESWidget *tablec;
163  LiVESWidget *tablep;
164 
165  // table row counts
166  int trowsc;
167  int trowsp;
168 
169  // # dislay rows for each param/channel
170  int *dispc;
171  int *dispp;
172 
173  int *ikeys;
174  int *imodes;
175  int *idx;
176 
177  ulong *dpc_func;
178  ulong *dpp_func;
179  ulong *acheck_func;
180 
181 } lives_conx_w;
182 
183 
184 
185 
186 LiVESWidget *make_datacon_window(int key, int mode);
187 
188 int pconx_check_connection(weed_plant_t *ofilter, int opnum, int ikey, int imode, int ipnum, boolean setup, weed_plant_t **iparam_ret,
189  int *idx_ret,
190  int *okey, int *omode, int *oopnum);
191 
192 int cconx_check_connection(int ikey, int imode, int icnum, boolean setup, weed_plant_t **ichan_ret, int *idx_ret, int *okey, int *omode,
193  int *ocnum);
194 
195 
196 
197 boolean feeds_to_video_filters(int okey, int omode);
198 boolean feeds_to_audio_filters(int okey, int omode);
int * nconns
Definition: effects-data.h:38
int num_params
Definition: effects-data.h:139
LiVESWidget * tablep
Definition: effects-data.h:163
int * icnum
Definition: effects-data.h:100
LiVESWidget * disconbutton
Definition: effects-data.h:148
LiVESWidget * allcheck_label
Definition: effects-data.h:160
int * dispp
Definition: effects-data.h:171
void cconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum)
Definition: effects-data.c:1594
int num_alpha
Definition: effects-data.h:138
int omode
Definition: effects-data.h:30
void pconx_delete_all()
Definition: effects-data.c:138
LiVESWidget ** pclabel
Definition: effects-data.h:151
int * nconns
Definition: effects-data.h:95
ulong * acheck_func
Definition: effects-data.h:179
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:1445
ulong * dpp_func
Definition: effects-data.h:178
LiVESWidget * conx_dialog
Definition: effects-data.h:145
LiVESWidget ** acheck
Definition: effects-data.h:156
weed_plant_t * filter
Definition: effects-data.h:134
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:3286
Definition: effects-data.h:28
int * imode
Definition: effects-data.h:99
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:142
int * dispc
Definition: effects-data.h:170
boolean cconx_chain_data_internal(weed_plant_t *ichan)
Definition: effects-data.c:2110
int ntabs
Definition: effects-data.h:140
LiVESWidget ** clabel
Definition: effects-data.h:150
Definition: effects-data.h:133
boolean cconx_chain_data(int key, int mode)
Definition: effects-data.c:2074
void pconx_delete(int okey, int omode, int ocnum, int ikey, int imode, int icnum)
Definition: effects-data.c:257
LiVESWidget ** pfxcombo
Definition: effects-data.h:153
int okey
okey is 0 based
Definition: effects-data.h:86
int trowsp
Definition: effects-data.h:167
void cconx_remap_mode(int key, int omode, int nmode)
Definition: effects-data.c:1684
int * idx
Definition: effects-data.h:175
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:598
void cconx_delete_all()
Definition: effects-data.c:1488
lives_cconnect_t * next
Definition: effects-data.h:102
int nparams
number of parameters which are linked
Definition: effects-data.h:32
LiVESWidget * acbutton
Definition: effects-data.h:146
int omode
Definition: effects-data.h:87
int * ikeys
Definition: effects-data.h:173
int * ipnum
Definition: effects-data.h:43
int * chans
Definition: effects-data.h:92
int * ikey
ikey is 0 based
Definition: effects-data.h:98
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:1900
LiVESWidget * apbutton
Definition: effects-data.h:147
int * imode
Definition: effects-data.h:42
LiVESWidget * make_datacon_window(int key, int mode)
Definition: effects-data.c:4671
LiVESWidget ** pcombo
Definition: effects-data.h:154
boolean pconx_chain_data(int key, int mode)
Definition: effects-data.c:1336
int * imodes
Definition: effects-data.h:174
boolean feeds_to_audio_filters(int okey, int omode)
Definition: effects-data.c:2177
boolean feeds_to_video_filters(int okey, int omode)
Definition: effects-data.c:2124
LiVESWidget * allcheckc
Definition: effects-data.h:159
int trowsc
Definition: effects-data.h:166
char * cconx_list(int okey, int omode, int ocnum)
Definition: effects-data.c:1564
LiVESWidget * tablec
Definition: effects-data.h:162
void pconx_remap_mode(int key, int omode, int nmode)
Definition: effects-data.c:358
lives_pconnect_t * pconx
Definition: effects-data.h:143
int omode
Definition: effects-data.h:137
LiVESWidget ** add_button
Definition: effects-data.h:157
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:89
LiVESWidget ** cfxcombo
Definition: effects-data.h:152
ulong * dpc_func
Definition: effects-data.h:177
void override_if_active_input(int hotkey)
Definition: effects-data.c:68
int okey
Definition: effects-data.h:136
LiVESWidget ** del_button
Definition: effects-data.h:158
LiVESWidget ** ccombo
Definition: effects-data.h:155
lives_pconnect_t * next
Definition: effects-data.h:46
boolean * autoscale
Definition: effects-data.h:44
Definition: effects-data.h:85
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:3538