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
22 #ifndef TEMPORALSWAP_H
23 #define TEMPORALSWAP_H
26 #include "pluginvclient.h"
30 class SwapFramesWindow;
31 class SwapFramesReset;
33 class SwapFramesConfig
39 int equivalent(SwapFramesConfig &that);
40 void copy_from(SwapFramesConfig &that);
41 void interpolate(SwapFramesConfig &prev,
42 SwapFramesConfig &next,
45 int64_t current_frame);
51 class SwapFramesEven : public BC_Radial
54 SwapFramesEven(SwapFrames *plugin,
55 SwapFramesWindow *gui,
60 SwapFramesWindow *gui;
64 class SwapFramesOdd : public BC_Radial
67 SwapFramesOdd(SwapFrames *plugin,
68 SwapFramesWindow *gui,
73 SwapFramesWindow *gui;
76 class SwapFramesOn : public BC_CheckBox
79 SwapFramesOn(SwapFrames *plugin, int x, int y);
84 class SwapFramesReset : public BC_GenericButton
87 SwapFramesReset(SwapFrames *plugin, SwapFramesWindow *gui, int x, int y);
91 SwapFramesWindow *gui;
95 class SwapFramesWindow : public PluginClientWindow
98 SwapFramesWindow(SwapFrames *plugin);
99 void create_objects();
102 SwapFramesEven *swap_even;
103 SwapFramesOdd *swap_odd;
105 SwapFramesReset *reset;
109 class SwapFrames : public PluginVClient
112 SwapFrames(PluginServer *server);
115 // required for all realtime plugins
116 int process_buffer(VFrame *frame,
117 int64_t start_position,
121 void save_data(KeyFrame *keyframe);
122 void read_data(KeyFrame *keyframe);
124 PLUGIN_CLASS_MEMBERS(SwapFramesConfig)
127 // Buffer out of order frames
129 int64_t buffer_position;