00001 #ifndef EDL_H
00002 #define EDL_H
00003
00004 #include "asset.inc"
00005 #include "assets.inc"
00006 #include "autoconf.inc"
00007 #include "defaults.inc"
00008 #include "edits.inc"
00009 #include "edl.inc"
00010 #include "edlsession.inc"
00011 #include "filexml.inc"
00012 #include "labels.inc"
00013 #include "localsession.inc"
00014 #include "maxchannels.h"
00015 #include "playbackconfig.h"
00016 #include "pluginserver.h"
00017 #include "preferences.inc"
00018 #include "recordlabel.inc"
00019 #include "sharedlocation.inc"
00020 #include "theme.inc"
00021 #include "tracks.inc"
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 class EDL
00046 {
00047 public:
00048 EDL(EDL *parent_edl = 0);
00049 ~EDL();
00050
00051 int create_objects();
00052 EDL& operator=(EDL &edl);
00053
00054
00055 int load_defaults(Defaults *defaults);
00056 int save_defaults(Defaults *defaults);
00057
00058 void boundaries();
00059
00060 int create_default_tracks();
00061 int load_xml(ArrayList<PluginServer*> *plugindb,
00062 FileXML *file,
00063 uint32_t load_flags);
00064 int save_xml(ArrayList<PluginServer*> *plugindb,
00065 FileXML *xml,
00066 char *output_path,
00067 int is_clip,
00068 int is_vwindow);
00069 int load_audio_config(FileXML *file, int append_mode, uint32_t load_flags);
00070 int load_video_config(FileXML *file, int append_mode, uint32_t load_flags);
00071
00072
00073
00074
00075 double align_to_frame(double position, int round);
00076
00077
00078
00079
00080 void rechannel();
00081 void resample(double old_rate, double new_rate, int data_type);
00082 void copy_tracks(EDL *edl);
00083 void copy_session(EDL *edl);
00084 int copy_all(EDL *edl);
00085 void copy_assets(EDL *edl);
00086 void copy_clips(EDL *edl);
00087
00088 void synchronize_params(EDL *edl);
00089
00090
00091 int equivalent(double position1, double position2);
00092
00093
00094
00095
00096
00097
00098 double equivalent_output(EDL *edl);
00099
00100 void set_project_path(char *path);
00101
00102 void set_inpoint(double position);
00103 void set_outpoint(double position);
00104
00105 void set_index_file(Asset *asset);
00106
00107 void update_assets(EDL *src);
00108 void optimize();
00109
00110 int dump();
00111 static int next_id();
00112
00113 void new_folder(char *folder);
00114 void delete_folder(char *folder);
00115 void modify_edithandles(double oldposition,
00116 double newposition,
00117 int currentend,
00118 int handle_mode,
00119 int edit_labels,
00120 int edit_plugins);
00121
00122 void modify_pluginhandles(double oldposition,
00123 double newposition,
00124 int currentend,
00125 int handle_mode,
00126 int edit_labels,
00127 Edits *trim_edits);
00128
00129 int trim_selection(double start,
00130 double end,
00131 int edit_labels,
00132 int edit_plugins);
00133
00134
00135 int copy_assets(double start,
00136 double end,
00137 FileXML *file,
00138 int all,
00139 ArrayList<PluginServer*> *plugindb,
00140 char *output_path);
00141 int copy(double start,
00142 double end,
00143 int all,
00144 int is_clip,
00145 int is_vwindow,
00146 FileXML *file,
00147 ArrayList<PluginServer*> *plugindb,
00148 char *output_path,
00149 int rewind_it);
00150 void paste_silence(double start,
00151 double end,
00152 int edit_labels ,
00153 int edit_plugins);
00154 void remove_from_project(ArrayList<Asset*> *assets);
00155 void remove_from_project(ArrayList<EDL*> *clips);
00156 int clear(double start,
00157 double end,
00158 int clear_labels,
00159 int clear_plugins);
00160
00161 void insert_asset(Asset *asset,
00162 double position,
00163 Track *first_track = 0,
00164 RecordLabels *labels = 0);
00165
00166 int insert_clips(ArrayList<EDL*> *new_edls, int load_mode, Track *first_track = 0);
00167
00168 EDL* add_clip(EDL *edl);
00169
00170 void get_shared_plugins(Track *source, ArrayList<SharedLocation*> *plugin_locations);
00171 void get_shared_tracks(Track *track, ArrayList<SharedLocation*> *module_locations);
00172
00173
00174 int get_tracks_height(Theme *theme);
00175 int64_t get_tracks_width();
00176
00177
00178
00179
00180
00181
00182
00183 void calculate_conformed_dimensions(int single_channel, float &w, float &h);
00184
00185 void output_dimensions_scaled(int &w, int &h);
00186 float get_aspect_ratio();
00187
00188
00189 ArrayList<char*> folders;
00190
00191 ArrayList<EDL*> clips;
00192
00193 EDL *vwindow_edl;
00194
00195
00196
00197 Assets *assets;
00198
00199
00200
00201 Tracks *tracks;
00202 Labels *labels;
00203
00204 EDLSession *session;
00205
00206 LocalSession *local_session;
00207
00208
00209
00210
00211
00212
00213 char project_path[BCTEXTLEN];
00214
00215
00216
00217
00218 EDL *parent_edl;
00219
00220
00221
00222 int id;
00223 };
00224
00225 #endif