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 int equivalent(TracerConfig &that);
56 void save_data(KeyFrame *keyframe);
57 void read_data(KeyFrame *keyframe);
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);
78 TracePoint(int x, int y) {
79 this->x = x; this->y = y;
84 class TracePoints : public ArrayList<TracePoint>
88 void add(int x, int y) {
89 TracePoint *np = &append();
92 void clear() { remove_all(); }
96 class Tracer : public PluginVClient
99 Tracer(PluginServer *server);
101 // required for all realtime plugins
102 PLUGIN_CLASS_MEMBERS2(TracerConfig)
105 void render_gui(void *data);
108 void save_data(KeyFrame *keyframe);
109 void read_data(KeyFrame *keyframe);
110 int process_buffer(VFrame *frame, int64_t start_position, double frame_rate);
113 void draw_point(TracerPoint *pt);
116 void trace(int i0, int i1);
118 void feather(int r, double s);
119 int load_configuration1();
120 void span_keyframes(KeyFrame *src, int64_t start, int64_t end);
121 void update_parameter(TracerPoint *prev, TracerPoint *src);
122 void update_parameter(TracerConfig &prev_config, TracerConfig &src_config,
125 VFrame *edg, *msk, *frm;
130 int w, w1, h, h1, pts;
131 int ax, ay, bx, by, cx, cy;
133 int color_model, bpp;
134 int is_float, is_yuv, has_alpha;