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);
40 void update_parameter(TracerPoint *prev, TracerPoint *src);
42 class TracerPoints : public ArrayList<TracerPoint *>
46 ~TracerPoints() { remove_all_objects(); }
55 void save_data(KeyFrame *keyframe);
56 void read_data(KeyFrame *keyframe);
57 int equivalent(TracerConfig &that);
58 void copy_from(TracerConfig &that);
59 void interpolate(TracerConfig &prev, TracerConfig &next,
60 long prev_frame, long next_frame, long current_frame);
64 int add_point(float x, float y);
66 void del_point(int i);
79 TracePoint(int x, int y) {
80 this->x = x; this->y = y;
85 class TracePoints : public ArrayList<TracePoint>
89 void add(int x, int y) {
90 TracePoint *np = &append();
93 void clear() { remove_all(); }
97 class Tracer : public PluginVClient
100 Tracer(PluginServer *server);
102 // required for all realtime plugins
103 PLUGIN_CLASS_MEMBERS2(TracerConfig)
107 void save_data(KeyFrame *keyframe);
108 void read_data(KeyFrame *keyframe);
109 int process_buffer(VFrame *frame, int64_t start_position, double frame_rate);
112 void draw_point(TracerPoint *pt);
115 void trace(int i0, int i1);
117 void feather(int r, double s);
118 int load_configuration1();
119 void span_keyframes(KeyFrame *src, int64_t start, int64_t end);
120 void update_parameter(TracerPoint *prev, TracerPoint *src);
121 void update_parameter(TracerConfig &prev_config, TracerConfig &src_config,
124 VFrame *edg, *msk, *frm;
129 int w, w1, h, h1, pts;
130 int ax, ay, bx, by, cx, cy;
132 int color_model, bpp;
133 int is_float, is_yuv, has_alpha;