r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / vtrack.h
blobc91be4f4671cb66df360decc86ac24723f83dada
1 #ifndef VTRACK_H
2 #define VTRACK_H
4 #include "arraylist.h"
5 #include "autoconf.inc"
6 #include "bezierauto.inc"
7 #include "bezierautos.inc"
8 #include "edl.inc"
9 #include "filexml.inc"
10 #include "floatautos.inc"
11 #include "linklist.h"
12 #include "track.h"
13 #include "vedit.inc"
14 #include "vframe.inc"
16 // CONVERTS FROM SAMPLES TO FRAMES
20 class VTrack : public Track
22 public:
23 VTrack(EDL *edl, Tracks *tracks);
24 ~VTrack();
26 int create_objects();
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
58 VTrack() {};
59 int create_derived_objs(int flash);
62 // ===================================== rendering
64 int get_projection(int channel,
65 float &in_x1,
66 float &in_y1,
67 float &in_x2,
68 float &in_y2,
69 float &out_x1,
70 float &out_y1,
71 float &out_x2,
72 float &out_y2,
73 int frame_w,
74 int frame_h,
75 int64_t real_position,
76 int direction);
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 &current_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 &current_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,
105 double &view_units,
106 double &zoom_units);
108 private:
111 #endif