5 #include "autoconf.inc"
6 #include "bezierauto.inc"
7 #include "bezierautos.inc"
9 #include "floatautos.inc"
11 #include "mwindow.inc"
15 // CONVERTS FROM SAMPLES TO FRAMES
19 class VTrack
: public Track
23 VTrack(MWindow
*mwindow
, Tracks
*tracks
);
26 // ====================================== initialization
27 int create_derived_objs(int flash
);
29 int save_derived(FileXML
*xml
);
30 int load_derived(FileXML
*xml
, int automation_only
, int edits_only
, int load_all
, int &output_channel
);
32 // ===================================== rendering
34 int render(VFrame
**output
, long input_len
, long input_position
, float step
);
35 int get_projection(float &in_x1
, float &in_y1
, float &in_x2
, float &in_y2
,
36 float &out_x1
, float &out_y1
, float &out_x2
, float &out_y2
,
37 int frame_w
, int frame_h
, long real_position
,
38 BezierAuto
**before
, BezierAuto
**after
);
40 // ===================================== editing
42 int copy_derived(long start
, long end
, FileXML
*xml
);
43 int paste_derived(long start
, long end
, long total_length
, FileXML
*xml
, int ¤t_channel
);
44 // use samples for paste_output
45 int paste_output(long startproject
, long endproject
, long startsource
, long endsource
, int layer
, Asset_GC asset
);
46 int clear_derived(long start
, long end
);
47 int copy_automation_derived(AutoConf
*auto_conf
, long start
, long end
, FileXML
*xml
);
48 int paste_automation_derived(long start
, long end
, long total_length
, FileXML
*xml
, int shift_autos
, int ¤t_pan
);
49 int clear_automation_derived(AutoConf
*auto_conf
, long start
, long end
, int shift_autos
= 1);
50 int paste_auto_silence_derived(long start
, long end
);
51 int modify_handles(long oldposition
, long newposition
, int currentend
);
52 int draw_autos_derived(float view_start
, float zoom_units
, AutoConf
*auto_conf
);
53 int draw_floating_autos_derived(float view_start
, float zoom_units
, AutoConf
*auto_conf
, int flash
);
54 int select_translation(int cursor_x
, int cursor_y
); // select coordinates of frame
55 int update_translation(int cursor_x
, int cursor_y
, int shift_down
); // move coordinates of frame
56 int reset_translation(long start
, long end
);
57 int end_translation();
58 int select_auto_derived(float zoom_units
, float view_start
, AutoConf
*auto_conf
, int cursor_x
, int cursor_y
);
59 int move_auto_derived(float zoom_units
, float view_start
, AutoConf
*auto_conf
, int cursor_x
, int cursor_y
, int shift_down
);
60 int release_auto_derived();
61 int scale_video(float camera_scale
, float projector_scale
, int *offsets
);
62 int scale_time_derived(float rate_scale
, int scale_edits
, int scale_autos
, long start
, long end
);
64 // ===================================== for handles, titles, etc
66 BezierAutos
*camera_autos
;
67 BezierAutos
*projector_autos
;
69 // rounds up to integer frames for editing
70 long samples_to_units(long &samples
);
71 // no rounding for drawing
72 int get_dimensions(float &view_start
, float &view_units
, float &zoom_units
);
81 // c-file-style: "linux"