vicon drawing segv fix, beeper consolidation, render_effect resize wdw fix, valgrind...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mwindow.h
index b0e7877257dbffe458926bacbc536082340b0715..a38d057d35876af3039d187e09dd61034b061530 100644 (file)
 
 #define FONT_SEARCHPATH "fonts"
 
+class StackItem
+{
+public:
+       EDL *edl, *new_edl;
+       MainUndo *undo;
+};
+
+class Stack : public ArrayList<StackItem>
+{
+public:
+};
+
+
+#define BEEP_SAMPLE_RATE 48000
+
+class Beeper : public Thread
+{
+public:
+       typedef int16_t audio_data_t;
+       Beeper(MWindow *mwindow);
+       ~Beeper();
+
+       void run();
+       void start();
+       void stop(int wait);
+       void tone(double freq, double secs, double gain);
+
+       MWindow *mwindow;
+       double freq, secs, gain;
+       AudioDevice *audio;
+       int playing_audio, interrupted;
+       int audio_pos;
+};
+
 
 class MWindow : public Thread
 {
@@ -135,6 +169,12 @@ public:
        int get_tracks_height();
 // Total horizontal pixels in timeline
        int get_tracks_width();
+// session stack
+       void stack_push(EDL *edl);
+       void stack_pop();
+       void forget_nested_edl(EDL *nested);
+       void clip_to_media();
+       void media_to_clip();
 // Show windows
        void show_vwindow();
        void show_awindow();
@@ -218,7 +258,7 @@ public:
        void create_mixers(double position = 0);
        void refresh_mixers(int dir=1);
        void stop_mixers();
-       void close_mixers(int destroy=1);
+       void close_mixers(int result=1);
        void open_mixers();
        ZWindow *get_mixer(Mixer *&mixer);
        void del_mixer(ZWindow *zwindow);
@@ -289,6 +329,7 @@ public:
        void split_y();
        void crop_video(int mode);
        void update_plugins();
+       void get_backup_path(char *path, int len);
 // Call after every edit operation
        void save_backup();
        void load_backup();
@@ -314,6 +355,7 @@ public:
 // Returns 1 if a GUI for the plugin is open so OpenGL routines can determine if
 // they can run.
        int plugin_gui_open(Plugin *plugin);
+       void stop_plugin_guis();
 
        void show_keyframe_gui(Plugin *plugin);
        void hide_keyframe_guis();
@@ -534,7 +576,7 @@ public:
        int enable_proxy();
        int disable_proxy();
        int to_proxy(Asset *asset, int new_scale, int new_use_scaler);
-       ProxyBeep *proxy_beep;
+       Beeper *beeper;
 
        void dump_plugins(FILE *fp=stdout);
        void dump_edl(FILE *fp=stdout);
@@ -563,6 +605,8 @@ public:
 // Main undo stack
        MainUndo *undo;
        int undo_command;
+// session stack
+       Stack stack;
 
        BC_Hash *defaults;
        Assets *assets;