11 #include "pluginserver.inc"
12 #include "threadindexer.inc"
14 #include "trackcanvas.inc"
15 #include "transition.inc"
19 class Tracks
: public List
<Track
>
26 Tracks
& operator=(Tracks
&tracks
);
27 int load(FileXML
*xml
, int &track_offset
, uint32_t load_flags
);
28 void move_edits(ArrayList
<Edit
*> *edits
,
33 void move_effect(Plugin
*plugin
,
34 PluginSet
*plugin_set
,
38 // Construct a list of all the recordable edits which start on position
39 void get_affected_edits(ArrayList
<Edit
*> *drag_edits
,
43 void equivalent_output(Tracks
*tracks
, double *result
);
45 int move_track_up(Track
*track
); // move recordable tracks up
46 int move_track_down(Track
*track
); // move recordable tracks down
47 int move_tracks_up(); // move recordable tracks up
48 int move_tracks_down(); // move recordable tracks down
49 void paste_audio_transition(PluginServer
*server
);
50 void paste_video_transition(PluginServer
*server
, int first_track
= 0);
52 void paste_transition(PluginServer
*server
, Edit
*dest_edit
);
53 // Return the numbers of tracks with the play patch enabled
54 int playable_audio_tracks();
55 int playable_video_tracks();
56 // Return number of tracks with the record patch enabled
57 int recordable_audio_tracks();
58 int recordable_video_tracks();
59 int total_audio_tracks();
60 int total_video_tracks();
61 // return the longest track in all the tracks in seconds
62 double total_length();
63 double total_video_length();
64 // Update y pixels after a zoom
65 void update_y_pixels(Theme
*theme
);
66 // Total number of tracks where the following toggles are selected
67 void select_all(int type
,
69 void translate_camera(float offset_x
, float offset_y
);
70 void translate_projector(float offset_x
, float offset_y
);
71 int total_of(int type
);
73 Track
* add_audio_track(int above
, Track
*dst_track
);
74 Track
* add_video_track(int above
, Track
*dst_track
);
75 // Track* add_audio_track(int to_end = 1);
76 // Track* add_video_track(int to_end = 1);
77 int delete_track(Track
* track
); // delete any track
85 // Types for drag toggle behavior
105 int change_channels(int oldchannels
, int newchannels
);
110 // Change references to shared modules in all tracks from old to new.
111 // If do_swap is true values of new are replaced with old.
112 void change_modules(int old_location
, int new_location
, int do_swap
);
113 // Append all the tracks to the end of the recordable tracks
114 int concatenate_tracks(int edit_plugins
);
115 // Change references to shared plugins in all tracks
116 void change_plugins(SharedLocation
&old_location
, SharedLocation
&new_location
, int do_swap
);
118 int detach_shared_effects(int module
); // detach shared effects referencing module
119 int delete_tracks(); // delete all the recordable tracks
120 int delete_all_tracks(); // delete just the tracks
122 void copy_from(Tracks
*tracks
);
124 // ================================== EDL editing
125 int copy(double start
,
129 char *output_path
= "");
133 int copy_assets(FileXML
*xml
,
137 int clear(double start
, double end
, int clear_plugins
);
138 // Returns the point to restart background rendering at.
139 // -1 means nothing changed.
140 void clear_automation(double selectionstart
,
141 double selectionend
);
142 int clear_default_keyframe();
143 int clear_handle(double start
,
145 double &longest_distance
,
148 int copy_automation(double selectionstart
,
153 int copy_default_keyframe(FileXML
*file
);
154 void paste_automation(double selectionstart
,
157 int paste_default_keyframe(FileXML
*file
);
158 int paste(int64_t start
, int64_t end
);
159 // all units are samples by default
160 int paste_output(int64_t startproject
,
162 int64_t startsource_sample
,
163 int64_t endsource_sample
,
164 int64_t startsource_frame
,
165 int64_t endsource_frame
,
167 int paste_silence(double start
,
170 int purge_asset(Asset
*asset
);
171 int asset_used(Asset
*asset
);
173 int popup_transition(int cursor_x
, int cursor_y
);
174 int select_auto(int cursor_x
, int cursor_y
);
175 int move_auto(int cursor_x
, int cursor_y
, int shift_down
);
176 int modify_edithandles(double &oldposition
,
182 int modify_pluginhandles(double &oldposition
,
188 int select_handles();
190 int select_edit(int64_t cursor_position
, int cursor_x
, int cursor_y
, int64_t &new_start
, int64_t &new_end
);
191 int feather_edits(int64_t start
, int64_t end
, int64_t samples
, int audio
, int video
);
192 int64_t get_feather(int64_t selectionstart
, int64_t selectionend
, int audio
, int video
);
193 // Move edit boundaries and automation during a framerate change
194 int scale_time(float rate_scale
, int ignore_record
, int scale_edits
, int scale_autos
, int64_t start
, int64_t end
);
196 // ================================== accounting
198 int handles
, titles
; // show handles or titles
199 int show_output
; // what type of video to draw
200 AutoConf auto_conf
; // which autos are visible
201 int overlays_visible
;
202 double total_playable_length(); // Longest track.
203 // Used by equivalent_output
204 int total_playable_vtracks();
205 double total_recordable_length(); // Longest track with recording on
206 int totalpixels(); // height of all tracks in pixels
207 int number_of(Track
*track
); // track number of pointer
208 Track
* number(int number
); // pointer to track number