5 #include "autoconf.inc"
6 #include "bezierauto.inc"
7 #include "bezierautos.inc"
10 #include "floatautos.inc"
16 // CONVERTS FROM SAMPLES TO FRAMES
20 class VTrack
: public Track
23 VTrack(EDL
*edl
, Tracks
*tracks
);
27 int load_defaults(Defaults
*defaults
);
28 void set_default_title();
29 PluginSet
* new_plugins();
30 int channel_is_playable(int64_t position
, int direction
, int *do_channel
);
31 int save_header(FileXML
*file
);
32 int save_derived(FileXML
*file
);
33 int load_header(FileXML
*file
, uint32_t load_flags
);
34 int load_derived(FileXML
*file
, uint32_t load_flags
);
35 int copy_settings(Track
*track
);
36 void synchronize_params(Track
*track
);
37 int64_t to_units(double position
, int round
);
38 double to_doubleunits(double position
);
39 double from_units(int64_t position
);
41 void calculate_input_transfer(Asset
*asset
, int64_t position
, int direction
,
42 float &in_x
, float &in_y
, float &in_w
, float &in_h
,
43 float &out_x
, float &out_y
, float &out_w
, float &out_h
);
45 void calculate_output_transfer(int channel
, int64_t position
, int direction
,
46 float &in_x
, float &in_y
, float &in_w
, float &in_h
,
47 float &out_x
, float &out_y
, float &out_w
, float &out_h
);
49 int vertical_span(Theme
*theme
);
57 // ====================================== initialization
59 int create_derived_objs(int flash
);
62 // ===================================== rendering
64 int get_projection(int channel
,
75 int64_t real_position
,
77 // Give whether compressed data can be copied directly from the track to the output file
78 int direct_copy_possible(int64_t current_frame
, int direction
);
81 // ===================================== editing
83 int copy_derived(int64_t start
, int64_t end
, FileXML
*xml
);
84 int paste_derived(int64_t start
, int64_t end
, int64_t total_length
, FileXML
*xml
, int ¤t_channel
);
85 // use samples for paste_output
86 int paste_output(int64_t startproject
, int64_t endproject
, int64_t startsource
, int64_t endsource
, int layer
, Asset
*asset
);
87 int clear_derived(int64_t start
, int64_t end
);
88 int copy_automation_derived(AutoConf
*auto_conf
, int64_t start
, int64_t end
, FileXML
*xml
);
89 int paste_automation_derived(int64_t start
, int64_t end
, int64_t total_length
, FileXML
*xml
, int shift_autos
, int ¤t_pan
);
90 int clear_automation_derived(AutoConf
*auto_conf
, int64_t start
, int64_t end
, int shift_autos
= 1);
91 int modify_handles(int64_t oldposition
, int64_t newposition
, int currentend
);
92 int draw_autos_derived(float view_start
, float zoom_units
, AutoConf
*auto_conf
);
93 int draw_floating_autos_derived(float view_start
, float zoom_units
, AutoConf
*auto_conf
, int flash
);
94 int select_auto_derived(float zoom_units
, float view_start
, AutoConf
*auto_conf
, int cursor_x
, int cursor_y
);
95 int move_auto_derived(float zoom_units
, float view_start
, AutoConf
*auto_conf
, int cursor_x
, int cursor_y
, int shift_down
);
96 void translate_camera(float offset_x
, float offset_y
);
97 void translate_projector(float offset_x
, float offset_y
);
99 // ===================================== for handles, titles, etc
101 // rounds up to integer frames for editing
102 int identical(int64_t sample1
, int64_t sample2
);
103 // no rounding for drawing
104 int get_dimensions(double &view_start
,