4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "bcdisplayinfo.h"
33 #include "pluginvclient.h"
54 float time_rumble, time_rate;
55 float space_rumble, space_rate;
57 void copy_from(RumblerConfig &that);
58 int equivalent(RumblerConfig &that);
59 void interpolate(RumblerConfig &prev, RumblerConfig &next,
60 int64_t prev_frame, int64_t next_frame, int64_t current_frame);
63 class RumblerRate : public BC_TextBox
66 RumblerRate(Rumbler *plugin, RumblerWindow *gui,
67 float &value, int x, int y);
74 class RumblerSeq : public BC_TextBox
77 RumblerSeq(Rumbler *plugin, RumblerWindow *gui,
78 int &value, int x, int y);
85 class RumblerReset : public BC_GenericButton
88 RumblerReset(Rumbler *plugin, RumblerWindow *gui, int x, int y);
96 class RumblerWindow : public PluginClientWindow
99 RumblerWindow(Rumbler *plugin);
101 void create_objects();
105 RumblerRate *time_rumble, *time_rate;
106 RumblerRate *space_rumble, *space_rate;
111 class Rumbler : public PluginVClient
114 Rumbler(PluginServer *server);
117 PLUGIN_CLASS_MEMBERS(RumblerConfig)
119 int process_buffer(VFrame *frame, int64_t start_position, double frame_rate);
121 void save_data(KeyFrame *keyframe);
122 void read_data(KeyFrame *keyframe);
125 static double rumble(int64_t seq, double cur, double per, double amp);
127 VFrame *input, *output, *temp;
128 float x1,y1, x2,y2, x3,y3, x4,y4;
129 AffineEngine *engine;