4 * Copyright (C) 2011 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
26 class PhotoScaleEngine;
27 class PhotoScaleWindow;
31 #include "loadbalance.h"
33 #include "overlayframe.h"
34 #include "pluginvclient.h"
41 class PhotoScaleSizeText : public BC_TextBox
44 PhotoScaleSizeText(PhotoScaleMain *plugin,
45 PhotoScaleWindow *gui,
50 ~PhotoScaleSizeText();
52 PhotoScaleMain *plugin;
53 PhotoScaleWindow *gui;
57 class PhotoScaleFile : public BC_Radial
60 PhotoScaleFile(PhotoScaleMain *plugin,
61 PhotoScaleWindow *gui,
65 PhotoScaleMain *plugin;
66 PhotoScaleWindow *gui;
69 class PhotoScaleScan : public BC_Radial
72 PhotoScaleScan(PhotoScaleMain *plugin,
73 PhotoScaleWindow *gui,
77 PhotoScaleMain *plugin;
78 PhotoScaleWindow *gui;
81 class PhotoScaleWindow : public PluginClientWindow
84 PhotoScaleWindow(PhotoScaleMain *plugin);
87 void create_objects();
89 PhotoScaleMain *plugin;
91 PhotoScaleSizeText *output_size[2];
100 class PhotoScaleSwapExtents : public BC_Button
103 PhotoScaleSwapExtents(PhotoScaleMain *plugin,
104 PhotoScaleWindow *gui,
108 PhotoScaleMain *plugin;
109 PhotoScaleWindow *gui;
118 class PhotoScaleConfig
123 int equivalent(PhotoScaleConfig &that);
124 void copy_from(PhotoScaleConfig &that);
125 void interpolate(PhotoScaleConfig &prev,
126 PhotoScaleConfig &next,
129 int64_t current_frame);
142 class PhotoScaleEngine : public LoadServer
145 PhotoScaleEngine(PhotoScaleMain *plugin, int cpus);
148 void init_packages();
149 LoadClient* new_client();
150 LoadPackage* new_package();
151 PhotoScaleMain *plugin;
160 class PhotoScalePackage : public LoadPackage
169 class PhotoScaleUnit : public LoadClient
172 PhotoScaleUnit(PhotoScaleEngine *server);
174 void process_package(LoadPackage *package);
175 PhotoScaleEngine *server;
182 class PhotoScaleMain : public PluginVClient
185 PhotoScaleMain(PluginServer *server);
188 // required for all realtime plugins
189 int process_buffer(VFrame *frame,
190 int64_t start_position,
193 void save_data(KeyFrame *keyframe);
194 void read_data(KeyFrame *keyframe);
197 PLUGIN_CLASS_MEMBERS(PhotoScaleConfig)
199 int need_reconfigure;
202 PhotoScaleEngine *engine;
203 OverlayFrame *overlayer;