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
25 #include "arraylist.h"
26 #include "autoconf.inc"
28 #include "filexml.inc"
29 #include "floatautos.inc"
39 class VTrack : public Track
42 VTrack(EDL *edl, Tracks *tracks);
45 void create_objects();
46 int load_defaults(BC_Hash *defaults);
47 void set_default_title();
48 PluginSet* new_plugins();
49 int is_playable(int64_t position, int direction);
50 int save_header(FileXML *file);
51 int save_derived(FileXML *file);
52 int load_header(FileXML *file, uint32_t load_flags);
53 int load_derived(FileXML *file, uint32_t load_flags);
54 int copy_settings(Track *track);
55 void synchronize_params(Track *track);
56 int64_t to_units(double position, int round);
57 double to_doubleunits(double position);
58 double from_units(int64_t position);
60 void calculate_input_transfer(int asset_w,
73 void calculate_output_transfer(int64_t position, int direction,
74 float &in_x, float &in_y, float &in_w, float &in_h,
75 float &out_x, float &out_y, float &out_w, float &out_h);
77 int vertical_span(Theme *theme);
85 // ====================================== initialization
87 int create_derived_objs(int flash);
90 // ===================================== rendering
92 int get_projection(float &in_x1,
102 int64_t real_position,
104 // Give whether compressed data can be copied directly from the track to the output file
105 int direct_copy_possible(int64_t current_frame, int direction, int use_nudge);
108 // ===================================== editing
110 int copy_derived(int64_t start, int64_t end, FileXML *xml);
111 int paste_derived(int64_t start, int64_t end, int64_t total_length, FileXML *xml, int ¤t_channel);
112 // use samples for paste_output
113 int paste_output(int64_t startproject, int64_t endproject, int64_t startsource, int64_t endsource, int layer, Asset *asset);
114 int clear_derived(int64_t start, int64_t end);
115 int copy_automation_derived(AutoConf *auto_conf, int64_t start, int64_t end, FileXML *xml);
116 int paste_automation_derived(int64_t start, int64_t end, int64_t total_length, FileXML *xml, int shift_autos, int ¤t_pan);
117 int clear_automation_derived(AutoConf *auto_conf, int64_t start, int64_t end, int shift_autos = 1);
118 int modify_handles(int64_t oldposition, int64_t newposition, int currentend);
119 int draw_autos_derived(float view_start, float zoom_units, AutoConf *auto_conf);
120 int draw_floating_autos_derived(float view_start, float zoom_units, AutoConf *auto_conf, int flash);
121 int select_auto_derived(float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y);
122 int move_auto_derived(float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y, int shift_down);
123 void translate(float offset_x, float offset_y, int do_camera);
125 // ===================================== for handles, titles, etc
127 // rounds up to integer frames for editing
128 int identical(int64_t sample1, int64_t sample2);
129 // no rounding for drawing
130 // int get_dimensions(double &view_start,
131 // double &view_units,
132 // double &zoom_units);