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
23 * 2019. Derivative by Translate plugin. This plugin works also with Proxy.
24 * It uses Percent values instead of Pixel value coordinates.
30 // the simplest plugin possible
37 #include "overlayframe.h"
38 #include "pluginvclient.h"
44 void reset(int clear);
45 int equivalent(CropConfig &that);
46 void copy_from(CropConfig &that);
47 void interpolate(CropConfig &prev,
51 int64_t current_frame);
53 float crop_l, crop_t, crop_r, crop_b;
54 float position_x, position_y;
58 class CropMain : public PluginVClient
61 CropMain(PluginServer *server);
64 // required for all realtime plugins
65 PLUGIN_CLASS_MEMBERS(CropConfig)
66 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
69 void save_data(KeyFrame *keyframe);
70 void read_data(KeyFrame *keyframe);
73 OverlayFrame *overlayer; // To translate images