4 * Copyright (C) 2008-2016 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
23 * 2020. Derivative by ReframeRT plugin for a more easy use.
24 * It uses percentage value of the speed referred to originl speed (=100%).
25 * Some old ReframeRT parameters (Stretch and denom) have not been deleted,
26 * for future development, if any.
27 * Stretch and denom variables are set to a constant value:
28 * Stretch= 1; denom= 100.00.
29 * Speed_MIN= 1.00%; Speed_MAX= 1000.00%
36 #include "bcdisplayinfo.h"
42 #include "pluginvclient.h"
44 #include "transportque.h"
47 #define RESET_DEFAULT_SETTINGS 10
55 class SpeedPcDownsample;
56 class SpeedPcInterpolate;
69 int equivalent(SpeedPcConfig &src);
70 void reset(int clear);
71 void copy_from(SpeedPcConfig &src);
72 void interpolate(SpeedPcConfig &prev,
76 int64_t current_frame);
87 class SpeedPcToggle : public BC_Radial
90 SpeedPcToggle(SpeedPc *plugin,
104 class SpeedPcText : public BC_TumbleTextBox
107 SpeedPcText(SpeedPc *plugin,
117 class SpeedPcSlider : public BC_FSlider
120 SpeedPcSlider(SpeedPc *plugin,
122 int x, int y, int w);
129 class SpeedPcClr : public BC_Button
132 SpeedPcClr(SpeedPc *plugin, SpeedPcWindow *gui,
133 int x, int y, int clear);
141 class SpeedPcStretch : public BC_Radial
144 SpeedPcStretch(SpeedPc *plugin,
153 class SpeedPcDownsample : public BC_Radial
156 SpeedPcDownsample(SpeedPc *plugin,
165 class SpeedPcInterpolate : public BC_CheckBox
168 SpeedPcInterpolate(SpeedPc *plugin,
177 class SpeedPcReset : public BC_GenericButton
180 SpeedPcReset(SpeedPc *plugin, SpeedPcWindow *gui, int x, int y);
187 class SpeedPcWindow : public PluginClientWindow
190 SpeedPcWindow(SpeedPc *plugin);
192 void create_objects();
193 void update(int clear);
195 int update_toggles();
199 SpeedPcToggle *toggle25pc;
200 SpeedPcToggle *toggle50pc;
201 SpeedPcToggle *toggle100pc;
202 SpeedPcToggle *toggle200pc;
203 SpeedPcToggle *toggle400pc;
205 SpeedPcText *speed_pc_text;
206 SpeedPcSlider *speed_pc_slider;
207 SpeedPcClr *speed_pc_clr;
208 SpeedPcStretch *stretch;
209 SpeedPcDownsample *downsample;
210 SpeedPcInterpolate *interpolate;
216 class SpeedPc : public PluginVClient
219 SpeedPc(PluginServer *server);
222 PLUGIN_CLASS_MEMBERS(SpeedPcConfig)
224 void save_data(KeyFrame *keyframe);
225 void read_data(KeyFrame *keyframe);
229 int process_buffer(VFrame *frame,
230 int64_t start_position,