00001 #ifndef TRACKS_H
00002 #define TRACKS_H
00003
00004
00005 #include "autoconf.h"
00006 #include "cursor.inc"
00007 #include "edl.inc"
00008 #include "file.inc"
00009 #include "filexml.inc"
00010 #include "linklist.h"
00011 #include "pluginserver.inc"
00012 #include "threadindexer.inc"
00013 #include "track.h"
00014 #include "trackcanvas.inc"
00015 #include "transition.inc"
00016
00017
00018
00019 class Tracks : public List<Track>
00020 {
00021 public:
00022 Tracks();
00023 Tracks(EDL *edl);
00024 virtual ~Tracks();
00025
00026 Tracks& operator=(Tracks &tracks);
00027 int load(FileXML *xml, int &track_offset, uint32_t load_flags);
00028 void move_edits(ArrayList<Edit*> *edits,
00029 Track *track,
00030 double position,
00031 int edit_labels,
00032 int edit_plugins,
00033 int behaviour);
00034 void move_effect(Plugin *plugin,
00035 PluginSet *plugin_set,
00036 Track *track,
00037 int64_t position);
00038
00039
00040 void get_affected_edits(ArrayList<Edit*> *drag_edits,
00041 double position,
00042 Track *start_track);
00043
00044 void get_automation_extents(float *min,
00045 float *max,
00046 double start,
00047 double end,
00048 int autogrouptype);
00049
00050 void equivalent_output(Tracks *tracks, double *result);
00051
00052 int move_track_up(Track *track);
00053 int move_track_down(Track *track);
00054 int move_tracks_up();
00055 int move_tracks_down();
00056 void paste_audio_transition(PluginServer *server);
00057 void paste_video_transition(PluginServer *server, int first_track = 0);
00058
00059 void paste_transition(PluginServer *server, Edit *dest_edit);
00060
00061 int playable_audio_tracks();
00062 int playable_video_tracks();
00063
00064 int recordable_audio_tracks();
00065 int recordable_video_tracks();
00066 int total_audio_tracks();
00067 int total_video_tracks();
00068
00069 double total_length();
00070 double total_audio_length();
00071 double total_video_length();
00072 double total_length_framealigned(double fps);
00073
00074 void update_y_pixels(Theme *theme);
00075
00076 void select_all(int type,
00077 int value);
00078 void translate_camera(float offset_x, float offset_y);
00079 void translate_projector(float offset_x, float offset_y);
00080 int total_of(int type);
00081
00082 Track* add_audio_track(int above, Track *dst_track);
00083 Track* add_video_track(int above, Track *dst_track);
00084
00085
00086
00087 int delete_track(Track* track);
00088
00089 int detach_shared_effects(int module);
00090
00091 EDL *edl;
00092
00093
00094
00095
00096
00097
00098 enum
00099 {
00100 NONE,
00101 PLAY,
00102 RECORD,
00103 GANG,
00104 DRAW,
00105 MUTE,
00106 EXPAND
00107 };
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117 int change_channels(int oldchannels, int newchannels);
00118 int dump();
00119
00120
00121
00122
00123
00124 void change_modules(int old_location, int new_location, int do_swap);
00125
00126 int concatenate_tracks(int edit_plugins);
00127
00128 void change_plugins(SharedLocation &old_location, SharedLocation &new_location, int do_swap);
00129
00130 int delete_tracks();
00131 int delete_all_tracks();
00132
00133 void copy_from(Tracks *tracks);
00134
00135
00136 int copy(double start,
00137 double end,
00138 int all,
00139 FileXML *file,
00140 char *output_path = "");
00141
00142
00143
00144 int copy_assets(FileXML *xml,
00145 double start,
00146 double end,
00147 int all);
00148 int clear(double start, double end, int clear_plugins);
00149 void clear_automation(double selectionstart,
00150 double selectionend);
00151 void straighten_automation(double selectionstart,
00152 double selectionend);
00153 int clear_default_keyframe();
00154 int clear_handle(double start,
00155 double end,
00156 double &longest_distance,
00157 int clear_labels,
00158 int clear_plugins);
00159 int copy_automation(double selectionstart,
00160 double selectionend,
00161 FileXML *file,
00162 int default_only,
00163 int autos_only);
00164 int copy_default_keyframe(FileXML *file);
00165 void loaded_lengths_to_tracklengths(int includerecordtracks);
00166 void paste_automation(double selectionstart,
00167 FileXML *xml,
00168 int default_only);
00169 int paste_default_keyframe(FileXML *file);
00170 int paste(int64_t start, int64_t end);
00171
00172 int paste_output(int64_t startproject,
00173 int64_t endproject,
00174 int64_t startsource_sample,
00175 int64_t endsource_sample,
00176 int64_t startsource_frame,
00177 int64_t endsource_frame,
00178 Asset *asset);
00179 int paste_silence(double start,
00180 double end,
00181 int edit_plugins);
00182 int purge_asset(Asset *asset);
00183 int asset_used(Asset *asset);
00184
00185 int popup_transition(int cursor_x, int cursor_y);
00186 int select_auto(int cursor_x, int cursor_y);
00187 int move_auto(int cursor_x, int cursor_y, int shift_down);
00188 int modify_edithandles(double &oldposition,
00189 double &newposition,
00190 int currentend,
00191 int handle_mode,
00192 int edit_labels,
00193 int edit_plugins);
00194 int modify_pluginhandles(double &oldposition,
00195 double &newposition,
00196 int currentend,
00197 int handle_mode,
00198 int edit_labels,
00199 Edits *trim_edits);
00200 int select_handles();
00201 int select_region();
00202 int select_edit(int64_t cursor_position, int cursor_x, int cursor_y, int64_t &new_start, int64_t &new_end);
00203 int feather_edits(int64_t start, int64_t end, int64_t samples, int audio, int video);
00204 int64_t get_feather(int64_t selectionstart, int64_t selectionend, int audio, int video);
00205
00206 int scale_time(float rate_scale, int ignore_record, int scale_edits, int scale_autos, int64_t start, int64_t end);
00207
00208
00209
00210 int handles, titles;
00211 int show_output;
00212 AutoConf auto_conf;
00213 int overlays_visible;
00214 double total_playable_length();
00215
00216 int total_playable_vtracks();
00217 double total_recordable_length();
00218 int totalpixels();
00219 int number_of(Track *track);
00220 Track* number(int number);
00221
00222
00223 private:
00224 };
00225
00226 #endif