5 #include "autoconf.inc"
6 #include "defaults.inc"
7 #include "edlsession.inc"
10 #include "localsession.inc"
11 #include "maxchannels.h"
12 #include "playbackconfig.h"
13 #include "pluginserver.h"
14 #include "preferences.inc"
15 #include "presentations.h"
16 #include "sharedlocation.inc"
21 // Loading and saving are built on load and copy except for automation:
24 // Load: load new -> paste into master
25 // Save: copy all of master
26 // Undo: selective load into master
27 // Copy: copy from master
28 // Paste: load new -> paste into master
29 // Copy automation: copy just automation from master
30 // Paste automation: paste functions in automation
45 EDL(EDL
*parent_edl
= 0);
49 EDL
& operator=(EDL
&edl
);
51 // Load configuration and track counts
52 int load_defaults(Defaults
*defaults
);
53 int save_defaults(Defaults
*defaults
);
54 // Clip default settings to boundaries.
56 // Create tracks using existing configuration
57 int create_default_tracks();
58 int load_xml(ArrayList
<PluginServer
*> *plugindb
,
61 int save_xml(ArrayList
<PluginServer
*> *plugindb
,
66 int load_audio_config(FileXML
*file
, int append_mode
, uint32_t load_flags
);
67 int load_video_config(FileXML
*file
, int append_mode
, uint32_t load_flags
);
71 // Convert position to frames if cursor alignment is enabled
72 double align_to_frame(double position
, int round
);
76 // Scale all sample values since everything is locked to audio
78 void resample(double old_rate
, double new_rate
, int data_type
);
79 void copy_tracks(EDL
*edl
);
80 void copy_session(EDL
*edl
);
81 int copy_all(EDL
*edl
);
82 void copy_assets(EDL
*edl
);
83 void copy_clips(EDL
*edl
);
84 // Copy pan and fade settings from edl
85 void synchronize_params(EDL
*edl
);
86 // Determine if the positions are equivalent if they're within half a frame
88 int equivalent(double position1
, double position2
);
89 // Determine if the EDL's produce equivalent video output to the old EDL.
90 // The new EDL is this and the old EDL is the argument.
91 // Return the number of seconds from the beginning of this which are
92 // equivalent to the argument.
93 // If they're completely equivalent, -1 is returned;
94 // This is used by BRender.
95 double equivalent_output(EDL
*edl
);
96 // Set points and labels
97 void set_inpoint(double position
);
98 void set_outpoint(double position
);
99 // Redraw resources during index builds
100 void set_index_file(Asset
*asset
);
101 // Add assets from the src to the destination
102 void update_assets(EDL
*src
);
106 static int next_id();
107 // Create a new folder if it doesn't exist already
108 void new_folder(char *folder
);
109 void delete_folder(char *folder
);
110 void modify_edithandles(double oldposition
,
117 void modify_pluginhandles(double oldposition
,
123 int trim_selection(double start
,
129 int copy_assets(double start
,
133 ArrayList
<PluginServer
*> *plugindb
,
135 int copy(double start
,
137 int all
, // Ignore recordable status of tracks for saving
141 ArrayList
<PluginServer
*> *plugindb
,
143 int rewind_it
); // Rewind EDL for easy pasting
144 void paste_silence(double start
,
146 int edit_labels
/* = 1 */,
148 void remove_from_project(ArrayList
<Asset
*> *assets
);
149 void remove_from_project(ArrayList
<EDL
*> *clips
);
150 int clear(double start
,
154 // Insert the asset at a point in the EDL
155 void insert_asset(Asset
*asset
,
157 Track
*first_track
= 0,
158 RecordLabels
*labels
= 0);
159 // Insert the clip at a point in the EDL
160 int insert_clips(ArrayList
<EDL
*> *new_edls
, int load_mode
, Track
*first_track
= 0);
161 // Add a copy of EDL* to the clip array. Returns the copy.
162 EDL
* add_clip(EDL
*edl
);
164 void get_shared_plugins(Track
*source
, ArrayList
<SharedLocation
*> *plugin_locations
);
165 void get_shared_tracks(Track
*track
, ArrayList
<SharedLocation
*> *module_locations
);
168 int get_tracks_height(Theme
*theme
);
169 int64_t get_tracks_width();
170 // Return the dimension for a single pane if single_channel is set.
171 // Otherwise add all panes.
172 int calculate_output_w(int single_channel
);
173 int calculate_output_h(int single_channel
);
174 // Return dimensions for canvas if smaller dimensions has zoom of 1
175 void calculate_conformed_dimensions(int single_channel
, float &w
, float &h
);
176 // Get the total output size scaled to aspect ratio
177 void output_dimensions_scaled(int &w
, int &h
);
178 float get_aspect_ratio();
180 // Titles of all subfolders
181 ArrayList
<char*> folders
;
183 ArrayList
<EDL
*> clips
;
188 // Shared between all EDLs
195 Presentations
*presentations
;
196 // Shared between all EDLs in a tree
198 // Specific to this EDL
199 LocalSession
*local_session
;
204 // Use parent Assets if nonzero
208 // unique ID of this EDL for resource window