r802: Remove renderframfsclient and renderfarmfsserver .h and .C from Makefile.am...
[cinelerra_cv/mob.git] / cinelerra / vtrack.h
blob55bc30977bee5c30e24c1b8e3f9daa72efcaa259
1 #ifndef VTRACK_H
2 #define VTRACK_H
4 #include "arraylist.h"
5 #include "autoconf.inc"
6 #include "edl.inc"
7 #include "filexml.inc"
8 #include "floatautos.inc"
9 #include "linklist.h"
10 #include "track.h"
11 #include "vedit.inc"
12 #include "vframe.inc"
14 // CONVERTS FROM SAMPLES TO FRAMES
18 class VTrack : public Track
20 public:
21 VTrack(EDL *edl, Tracks *tracks);
22 ~VTrack();
24 int create_objects();
25 int load_defaults(Defaults *defaults);
26 void set_default_title();
27 PluginSet* new_plugins();
28 int channel_is_playable(int64_t position, int direction, int *do_channel);
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 *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(int channel, 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
56 VTrack() {};
57 int create_derived_objs(int flash);
60 // ===================================== rendering
62 int get_projection(int channel,
63 float &in_x1,
64 float &in_y1,
65 float &in_x2,
66 float &in_y2,
67 float &out_x1,
68 float &out_y1,
69 float &out_x2,
70 float &out_y2,
71 int frame_w,
72 int frame_h,
73 int64_t real_position,
74 int direction);
75 // Give whether compressed data can be copied directly from the track to the output file
76 int direct_copy_possible(int64_t current_frame, int direction, int use_nudge);
79 // ===================================== editing
81 int copy_derived(int64_t start, int64_t end, FileXML *xml);
82 int paste_derived(int64_t start, int64_t end, int64_t total_length, FileXML *xml, int &current_channel);
83 // use samples for paste_output
84 int paste_output(int64_t startproject, int64_t endproject, int64_t startsource, int64_t endsource, int layer, Asset *asset);
85 int clear_derived(int64_t start, int64_t end);
86 int copy_automation_derived(AutoConf *auto_conf, int64_t start, int64_t end, FileXML *xml);
87 int paste_automation_derived(int64_t start, int64_t end, int64_t total_length, FileXML *xml, int shift_autos, int &current_pan);
88 int clear_automation_derived(AutoConf *auto_conf, int64_t start, int64_t end, int shift_autos = 1);
89 int modify_handles(int64_t oldposition, int64_t newposition, int currentend);
90 int draw_autos_derived(float view_start, float zoom_units, AutoConf *auto_conf);
91 int draw_floating_autos_derived(float view_start, float zoom_units, AutoConf *auto_conf, int flash);
92 int select_auto_derived(float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y);
93 int move_auto_derived(float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y, int shift_down);
94 void translate(float offset_x, float offset_y, int do_camera);
96 // ===================================== for handles, titles, etc
98 // rounds up to integer frames for editing
99 int identical(int64_t sample1, int64_t sample2);
100 // no rounding for drawing
101 int get_dimensions(double &view_start,
102 double &view_units,
103 double &zoom_units);
105 private:
108 #endif