00001 #ifndef VTRACK_H
00002 #define VTRACK_H
00003
00004 #include "arraylist.h"
00005 #include "autoconf.inc"
00006 #include "edl.inc"
00007 #include "filexml.inc"
00008 #include "floatautos.inc"
00009 #include "linklist.h"
00010 #include "track.h"
00011 #include "vedit.inc"
00012 #include "vframe.inc"
00013
00014
00015
00016
00017
00018 class VTrack : public Track
00019 {
00020 public:
00021 VTrack(EDL *edl, Tracks *tracks);
00022 ~VTrack();
00023
00024 int create_objects();
00025 int load_defaults(Defaults *defaults);
00026 void set_default_title();
00027 PluginSet* new_plugins();
00028 int channel_is_playable(int64_t position, int direction, int *do_channel);
00029 int save_header(FileXML *file);
00030 int save_derived(FileXML *file);
00031 int load_header(FileXML *file, uint32_t load_flags);
00032 int load_derived(FileXML *file, uint32_t load_flags);
00033 int copy_settings(Track *track);
00034 void synchronize_params(Track *track);
00035 int64_t to_units(double position, int round);
00036 double to_doubleunits(double position);
00037 double from_units(int64_t position);
00038
00039 void calculate_input_transfer(Asset *asset, int64_t position, int direction,
00040 float &in_x, float &in_y, float &in_w, float &in_h,
00041 float &out_x, float &out_y, float &out_w, float &out_h);
00042
00043 void calculate_output_transfer(int channel, int64_t position, int direction,
00044 float &in_x, float &in_y, float &in_w, float &in_h,
00045 float &out_x, float &out_y, float &out_w, float &out_h);
00046
00047 int vertical_span(Theme *theme);
00048
00049
00050
00051
00052
00053
00054
00055
00056 VTrack() {};
00057 int create_derived_objs(int flash);
00058
00059
00060
00061
00062 int get_projection(int channel,
00063 float &in_x1,
00064 float &in_y1,
00065 float &in_x2,
00066 float &in_y2,
00067 float &out_x1,
00068 float &out_y1,
00069 float &out_x2,
00070 float &out_y2,
00071 int frame_w,
00072 int frame_h,
00073 int64_t real_position,
00074 int direction);
00075
00076 int direct_copy_possible(int64_t current_frame, int direction, int use_nudge);
00077
00078
00079
00080
00081 int copy_derived(int64_t start, int64_t end, FileXML *xml);
00082 int paste_derived(int64_t start, int64_t end, int64_t total_length, FileXML *xml, int ¤t_channel);
00083
00084 int paste_output(int64_t startproject, int64_t endproject, int64_t startsource, int64_t endsource, int layer, Asset *asset);
00085 int clear_derived(int64_t start, int64_t end);
00086 int copy_automation_derived(AutoConf *auto_conf, int64_t start, int64_t end, FileXML *xml);
00087 int paste_automation_derived(int64_t start, int64_t end, int64_t total_length, FileXML *xml, int shift_autos, int ¤t_pan);
00088 int clear_automation_derived(AutoConf *auto_conf, int64_t start, int64_t end, int shift_autos = 1);
00089 int modify_handles(int64_t oldposition, int64_t newposition, int currentend);
00090 int draw_autos_derived(float view_start, float zoom_units, AutoConf *auto_conf);
00091 int draw_floating_autos_derived(float view_start, float zoom_units, AutoConf *auto_conf, int flash);
00092 int select_auto_derived(float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y);
00093 int move_auto_derived(float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y, int shift_down);
00094 void translate(float offset_x, float offset_y, int do_camera);
00095
00096
00097
00098
00099 int identical(int64_t sample1, int64_t sample2);
00100
00101 int get_dimensions(double &view_start,
00102 double &view_units,
00103 double &zoom_units);
00104
00105 private:
00106 };
00107
00108 #endif