3 * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "loadbalance.h"
27 #include "pluginvclient.h"
31 enum { PT_X, PT_Y, PT_SZ };
38 TracerPoint(float x, float y);
41 class TracerPoints : public ArrayList<TracerPoint *>
45 ~TracerPoints() { remove_all_objects(); }
54 int equivalent(TracerConfig &that);
55 void copy_from(TracerConfig &that);
56 void interpolate(TracerConfig &prev, TracerConfig &next,
57 long prev_frame, long next_frame, long current_frame);
61 int add_point(float x, float y);
63 void del_point(int i);
76 TracePoint(int x, int y) {
77 this->x = x; this->y = y;
82 class TracePoints : public ArrayList<TracePoint>
86 void add(int x, int y) {
87 TracePoint *np = &append();
90 void clear() { remove_all(); }
94 class Tracer : public PluginVClient
97 Tracer(PluginServer *server);
99 // required for all realtime plugins
100 PLUGIN_CLASS_MEMBERS2(TracerConfig)
104 void save_data(KeyFrame *keyframe);
105 void read_data(KeyFrame *keyframe);
106 int process_buffer(VFrame *frame, int64_t start_position, double frame_rate);
109 void draw_point(TracerPoint *pt);
112 void trace(int i0, int i1);
114 void feather(int r, double s);
115 int load_configuration1();
117 VFrame *edg, *msk, *frm;
122 int w, w1, h, h1, pts;
123 int ax, ay, bx, by, cx, cy;
125 int color_model, bpp;
126 int is_float, is_yuv, has_alpha;