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
00049 void equivalent_output(Tracks *tracks, double *result);
00050
00051 int move_track_up(Track *track);
00052 int move_track_down(Track *track);
00053 int move_tracks_up();
00054 int move_tracks_down();
00055 void paste_audio_transition(PluginServer *server);
00056 void paste_video_transition(PluginServer *server, int first_track = 0);
00057
00058 void paste_transition(PluginServer *server, Edit *dest_edit);
00059
00060 int playable_audio_tracks();
00061 int playable_video_tracks();
00062
00063 int recordable_audio_tracks();
00064 int recordable_video_tracks();
00065 int total_audio_tracks();
00066 int total_video_tracks();
00067
00068 double total_length();
00069 double total_video_length();
00070
00071 void update_y_pixels(Theme *theme);
00072
00073 void select_all(int type,
00074 int value);
00075 void translate_camera(float offset_x, float offset_y);
00076 void translate_projector(float offset_x, float offset_y);
00077 int total_of(int type);
00078
00079 Track* add_audio_track(int above, Track *dst_track);
00080 Track* add_video_track(int above, Track *dst_track);
00081
00082
00083
00084 int delete_track(Track* track);
00085
00086 int detach_shared_effects(int module);
00087
00088 EDL *edl;
00089
00090
00091
00092
00093
00094
00095 enum
00096 {
00097 NONE,
00098 PLAY,
00099 RECORD,
00100 GANG,
00101 DRAW,
00102 MUTE,
00103 EXPAND
00104 };
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 int change_channels(int oldchannels, int newchannels);
00115 int dump();
00116
00117
00118
00119
00120
00121 void change_modules(int old_location, int new_location, int do_swap);
00122
00123 int concatenate_tracks(int edit_plugins);
00124
00125 void change_plugins(SharedLocation &old_location, SharedLocation &new_location, int do_swap);
00126
00127 int delete_tracks();
00128 int delete_all_tracks();
00129
00130 void copy_from(Tracks *tracks);
00131
00132
00133 int copy(double start,
00134 double end,
00135 int all,
00136 FileXML *file,
00137 char *output_path = "");
00138
00139
00140
00141 int copy_assets(FileXML *xml,
00142 double start,
00143 double end,
00144 int all);
00145 int clear(double start, double end, int clear_plugins);
00146
00147
00148 void clear_automation(double selectionstart,
00149 double selectionend);
00150 int clear_default_keyframe();
00151 int clear_handle(double start,
00152 double end,
00153 double &longest_distance,
00154 int clear_labels,
00155 int clear_plugins);
00156 int copy_automation(double selectionstart,
00157 double selectionend,
00158 FileXML *file,
00159 int default_only,
00160 int autos_only);
00161 int copy_default_keyframe(FileXML *file);
00162 void paste_automation(double selectionstart,
00163 FileXML *xml,
00164 int default_only);
00165 int paste_default_keyframe(FileXML *file);
00166 int paste(int64_t start, int64_t end);
00167
00168 int paste_output(int64_t startproject,
00169 int64_t endproject,
00170 int64_t startsource_sample,
00171 int64_t endsource_sample,
00172 int64_t startsource_frame,
00173 int64_t endsource_frame,
00174 Asset *asset);
00175 int paste_silence(double start,
00176 double end,
00177 int edit_plugins);
00178 int purge_asset(Asset *asset);
00179 int asset_used(Asset *asset);
00180
00181 int popup_transition(int cursor_x, int cursor_y);
00182 int select_auto(int cursor_x, int cursor_y);
00183 int move_auto(int cursor_x, int cursor_y, int shift_down);
00184 int modify_edithandles(double &oldposition,
00185 double &newposition,
00186 int currentend,
00187 int handle_mode,
00188 int edit_labels,
00189 int edit_plugins);
00190 int modify_pluginhandles(double &oldposition,
00191 double &newposition,
00192 int currentend,
00193 int handle_mode,
00194 int edit_labels,
00195 Edits *trim_edits);
00196 int select_handles();
00197 int select_region();
00198 int select_edit(int64_t cursor_position, int cursor_x, int cursor_y, int64_t &new_start, int64_t &new_end);
00199 int feather_edits(int64_t start, int64_t end, int64_t samples, int audio, int video);
00200 int64_t get_feather(int64_t selectionstart, int64_t selectionend, int audio, int video);
00201
00202 int scale_time(float rate_scale, int ignore_record, int scale_edits, int scale_autos, int64_t start, int64_t end);
00203
00204
00205
00206 int handles, titles;
00207 int show_output;
00208 AutoConf auto_conf;
00209 int overlays_visible;
00210 double total_playable_length();
00211
00212 int total_playable_vtracks();
00213 double total_recordable_length();
00214 int totalpixels();
00215 int number_of(Track *track);
00216 Track* number(int number);
00217
00218
00219 private:
00220 };
00221
00222 #endif