5 #include "autoconf.inc"
8 #include "floatautos.inc"
14 // CONVERTS FROM SAMPLES TO FRAMES
18 class VTrack
: public Track
21 VTrack(EDL
*edl
, Tracks
*tracks
);
25 int load_defaults(BC_Hash
*defaults
);
26 void set_default_title();
27 PluginSet
* new_plugins();
28 int is_playable(int64_t position
, int direction
);
29 int save_header(FileXML
*file
);
30 int save_derived(FileXML
*file
);
31 int load_header(FileXML
*file
, uint32_t load_flags
);
32 int load_derived(FileXML
*file
, uint32_t load_flags
);
33 int copy_settings(Track
*track
);
34 void synchronize_params(Track
*track
);
35 int64_t to_units(double position
, int round
);
36 double to_doubleunits(double position
);
37 double from_units(int64_t position
);
39 void calculate_input_transfer(Asset_GC asset
, int64_t position
, int direction
,
40 float &in_x
, float &in_y
, float &in_w
, float &in_h
,
41 float &out_x
, float &out_y
, float &out_w
, float &out_h
);
43 void calculate_output_transfer(int64_t position
, int direction
,
44 float &in_x
, float &in_y
, float &in_w
, float &in_h
,
45 float &out_x
, float &out_y
, float &out_w
, float &out_h
);
47 int vertical_span(Theme
*theme
);
55 // ====================================== initialization
57 int create_derived_objs(int flash
);
60 // ===================================== rendering
62 int get_projection(float &in_x1
,
72 int64_t real_position
,
74 // Give whether compressed data can be copied directly from the track to the output file
75 int direct_copy_possible(int64_t current_frame
, int direction
, int use_nudge
);
78 // ===================================== editing
80 int copy_derived(int64_t start
, int64_t end
, FileXML
*xml
);
81 int paste_derived(int64_t start
, int64_t end
, int64_t total_length
, FileXML
*xml
, int ¤t_channel
);
82 // use samples for paste_output
83 int paste_output(int64_t startproject
, int64_t endproject
, int64_t startsource
, int64_t endsource
, int layer
, Asset_GC asset
);
84 int clear_derived(int64_t start
, int64_t end
);
85 int copy_automation_derived(AutoConf
*auto_conf
, int64_t start
, int64_t end
, FileXML
*xml
);
86 int paste_automation_derived(int64_t start
, int64_t end
, int64_t total_length
, FileXML
*xml
, int shift_autos
, int ¤t_pan
);
87 int clear_automation_derived(AutoConf
*auto_conf
, int64_t start
, int64_t end
, int shift_autos
= 1);
88 int modify_handles(int64_t oldposition
, int64_t newposition
, int currentend
);
89 int draw_autos_derived(float view_start
, float zoom_units
, AutoConf
*auto_conf
);
90 int draw_floating_autos_derived(float view_start
, float zoom_units
, AutoConf
*auto_conf
, int flash
);
91 int select_auto_derived(float zoom_units
, float view_start
, AutoConf
*auto_conf
, int cursor_x
, int cursor_y
);
92 int move_auto_derived(float zoom_units
, float view_start
, AutoConf
*auto_conf
, int cursor_x
, int cursor_y
, int shift_down
);
93 void translate(float offset_x
, float offset_y
, int do_camera
);
95 // ===================================== for handles, titles, etc
97 // rounds up to integer frames for editing
98 int identical(int64_t sample1
, int64_t sample2
);
99 // no rounding for drawing
100 int get_dimensions(double &view_start
,
111 // c-file-style: "linux"