18 new shapewipe transitions from rafa, rework savefile/confirm for nested edl edits
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / lv2ui.C
1 #include <stdio.h>
2 #include <signal.h>
3
4 #include <gtk/gtk.h>
5 #include <gdk/gdk.h>
6
7 #include "bcsignals.h"
8 #include "pluginlv2client.h"
9 #include "pluginlv2ui.h"
10
11 int main(int ac, char **av)
12 {
13 // to grab this task in the debugger
14 const char *cp = getenv("BUG");
15 static int zbug = !cp ? 0 : atoi(cp);  volatile int bug = zbug;
16 while( bug ) usleep(10000);
17         BC_WindowBase::init_resources(1);
18         BC_Signals signals;
19         if( getenv("BC_TRAP_LV2_SEGV") ) {
20                 signals.initialize("/tmp/lv2ui_%d.dmp");
21                 BC_Signals::set_catch_segv(1);
22         }
23         return PluginLV2ChildUI().run(ac, av);
24 }
25
26 int PluginLV2ChildUI::run(int ac, char **av)
27 {
28         this->ac = ac;
29         this->av = av;
30
31         if( ac > 3 ) {
32                 signal(SIGINT, SIG_IGN);
33                 ForkBase::child_fd = atoi(av[1]);
34                 ForkBase::parent_fd = atoi(av[2]);
35                 ForkBase::ppid = atoi(av[3]);
36         }
37         else {
38                 int sample_rate = samplerate, bfrsz = block_length;
39                 if( ac > 2 ) sample_rate = atoi(av[2]);
40                 if( init_ui(av[1], sample_rate, bfrsz) ) {
41                         fprintf(stderr," init_ui failed\n");
42                         return 1;
43                 }
44                 start_gui();
45         }
46         return run_ui();
47 }
48