X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fproxy.h;h=b11212546b930fd9b8f8448388d9631c8b4cd852;hb=976d56536456148f6d14a2c12630c20e367abbe1;hp=1404593f986e1a529cab4fa9580f2353359ee8a2;hpb=2f1bbd12877daf745e1d18b62b731f04cece827e;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/proxy.h b/cinelerra-5.1/cinelerra/proxy.h index 1404593f..b1121254 100644 --- a/cinelerra-5.1/cinelerra/proxy.h +++ b/cinelerra-5.1/cinelerra/proxy.h @@ -24,6 +24,7 @@ // functions for handling proxies #include "arraylist.h" +#include "audiodevice.inc" #include "asset.h" #include "bcdialog.h" #include "cache.inc" @@ -32,17 +33,16 @@ #include "loadbalance.h" #include "mutex.inc" #include "mwindow.inc" +#include "proxy.inc" #include "renderengine.inc" -class ProxyDialog; -class ProxyWindow; - #define MAX_SIZES 16 class ProxyMenuItem : public BC_MenuItem { public: ProxyMenuItem(MWindow *mwindow); + ~ProxyMenuItem(); int handle_event(); void create_objects(); @@ -67,7 +67,7 @@ public: ProxyRender(MWindow *mwindow, Asset *format_asset); ~ProxyRender(); void to_proxy_path(char *new_path, Indexable *indexable, int scale); - void from_proxy_path(char *new_path, Asset *asset, int scale); + static int from_proxy_path(char *new_path, Indexable *indexable, int scale); ArrayList orig_idxbls; // originals which match the proxy assets ArrayList orig_proxies; // proxy assets @@ -99,7 +99,7 @@ public: void handle_close_event(int result); void from_proxy(); - void to_proxy(); + int to_proxy(); // calculate possible sizes based on the original size void calculate_sizes(); void scale_to_text(char *string, int scale); @@ -108,11 +108,13 @@ public: ProxyWindow *gui; Asset *asset; ProxyRender *proxy_render; + ProxyBeep *proxy_beep; int new_scale; int orig_scale; int use_scaler; int auto_scale; + int beep; char *size_text[MAX_SIZES]; int size_factors[MAX_SIZES]; int total_sizes; @@ -138,6 +140,16 @@ public: ProxyWindow *pwindow; }; +class ProxyBeepOnDone : public BC_CheckBox +{ +public: + ProxyBeepOnDone(ProxyWindow *pwindow, int x, int y); + void update(); + int handle_event(); + + ProxyWindow *pwindow; +}; + class ProxyFormatTools : public FormatTools { public: @@ -189,6 +201,7 @@ public: ProxyMenu *scale_factor; ProxyUseScaler *use_scaler; ProxyAutoScale *auto_scale; + ProxyBeepOnDone *beep_on_done; }; class ProxyFarm; @@ -232,4 +245,24 @@ public: ArrayList *proxy_assets; }; +class ProxyBeep : public Thread +{ +public: + enum { BEEP_SAMPLE_RATE=48000 }; + typedef int16_t audio_data_t; + ProxyBeep(MWindow *mwindow); + ~ProxyBeep(); + + 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; +}; + #endif