tweak version mismatch test, update Features5 docs
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mwindow.h
1 /*
2  * CINELERRA
3  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  *
19  */
20
21 #ifndef MWINDOW_H
22 #define MWINDOW_H
23
24 #include <stdio.h>
25 #include <stdint.h>
26
27 #include "apatchgui.h"
28 #include "arraylist.h"
29 #include "asset.inc"
30 #include "assets.inc"
31 #include "audiodevice.inc"
32 #include "autos.inc"
33 #include "awindow.inc"
34 #include "batchrender.inc"
35 #include "bcwindowbase.inc"
36 #include "bdcreate.inc"
37 #include "brender.inc"
38 #include "cache.inc"
39 #include "channel.inc"
40 #include "channeldb.inc"
41 #include "commercials.inc"
42 #include "cwindow.inc"
43 #include "bchash.inc"
44 #include "devicedvbinput.inc"
45 #include "devicempeginput.inc"
46 #include "dvdcreate.inc"
47 #include "edit.inc"
48 #include "edl.inc"
49 #include "edlsession.inc"
50 #include "exportedl.inc"
51 #include "filesystem.inc"
52 #include "filexml.inc"
53 #include "framecache.inc"
54 #include "gwindow.inc"
55 #include "indexable.inc"
56 #include "keyframegui.inc"
57 #include "levelwindow.inc"
58 #include "loadmode.inc"
59 #include "mainerror.inc"
60 #include "mainindexes.inc"
61 #include "mainprogress.inc"
62 #include "mainsession.inc"
63 #include "mainundo.inc"
64 #include "maxchannels.h"
65 #include "mutex.inc"
66 #include "mwindow.inc"
67 #include "mwindowgui.inc"
68 #include "new.inc"
69 #include "patchbay.inc"
70 #include "playback3d.inc"
71 #include "playbackengine.inc"
72 #include "plugin.inc"
73 #include "pluginfclient.inc"
74 #include "pluginserver.inc"
75 #include "pluginset.inc"
76 #include "preferences.inc"
77 #include "preferencesthread.inc"
78 #include "proxy.inc"
79 #include "record.inc"
80 #include "recordlabel.inc"
81 #include "render.inc"
82 #include "sharedlocation.inc"
83 #include "sighandler.inc"
84 #include "splashgui.inc"
85 #include "theme.inc"
86 #include "thread.h"
87 #include "threadloader.inc"
88 #include "timebar.inc"
89 #include "timebomb.h"
90 #include "tipwindow.inc"
91 #include "track.inc"
92 #include "tracking.inc"
93 #include "tracks.inc"
94 #include "transition.inc"
95 #include "transportque.inc"
96 #include "videowindow.inc"
97 #include "vpatchgui.h"
98 #include "vwindow.inc"
99 #include "zwindow.inc"
100 #include "wwindow.inc"
101 #include "wavecache.inc"
102
103 #define FONT_SEARCHPATH "fonts"
104
105 // All entry points for commands except for window locking should be here.
106 // This allows scriptability.
107
108 class MWindow : public Thread
109 {
110 public:
111         MWindow();
112         ~MWindow();
113
114 // ======================================== initialization commands
115         void create_objects(int want_gui,
116                 int want_new,
117                 char *config_path);
118         void show_splash();
119         void hide_splash();
120         void start();
121         void run();
122
123         int run_script(FileXML *script);
124         int new_project();
125         int delete_project(int flash = 1);
126         void quit();
127         int restart() { return restart_status; }
128
129         int load_defaults();
130         int save_defaults();
131         int set_filename(const char *filename);
132 // Total vertical pixels in timeline
133         int get_tracks_height();
134 // Total horizontal pixels in timeline
135         int get_tracks_width();
136 // Show windows
137         void show_vwindow();
138         void show_awindow();
139         void show_lwindow();
140         void show_cwindow();
141         void show_gwindow();
142         void hide_gwindow();
143         void restore_windows();
144         void save_layout(int no);
145         void load_layout(int no);
146         int tile_windows(int window_config);
147         char *get_cwindow_display();
148         void set_screens(int value);
149         int asset_to_edl(EDL *new_edl,
150                 Asset *new_asset,
151                 RecordLabels *labels = 0);
152
153 // Entry point to insert assets and insert edls.  Called by TrackCanvas
154 // and AssetPopup when assets are dragged in from AWindow.
155 // Takes the drag vectors from MainSession and
156 // pastes either assets or clips depending on which is full.
157 // Returns 1 if the vectors were full
158         int paste_assets(double position, Track *dest_track, int overwrite);
159
160 // Insert the assets at a point in the EDL.  Called by menueffects,
161 // render, and CWindow drop but recording calls paste_edls directly for
162 // labels.
163         void load_assets(ArrayList<Indexable*> *new_assets,
164                 double position,
165                 int load_mode,
166                 Track *first_track /* = 0 */,
167                 RecordLabels *labels /* = 0 */,
168                 int edit_labels,
169                 int edit_plugins,
170                 int edit_autos,
171                 int overwrite);
172         int paste_edls(ArrayList<EDL*> *new_edls,
173                 int load_mode,
174                 Track *first_track /* = 0 */,
175                 double current_position /* = -1 */,
176                 int edit_labels,
177                 int edit_plugins,
178                 int edit_autos,
179                 int overwrite);
180 // Reset everything for a load
181         void update_project(int load_mode);
182         void update_vwindow();
183 // Fit selected time to horizontal display range
184         void fit_selection();
185 // Fit selected autos to the vertical display range
186         void fit_autos(int doall);
187         void change_currentautorange(int autogrouptype, int increment, int changemax);
188         void expand_autos(int changeall, int domin, int domax);
189         void shrink_autos(int changeall, int domin, int domax);
190 // move the window to include the cursor
191         void find_cursor();
192 // Search plugindb and put results in argument
193         static void search_plugindb(int do_audio,
194                 int do_video,
195                 int is_realtime,
196                 int is_transition,
197                 int is_theme,
198                 ArrayList<PluginServer*> &results);
199 // Find the plugin whose title matches title and return it
200         static PluginServer* scan_plugindb(char *title,
201                 int data_type);
202         static void fix_plugin_title(char *title);
203         static int plugin_exists(const char *plugin_path, ArrayList<PluginServer*> &plugins);
204         static int plugin_exists(char *plugin_path);
205         void dump_plugindb(FILE *fp);
206         void stop_playback(int wait);
207         void stop_transport();
208
209         void queue_mixers(EDL *edl, int command, int wait_tracking,
210                 int use_inout, int update_refresh, int toggle_audio, int loop_play);
211         ZWindow *create_mixer(Indexable *indexable);
212         void create_mixers();
213         void refresh_mixers(int dir=1);
214         void stop_mixers();
215         void close_mixers(int destroy=1);
216         void open_mixers();
217         ZWindow *get_mixer(Mixer *&mixer);
218         void del_mixer(ZWindow *zwindow);
219         int mixer_track_active(Track *track);
220         void update_mixer_tracks();
221         void start_mixer();
222         int select_zwindow(ZWindow *zwindow);
223         void tile_mixers();
224
225         int load_filenames(ArrayList<char*> *filenames,
226                 int load_mode = LOADMODE_REPLACE,
227 // Cause the project filename on the top of the window to be updated.
228 // Not wanted for loading backups.
229                 int update_filename = 1);
230
231
232 // Print out plugins which are referenced in the EDL but not loaded.
233         void test_plugins(EDL *new_edl, char *path);
234
235         int interrupt_indexes();  // Stop index building
236
237         int redraw_time_dependancies();     // after reconfiguring the time format, sample rate, frame rate
238
239 // =========================================== movement
240
241         void next_time_format();
242         void prev_time_format();
243         void time_format_common();
244         int reposition_timebar(int new_pixel, int new_height);
245         int expand_sample();
246         int zoom_in_sample();
247         int zoom_sample(int64_t zoom_sample);
248         void zoom_autos(float min, float max);
249         void zoom_amp(int64_t zoom_amp);
250         void zoom_track(int64_t zoom_track);
251         int fit_sample();
252         int move_left(int64_t distance = 0);
253         int move_right(int64_t distance = 0);
254         void move_up(int64_t distance = 0);
255         void move_down(int64_t distance = 0);
256         int find_selection(double position, int scroll_display = 0);
257         void toggle_camera_xyz();
258         void toggle_projector_xyz();
259
260 // seek to labels
261 // shift_down must be passed by the caller because different windows call
262 // into this
263         int next_label(int shift_down);
264         int prev_label(int shift_down);
265 // seek to edit handles
266         int next_edit_handle(int shift_down);
267         int prev_edit_handle(int shift_down);
268 // seek to keyframes
269         int nearest_plugin_keyframe(int shift_down, int dir);
270 // offset is pixels to add to track_start
271         void trackmovement(int offset, int pane_number);
272 // view_start is pixels
273         int samplemovement(int64_t view_start, int pane_number);
274         void select_all();
275         int goto_start();
276         int goto_end();
277         int goto_position(double position);
278         int expand_y();
279         int zoom_in_y();
280         int expand_t();
281         int zoom_in_t();
282         void split_x();
283         void split_y();
284         void crop_video();
285         void update_plugins();
286 // Call after every edit operation
287         void save_backup();
288         void load_backup();
289         void show_plugin(Plugin *plugin);
290         void hide_plugin(Plugin *plugin, int lock);
291         void hide_plugins();
292         void delete_plugin(PluginServer *plugin);
293 // Update plugins with configuration changes.
294 // Called by TrackCanvas::cursor_motion_event.
295         void update_plugin_guis(int do_keyframe_guis = 1);
296         void update_plugin_states();
297         void update_plugin_titles();
298 // Called by Attachmentpoint during playback.
299 // Searches for matching plugin and renders data in it.
300         void render_plugin_gui(void *data, Plugin *plugin);
301         void render_plugin_gui(void *data, int size, Plugin *plugin);
302
303 // Called from PluginVClient::process_buffer
304 // Returns 1 if a GUI for the plugin is open so OpenGL routines can determine if
305 // they can run.
306         int plugin_gui_open(Plugin *plugin);
307
308         void show_keyframe_gui(Plugin *plugin);
309         void hide_keyframe_guis();
310         void hide_keyframe_gui(Plugin *plugin);
311         void update_keyframe_guis();
312
313
314 // ============================= editing commands ========================
315
316 // Map each recordable audio track to the desired pattern
317         void map_audio(int pattern);
318         void remap_audio(int pattern);
319         enum
320         {
321                 AUDIO_5_1_TO_2,
322                 AUDIO_1_TO_1
323         };
324         void add_audio_track_entry(int above, Track *dst);
325         int add_audio_track(int above, Track *dst);
326         void add_clip_to_edl(EDL *edl);
327         void add_video_track_entry(Track *dst = 0);
328         int add_video_track(int above, Track *dst);
329         void add_subttl_track_entry(Track *dst = 0);
330         int add_subttl_track(int above, Track *dst);
331
332         void asset_to_all();
333         void asset_to_size();
334         void asset_to_rate();
335 // Entry point for clear operations.
336         void clear_entry();
337 // Clears active region in EDL.
338 // If clear_handle, edit boundaries are cleared if the range is 0.
339 // Called by paste, record, menueffects, render, and CWindow drop.
340         void clear(int clear_handle);
341         void clear_labels();
342         int clear_labels(double start, double end);
343         void concatenate_tracks();
344         void copy();
345         int copy(double start, double end);
346         void cut();
347         void blade(double position);
348         void cut(double start, double end, double new_position=-1);
349 // cut edit from current position to handle/label
350         void cut_left_edit();
351         void cut_right_edit();
352         void cut_left_label();
353         void cut_right_label();
354
355 // Calculate aspect ratio from pixel counts
356         static int create_aspect_ratio(float &w, float &h, int width, int height);
357 // Calculate defaults path
358         static void create_defaults_path(char *string, const char *config_file);
359
360         void delete_track();
361         void delete_track(Track *track);
362         void delete_tracks();
363         int feather_edits(int64_t feather_samples, int audio, int video);
364         int64_t get_feather(int audio, int video);
365         float get_aspect_ratio();
366         void insert(double position,
367                 FileXML *file,
368                 int edit_labels,
369                 int edit_plugins,
370                 int edit_autos,
371                 EDL *parent_edl /* = 0 */);
372
373 // TrackCanvas calls this to insert multiple effects from the drag_pluginservers
374 // into pluginset_highlighted.
375         void insert_effects_canvas(double start,
376                 double length);
377
378 // CWindow calls this to insert multiple effects from
379 // the drag_pluginservers array.
380         void insert_effects_cwindow(Track *dest_track);
381
382 // Attach new effect to all recordable tracks
383 // single_standalone - attach 1 standalone on the first track and share it with
384 // other tracks
385         void insert_effect(char *title,
386                 SharedLocation *shared_location,
387                 int data_type,
388                 int plugin_type,
389                 int single_standalone);
390
391 // This is called multiple times by the above functions.
392 // It can't sync parameters.
393         void insert_effect(char *title,
394                 SharedLocation *shared_location,
395                 Track *track,
396                 PluginSet *plugin_set,
397                 double start,
398                 double length,
399                 int plugin_type);
400
401         void match_output_size(Track *track);
402 // Move edit to new position
403         void move_edits(ArrayList<Edit*> *edits,
404                 Track *track,
405                 double position,
406                 int behaviour);       // behaviour: 0 - old style (cut and insert elswhere), 1- new style - (clear and overwrite elsewere)
407 // Move effect to position
408         void move_effect(Plugin *plugin,
409                 Track *track,
410                 int64_t position);
411         void move_effect(Plugin *plugin,
412                 PluginSet *plugin_set,
413                 int64_t position);
414         void move_plugins_up(PluginSet *plugin_set);
415         void move_plugins_down(PluginSet *plugin_set);
416         void move_track_down(Track *track);
417         void move_tracks_down();
418         void move_track_up(Track *track);
419         void move_tracks_up();
420         void mute_selection();
421         void new_folder(const char *new_folder, int is_clips);
422         void delete_folder(char *folder);
423 // For clipboard commands
424         void paste();
425 // For splice and overwrite
426         void overwrite(EDL *source, int all);
427         void splice(EDL *source, int all);
428         int paste(double start, double end, FileXML *file,
429                 int edit_labels, int edit_plugins, int edit_autos);
430         int paste_output(int64_t startproject, int64_t endproject,
431                 int64_t startsource_sample, int64_t endsource_sample,
432                 int64_t startsource_frame, int64_t endsource_frame,
433                 Asset *asset, RecordLabels *new_labels);
434         void paste_silence();
435
436 // Detach single transition
437         void detach_transition(Transition *transition);
438 // Detach all transitions in selection
439         void detach_transitions();
440 // Attach dragged transition
441         void paste_transition();
442 // Attach transition to all edits in selection
443         void paste_transitions(int track_type, char *title);
444 // Attach transition dragged onto CWindow
445         void paste_transition_cwindow(Track *dest_track);
446 // Attach default transition to single edit
447         void paste_audio_transition();
448         void paste_video_transition();
449         void shuffle_edits();
450         void reverse_edits();
451         void align_edits();
452         void set_edit_length(double length);
453 // Set length of single transition
454         void set_transition_length(Transition *transition, double length);
455 // Set length in seconds of all transitions in active range
456         void set_transition_length(double length);
457
458         void remove_indexfile(Indexable *indexable);
459         void rebuild_indices();
460 // Asset removal from caches
461         void reset_caches();
462         void remove_asset_from_caches(Asset *asset);
463         void remove_assets_from_project(int push_undo /* = 0 */,
464                 int redraw /* 1 */,
465                 ArrayList<Indexable*> *drag_assets /* mwindow->session->drag_assets */,
466                 ArrayList<EDL*> *drag_clips /* mwindow->session->drag_clips */);
467         void remove_assets_from_disk();
468         void resize_track(Track *track, int w, int h);
469
470         void set_automation_mode(int mode);
471         void set_keyframe_type(int mode);
472         void set_auto_keyframes(int value, int lock_mwindow, int lock_cwindow);
473         void set_auto_visibility(Autos *autos, int value);
474         void set_labels_follow_edits(int value);
475
476 // Update the editing mode
477         int set_editing_mode(int new_editing_mode, int lock_mwindow, int lock_cwindow);
478         void toggle_editing_mode();
479         void set_inpoint(int is_mwindow);
480         void set_outpoint(int is_mwindow);
481         void unset_inoutpoint(int is_mwindow);
482         void toggle_loop_playback();
483         void trim_selection();
484 // Synchronize EDL settings with all playback engines depending on current
485 // operation.  Doesn't redraw anything.
486         void sync_parameters(int change_type = CHANGE_PARAMS);
487         void save_clip(EDL *new_edl, const char *txt);
488         void to_clip(EDL *edl, const char *txt, int all);
489         int toggle_label(int is_mwindow);
490         void undo_entry(BC_WindowBase *calling_window_gui);
491         void redo_entry(BC_WindowBase *calling_window_gui);
492         void save_undo_data();
493         void load_undo_data();
494         int copy_target(const char *path, const char *target);
495         int link_target(const char *real_path, const char *link_path, int relative);
496         void save_project(const char *dir, int save_mode, int overwrite, int reload);
497
498         int cut_automation();
499         int copy_automation();
500         int paste_automation();
501         void clear_automation();
502         int cut_default_keyframe();
503         int copy_default_keyframe();
504 // Use paste_automation to paste the default keyframe in other position.
505 // Use paste_default_keyframe to replace the default keyframe with whatever is
506 // in the clipboard.
507         int paste_default_keyframe();
508         int clear_default_keyframe();
509
510         FloatAuto* get_float_auto(PatchGUI *patch,int idx);
511         IntAuto* get_int_auto(PatchGUI *patch,int idx);
512         PanAuto* get_pan_auto(PatchGUI *patch);
513         PatchGUI *get_patchgui(Track *track);
514
515         int modify_edithandles();
516         int modify_pluginhandles();
517         void finish_modify_handles();
518         void rescale_proxy(EDL *clip, int orig_scale, int new_scale);
519         void add_proxy(int use_scaler,
520                 ArrayList<Indexable*> *orig_assets,
521                 ArrayList<Indexable*> *proxy_assets);
522         int render_proxy(ArrayList<Indexable *> &new_idxbls);
523         void beep(double freq, double secs, double gain);
524         int enable_proxy();
525         int disable_proxy();
526         int to_proxy(Asset *asset, int new_scale, int new_use_scaler);
527         ProxyBeep *proxy_beep;
528
529         void dump_plugins(FILE *fp=stdout);
530         void dump_edl(FILE *fp=stdout);
531         void dump_undo(FILE *fp=stdout);
532         void dump_exe(FILE *fp=stdout);
533         static void trap_hook(FILE *fp, void *vp);
534
535         void reset_android_remote();
536
537 // Send new EDL to caches
538         void age_caches();
539         int optimize_assets();            // delete unused assets from the cache and assets
540
541         void select_point(double position);
542         int set_loop_boundaries();         // toggle loop playback and set boundaries for loop playback
543
544
545         Playback3D *playback_3d;
546         SplashGUI *splash_window;
547
548 // Main undo stack
549         MainUndo *undo;
550         BC_Hash *defaults;
551         Assets *assets;
552 // CICaches for drawing timeline only
553         CICache *audio_cache, *video_cache;
554 // Frame cache for drawing timeline only.
555 // Cache drawing doesn't wait for file decoding.
556         FrameCache *frame_cache;
557         WaveCache *wave_cache;
558         Preferences *preferences;
559         PreferencesThread *preferences_thread;
560         MainSession *session;
561         Theme *theme;
562         MainIndexes *mainindexes;
563         MainProgress *mainprogress;
564         BRender *brender;
565         char cin_lang[4];
566         int brender_active;
567         const char *default_standard;
568         static Commercials *commercials;
569         int commercial_active;
570         int has_commercials();
571 // copy of edl created in speed_before, used in speed_after to normalize_speed
572         EDL *speed_edl;
573
574 // Menu items
575         ArrayList<ColormodelItem*> colormodels;
576         ArrayList<InterlacemodeItem*>          interlace_project_modes;
577         ArrayList<InterlacemodeItem*>          interlace_asset_modes;
578         ArrayList<InterlacefixmethodItem*>     interlace_asset_fixmethods;
579
580         int reset_meters();
581         void resync_guis();
582
583         int select_asset(Asset *asset, int vstream, int astream, int delete_tracks);
584         int select_asset(int vtrack, int delete_tracks);
585
586 // Channel DB for playback only.  Record channel DB's are in record.C
587         ChannelDB *channeldb_buz;
588         ChannelDB *channeldb_v4l2jpeg;
589
590 // ====================================== plugins ==============================
591
592 // Contains file descriptors for all the dlopens
593         static ArrayList<PluginServer*> *plugindb;
594 // Currently visible plugins
595         int64_t plugin_visibility;
596         ArrayList<PluginServer*> *plugin_guis;
597 // GUI Plugins to delete
598         ArrayList<PluginServer*> *dead_plugins;
599 // Keyframe editors
600         ArrayList<KeyFrameThread*> *keyframe_threads;
601
602 // Adjust sample position to line up with frames.
603         int fix_timing(int64_t &samples_out,
604                 int64_t &frames_out,
605                 int64_t samples_in);
606
607
608         CreateBD_Thread *create_bd;
609         CreateDVD_Thread *create_dvd;
610         BatchRenderThread *batch_render;
611         Render *render;
612
613         ExportEDL *exportedl;
614
615
616 // Master edl
617         EDL *edl;
618 // Main Window GUI
619         MWindowGUI *gui;
620 // Compositor
621         CWindow *cwindow;
622 // Viewer
623         Mutex *vwindows_lock;
624         ArrayList<VWindow*> vwindows;
625 // Mixer
626         Mutex *zwindows_lock;
627         ArrayList<ZWindow*> zwindows;
628 // Asset manager
629         AWindow *awindow;
630 // Automation window
631         GWindow *gwindow;
632 // Tip of the day
633         TipWindow *twindow;
634 // Warning window
635         WWindow *wwindow;
636         void show_warning(int *do_warning, const char *text);
637         int wait_warning();
638 // Levels
639         LevelWindow *lwindow;
640         Mutex *run_lock;
641 // Lock during creation and destruction of GUI
642         Mutex *plugin_gui_lock;
643         Mutex *dead_plugin_lock;
644         Mutex *keyframe_gui_lock;
645 // Lock during creation and destruction of brender so playback doesn't use it.
646         Mutex *brender_lock;
647 // Initialize shared memory
648         void init_shm(const char *pfn, int64_t min);
649 // Initialize channel DB's for playback
650         void init_channeldb();
651         void init_render();
652         void init_exportedl();
653 // These three happen synchronously with each other
654 // Make sure this is called after synchronizing EDL's.
655         void init_brender();
656 // Restart brender after testing its existence
657         void restart_brender();
658 // Stops brender after testing its existence
659         void stop_brender();
660 // This one happens asynchronously of the others.  Used by playback to
661 // see what frame is background rendered.
662         int brender_available(int position);
663         void set_brender_active(int v, int update=1);
664         int put_commercial();
665         void activate_commercial() { commercial_active = 1; }
666         void commit_commercial();
667         void undo_commercial();
668         void cut_commercials();
669         void update_gui(int changed_edl);
670         int paste_subtitle_text(char *text, double start, double end);
671
672         void init_error();
673         void finit_error();
674         static void init_defaults(BC_Hash* &defaults, char *config_path);
675         void check_language();
676         const char *default_std();
677         void fill_preset_defaults(const char *preset, EDLSession *session);
678         const char *get_preset_name(int index);
679         void init_edl();
680         void init_awindow();
681         void init_gwindow();
682         void init_tipwindow();
683 // Used by MWindow and RenderFarmClient
684         static void get_plugin_path(char *path, const char *plug_dir, const char *fs_path);
685         static int init_plugins(MWindow *mwindow, Preferences *preferences);
686         static int init_ladspa_plugins(MWindow *mwindow, Preferences *preferences);
687         static void init_plugin_tips(ArrayList<PluginServer*> &plugins, const char *lang);
688         static int check_plugin_index(ArrayList<PluginServer*> &plugins,
689                 const char *plug_dir, const char *plug_path);
690         static void init_plugin_index(MWindow *mwindow, Preferences *preferences,
691                 FILE *fp, const char *plugin_dir);
692         static int init_ladspa_index(MWindow *mwindow, Preferences *preferences,
693                 FILE *fp, const char *plugin_dir);
694         static void scan_plugin_index(MWindow *mwindow, Preferences *preferences,
695                 FILE *fp, const char *plug_dir, const char *plug_path, int &idx);
696         static void init_ffmpeg();
697         static void init_ffmpeg_index(MWindow *mwindow, Preferences *preferences, FILE *fp);
698         static int load_plugin_index(MWindow *mwindow, FILE *fp, const char *plugin_dir);
699         static PluginServer *new_ffmpeg_server(MWindow *mwindow, const char *name);
700         static int init_lv2_index(MWindow *mwindow, Preferences *preferences, FILE *fp);
701         static PluginServer *new_lv2_server(MWindow *mwindow, const char *name);
702         static void remove_plugin_index();
703
704         void init_preferences();
705         void init_signals();
706         void init_theme();
707         void init_compositor();
708         void init_levelwindow();
709 // Called when creating a new viewer to view footage
710         VWindow* get_viewer(int start_it, int idx=-1);
711         void init_cache();
712         void init_menus();
713         void init_indexes();
714         void init_gui();
715         void init_3d();
716         void init_playbackcursor();
717         void init_commercials();
718         static void add_plugins(ArrayList<PluginServer*> &plugins);
719         static void delete_plugins();
720         void speed_before();
721         int speed_after(int done);
722         int normalize_speed(EDL *old_edl, EDL *new_edl);
723 //
724         void clean_indexes();
725 //      TimeBomb timebomb;
726         SigHandler *sighandler;
727         int restart_status;
728         int screens;
729         int in_destructor;
730 };
731
732 #endif