]> git.sesse.net Git - vlc/blob - modules/visualization/galaktos/custom_wave_types.h
Removes trailing spaces. Removes tabs.
[vlc] / modules / visualization / galaktos / custom_wave_types.h
1 #ifndef CUSTOM_WAVE_TYPES_H
2 #define CUSTOM_WAVE_TYPES_H
3 #include "common.h"
4 #include "splaytree_types.h"
5 #include "expr_types.h"
6
7 #define X_POINT_OP 0
8 #define Y_POINT_OP 1
9 #define R_POINT_OP 2
10 #define G_POINT_OP 3
11 #define B_POINT_OP 4
12 #define A_POINT_OP 5
13 #define NUM_POINT_OPS 6
14
15 typedef struct PER_POINT_EQN_T {
16   int index;
17   param_t * param;
18   gen_expr_t * gen_expr;    
19 } per_point_eqn_t;
20
21 typedef struct CUSTOM_WAVE_T {
22
23   /* Numerical id */
24   int id;
25   int per_frame_count;
26
27   /* Parameter tree associated with this custom wave */
28   splaytree_t * param_tree;
29
30
31   /* Engine variables */
32
33   double x; /* x position for per point equations */
34   double y; /* y position for per point equations */
35   double r; /* red color value */
36   double g; /* green color value */
37   double b; /* blue color value */
38   double a; /* alpha color value */
39   double * x_mesh;
40   double * y_mesh;
41   double * r_mesh;
42   double * b_mesh;
43   double * g_mesh;
44   double * a_mesh;
45   double * value1;
46   double * value2;
47   double * sample_mesh;
48
49   int enabled; /* if nonzero then wave is visible, hidden otherwise */
50   int samples; /* number of samples associated with this wave form. Usually powers of 2 */
51   double sample;
52   int bSpectrum; /* spectrum data or pcm data */
53   int bUseDots; /* draw wave as dots or lines */
54   int bDrawThick; /* draw thicker lines */
55   int bAdditive; /* add color values together */
56
57   double scaling; /* scale factor of waveform */
58   double smoothing; /* smooth factor of waveform */
59   int sep;  /* no idea what this is yet... */
60
61   /* stupid t variables */
62   double t1;
63   double t2;
64   double t3;
65   double t4;
66   double t5;
67   double t6;
68   double t7;
69   double t8;
70   double v1,v2;
71   /* Data structure to hold per frame and per point equations */
72   splaytree_t * init_cond_tree;
73   splaytree_t * per_frame_eqn_tree;
74   splaytree_t * per_point_eqn_tree;
75   splaytree_t * per_frame_init_eqn_tree;
76
77   /* Denotes the index of the last character for each string buffer */
78   int per_point_eqn_string_index;
79   int per_frame_eqn_string_index;
80   int per_frame_init_eqn_string_index;
81
82   /* String buffers for per point and per frame equations */
83   char per_point_eqn_string_buffer[STRING_BUFFER_SIZE];
84   char per_frame_eqn_string_buffer[STRING_BUFFER_SIZE];
85   char per_frame_init_eqn_string_buffer[STRING_BUFFER_SIZE];
86   /* Per point equation array */
87   gen_expr_t * per_point_eqn_array[NUM_POINT_OPS];
88  
89 } custom_wave_t;
90
91
92 #endif