Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / main.C
index 8a4815f9eb32d469189a6e30fd963ce67b34e826..b1f1fb6995c38537c5573bcd2b565ae414f41e6f 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * CINELERRA
  * Copyright (C) 2010 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,6 +23,7 @@
 #include "arraylist.h"
 #include "batchrender.h"
 #include "bcsignals.h"
+#include "cstrdup.h"
 #include "edl.h"
 #include "file.h"
 #include "filexml.h"
@@ -141,6 +143,15 @@ static float get_layout_scale()
        return scale;
 }
 
+/*******************************************************************
+* @mainpage
+* Cinelerra-GG is a professional video editor for Linux. It is timeline
+* based, supports hundreds of (de)coders, LADSPA and LV2 audio plugins,
+* FFMPEG audio/video plugins, plus built-in audio/video plugins.
+* Screen sizes up to 8K, any frame rate, extensive compositing features,
+* title generator and more.
+*
+********************************************************************/
 int main(int argc, char *argv[])
 {
 // handle command line arguments first
@@ -167,8 +178,9 @@ int main(int argc, char *argv[])
        batch_path[0] = 0;
        deamon_path[0] = 0;
        Units::init();
-
-       File::init_cin_path();
+       const char *lang = getenv("LANGUAGE");
+       if( lang ) lang = cstrdup(lang);
+       File::init_cin_env_vars();
        const char *locale_path = File::get_locale_path();
        const char *cin = File::get_cin();
 
@@ -297,9 +309,18 @@ int main(int argc, char *argv[])
 #ifndef COPYRIGHTTEXT2
 #define COPYRIGHTTEXT2 ""
 #endif
+#ifndef COPYRIGHTTEXT3
+#define COPYRIGHTTEXT3 ""
+#endif
+
                fprintf(stderr, "%s %s - %s\n%s",
                        PROGRAM_NAME,CINELERRA_VERSION, AboutPrefs::build_timestamp,
                        REPOMAINTXT COPYRIGHTTEXT1 COPYRIGHTTEXT2);
+               fprintf(stderr, "%s", COPYRIGHTTEXT3);
+               fprintf(stderr, "%s", COPYRIGHTTEXT4);
+               fprintf(stderr,"\n");
+               fprintf(stderr, "%s \n", AboutPrefs::ffmpeg_version);
+               fprintf(stderr,"\n");
                fprintf(stderr, "%s is free software, covered by the GNU General Public License,\n"
                        "and you are welcome to change it and/or distribute copies of it under\n"
                        "certain conditions. There is absolutely no warranty for %s.\n\n",
@@ -397,7 +418,6 @@ int main(int argc, char *argv[])
                                }
                                if( restart <= 0 )
                                        done = 1;
-
                                mwindow.save_defaults();
                                mwindow.save_undo_data();
 //PRINT_TRACE
@@ -406,6 +426,10 @@ int main(int argc, char *argv[])
                        }
 
                        if( restart < 0 ) {
+                               if( lang ) // reset to cmdline state
+                                       setenv("LANGUAGE", lang, 1);
+                               else
+                                       unsetenv("LANGUAGE");
                                char exe_path[BCTEXTLEN];
                                int len = readlink("/proc/self/exe", exe_path, sizeof(exe_path)-1);
                                if( len < 0 ) break;
@@ -423,6 +447,7 @@ DISABLE_BUFFER
        }
 
        filenames.remove_all_objects();
+       delete [] lang;
        Units::finit();
        BC_WindowBase::finit_resources();