add proxy index builds, perperual session, backup.prev, disarmed track indication...
authorGood Guy <good1.2guy@gmail.com>
Fri, 16 Mar 2018 20:01:55 +0000 (14:01 -0600)
committerGood Guy <good1.2guy@gmail.com>
Fri, 16 Mar 2018 20:01:55 +0000 (14:01 -0600)
38 files changed:
cinelerra-5.1/cinelerra/appearanceprefs.C
cinelerra-5.1/cinelerra/appearanceprefs.h
cinelerra-5.1/cinelerra/appearanceprefs.inc
cinelerra-5.1/cinelerra/edl.C
cinelerra-5.1/cinelerra/edl.h
cinelerra-5.1/cinelerra/main.C
cinelerra-5.1/cinelerra/mainundo.C
cinelerra-5.1/cinelerra/mainundo.h
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindow.h
cinelerra-5.1/cinelerra/mwindow.inc
cinelerra-5.1/cinelerra/patchgui.C
cinelerra-5.1/cinelerra/patchgui.h
cinelerra-5.1/cinelerra/preferences.C
cinelerra-5.1/cinelerra/preferences.h
cinelerra-5.1/cinelerra/preferences.inc
cinelerra-5.1/cinelerra/proxy.C
cinelerra-5.1/cinelerra/quit.C
cinelerra-5.1/cinelerra/undostack.C
cinelerra-5.1/cinelerra/undostack.h
cinelerra-5.1/configure.ac
cinelerra-5.1/guicast/bcresources.C
cinelerra-5.1/guicast/bcresources.h
cinelerra-5.1/guicast/bctextbox.C
cinelerra-5.1/guicast/bctextbox.h
cinelerra-5.1/guicast/bctheme.C
cinelerra-5.1/plugins/theme_blond/blondtheme.C
cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C
cinelerra-5.1/plugins/theme_blue/bluetheme.C
cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C
cinelerra-5.1/plugins/theme_bright/brighttheme.C
cinelerra-5.1/plugins/theme_hulk/hulktheme.C
cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C
cinelerra-5.1/plugins/theme_suv/suv.C
cinelerra-5.1/plugins/theme_unflat/unflattheme.C
cinelerra-5.1/thirdparty/downloads.txt
cinelerra-5.1/thirdparty/src/libvpx-1.6.1.tar.xz [deleted file]
cinelerra-5.1/thirdparty/src/libvpx-1.7.0.tar.xz [new file with mode: 0644]

index 0960bb308dc253b786563a77875b3a94839fedd4..15e61cdfa23c85be241c6b40ec91ef11d2ab529b 100644 (file)
@@ -190,6 +190,8 @@ void AppearancePrefs::create_objects()
        add_subwindow(displacement);
        y1 += displacement->get_h() + 5;
        add_subwindow(thumbnails = new ViewThumbnails(x1, y1, pwindow));
+       y1 += thumbnails->get_h() + 5;
+       add_subwindow(perpetual = new PerpetualSession(x1, y1, pwindow));
        if( y < y1 ) y = y1;
 }
 
@@ -628,3 +630,17 @@ int YuvColorRangeItem::handle_event()
        return popup->handle_event();
 }
 
+
+PerpetualSession::PerpetualSession(int x, int y, PreferencesWindow *pwindow)
+ : BC_CheckBox(x, y,
+       pwindow->thread->preferences->perpetual_session, _("Perpetual session"))
+{
+       this->pwindow = pwindow;
+}
+
+int PerpetualSession::handle_event()
+{
+       pwindow->thread->preferences->perpetual_session = get_value();
+       return 1;
+}
+
index 600b827019a91e66ae1a05faca11341d0203ae74..392650cf189740f3b611d2af1b2f153851a0c7c1 100644 (file)
@@ -49,6 +49,7 @@ public:
        ViewThumbnails *thumbnails;
        YuvColorSpace *yuv_color_space;
        YuvColorRange *yuv_color_range;
+       PerpetualSession *perpetual;
 };
 
 
@@ -297,4 +298,12 @@ public:
        int id;
 };
 
+class PerpetualSession : public BC_CheckBox
+{
+public:
+       PerpetualSession(int x, int y, PreferencesWindow *pwindow);
+       int handle_event();
+       PreferencesWindow *pwindow;
+};
+
 #endif
index 69f617ce673709540a33fecc78743f521a284ab9..128194ade15b572f0e0e951b1b107e08289e03d8 100644 (file)
@@ -49,5 +49,6 @@ class YuvColorSpace;
 class YuvColorSpaceItem;
 class YuvColorRange;
 class YuvColorRangeItem;
+class PerpetualSession;
 
 #endif
index 55ca9a2947b4d933b5f8edfd305eece56cd88b47..55b2caf455b25ef7ee355dfdb61d695e151c11ef 100644 (file)
@@ -339,7 +339,7 @@ int EDL::read_xml(FileXML *file, uint32_t load_flags)
 // The string is not terminated in this call.
 int EDL::save_xml(FileXML *file, const char *output_path)
 {
-       copy(0, tracks->total_length(), 1, file, output_path, 0);
+       copy(1, file, output_path, 0);
        return 0;
 }
 
@@ -472,6 +472,10 @@ int EDL::copy(double start, double end, int all,
        return copy(start, end, all,
                "/EDL", file, output_path, rewind_it);
 }
+int EDL::copy(int all, FileXML *file, const char *output_path, int rewind_it)
+{
+       return copy(0, tracks->total_length(), all, file, output_path, rewind_it);
+}
 
 int EDL::copy_clip(double start, double end, int all,
        FileXML *file, const char *output_path, int rewind_it)
@@ -480,6 +484,11 @@ int EDL::copy_clip(double start, double end, int all,
        return copy(start, end, all,
                "/CLIP_EDL", file, output_path, rewind_it);
 }
+int EDL::copy_clip(int all, FileXML *file, const char *output_path, int rewind_it)
+{
+       return copy_clip(0, tracks->total_length(), all, file, output_path, rewind_it);
+}
+
 int EDL::copy_nested_edl(double start, double end, int all,
        FileXML *file, const char *output_path, int rewind_it)
 {
@@ -488,6 +497,11 @@ int EDL::copy_nested_edl(double start, double end, int all,
        return copy(start, end, all,
                "/NESTED_EDL", file, output_path, rewind_it);
 }
+int EDL::copy_nested_edl(int all, FileXML *file, const char *output_path, int rewind_it)
+{
+       return copy_nested_edl(0, tracks->total_length(), all, file, output_path, rewind_it);
+}
+
 int EDL::copy_vwindow_edl(double start, double end, int all,
        FileXML *file, const char *output_path, int rewind_it)
 {
@@ -495,6 +509,11 @@ int EDL::copy_vwindow_edl(double start, double end, int all,
        return copy(start, end, all,
                "/VWINDOW_EDL", file, output_path, rewind_it);
 }
+int EDL::copy_vwindow_edl(int all, FileXML *file, const char *output_path, int rewind_it)
+{
+       return copy_vwindow_edl(0, tracks->total_length(), all, file, output_path, rewind_it);
+}
+
 
 int EDL::copy(double start, double end, int all,
        const char *closer, FileXML *file,
@@ -549,12 +568,10 @@ int EDL::copy(double start, double end, int all,
 // Don't want this if using clipboard
                if( all ) {
                        for( int i=0; i<total_vwindow_edls(); ++i )
-                               get_vwindow_edl(i)->copy_vwindow_edl(0, tracks->total_length(), 1,
-                                       file, output_path, 0);
+                               get_vwindow_edl(i)->copy_vwindow_edl(1, file, output_path, 0);
 
                        for( int i=0; i<clips.size(); ++i )
-                               clips[i]->copy_clip(0, tracks->total_length(), 1,
-                                       file, output_path, 0);
+                               clips[i]->copy_clip(1, file, output_path, 0);
 
                        mixers.save(file);
                }
index d523779b8f4637d6e4b8eabcc71926e6b33a8667..77b7bfd80999e3358d75be905665c9d04caa1332 100644 (file)
@@ -102,14 +102,22 @@ public:
 // Scale all sample values since everything is locked to audio
        void rechannel();
        void resample(double old_rate, double new_rate, int data_type);
+
        int copy(double start, double end, int all,
                FileXML *file, const char *output_path, int rewind_it);
+       int copy(int all, FileXML *file, const char *output_path, int rewind_it);
+
        int copy_clip(double start, double end, int all,
                FileXML *file, const char *output_path, int rewind_it);
+       int copy_clip(int all, FileXML *file, const char *output_path, int rewind_it);
+
        int copy_nested_edl(double start, double end, int all,
                FileXML *file, const char *output_path, int rewind_it);
+       int copy_nested_edl(int all, FileXML *file, const char *output_path, int rewind_it);
+
        int copy_vwindow_edl(double start, double end, int all,
                FileXML *file, const char *output_path, int rewind_it);
+       int copy_vwindow_edl(int all, FileXML *file, const char *output_path, int rewind_it);
 
        void copy_tracks(EDL *edl);
 // Copies project path, folders, EDLSession, and LocalSession from edl argument.
index 92a6a821678d45bee9e3034155b233187b2a906b..e67dd2f4b5a8b30a182a1f65eb1e178c5242cf18 100644 (file)
@@ -89,7 +89,7 @@ public:
 //PRINT_TRACE
                mwindow->load_filenames(filenames, LOADMODE_REPLACE);
 //PRINT_TRACE
-               if(filenames->size() == 1)
+               if( filenames->size() == 1 )
                        mwindow->gui->mainmenu->add_load(filenames->get(0));
 //PRINT_TRACE
                mwindow->gui->unlock_window();
@@ -115,6 +115,7 @@ int main(int argc, char *argv[])
        char config_path[BCTEXTLEN];
        char batch_path[BCTEXTLEN];
        int nice_value = 20;
+       int load_perpetual = 1;
        config_path[0] = 0;
        batch_path[0] = 0;
        deamon_path[0] = 0;
@@ -137,24 +138,24 @@ int main(int argc, char *argv[])
                // Extract from locale language & region
                char locbuf[32], *p;
                locbuf[0] = 0;
-               if((p = strchr(loc, '.')) != 0 && (p - loc) < (int)sizeof(locbuf)-1) {
+               if( (p = strchr(loc, '.')) != 0 && (p - loc) < (int)sizeof(locbuf)-1 ) {
                        strncpy(locbuf, loc, p - loc);
                        locbuf[p - loc] = 0;
                }
-               else if(strlen(loc) < sizeof(locbuf)-1)
+               else if( strlen(loc) < sizeof(locbuf)-1 )
                        strcpy(locbuf, loc);
 
                 // Locale 'C' does not give useful language info - assume en
-               if(!locbuf[0] || locbuf[0] == 'C')
+               if( !locbuf[0] || locbuf[0] == 'C' )
                        strcpy(locbuf, "en");
 
-               if((p = strchr(locbuf, '_')) && p - locbuf < LEN_LANG) {
+               if( (p = strchr(locbuf, '_')) && p - locbuf < LEN_LANG ) {
                        *p++ = 0;
                        strcpy(BC_Resources::language, locbuf);
-                       if(strlen(p) < LEN_LANG)
+                       if( strlen(p) < LEN_LANG )
                                strcpy(BC_Resources::region, p);
                }
-               else if(strlen(locbuf) < LEN_LANG)
+               else if( strlen(locbuf) < LEN_LANG )
                        strcpy(BC_Resources::language, locbuf);
        }
        else
@@ -167,88 +168,62 @@ int main(int argc, char *argv[])
        int load_backup = 0;
        int start_remote_control = 0;
 
-       for(int i = 1; i < argc; i++)
-       {
-               if(!strcmp(argv[i], "-h"))
-               {
+       for( int i = 1; i < argc; i++ ) {
+               if( !strcmp(argv[i], "-h") ) {
                        operation = DO_USAGE;
                }
-               else
-               if(!strcmp(argv[i], "-z"))
-               {
+               else if( !strcmp(argv[i], "-z") ) {
                        start_remote_control = 1;
                }
-               else
-               if(!strcmp(argv[i], "-r"))
-               {
+               else if( !strcmp(argv[i], "-r") ) {
                        operation = DO_BATCHRENDER;
-                       if(argc > i + 1)
-                       {
-                               if(argv[i + 1][0] != '-')
-                               {
+                       if( argc > i + 1 ) {
+                               if( argv[i + 1][0] != '-' ) {
                                        strcpy(batch_path, argv[i + 1]);
                                        i++;
                                }
                        }
                }
-               else
-               if(!strcmp(argv[i], "-c"))
-               {
-                       if(argc > i + 1)
-                       {
+               else if( !strcmp(argv[i], "-c") ) {
+                       if( argc > i + 1 ) {
                                strcpy(config_path, argv[i + 1]);
                                i++;
                        }
-                       else
-                       {
+                       else {
                                fprintf(stderr, _("%s: -c needs a filename.\n"), argv[0]);
                        }
                }
-               else
-               if(!strcmp(argv[i], "-d") || !strcmp(argv[i], "-f"))
-               {
-                       if(!strcmp(argv[i], "-d"))
-                               operation = DO_DEAMON;
-                       else
-                               operation = DO_DEAMON_FG;
-
-                       if(argc > i + 1)
-                       {
-                               if(atol(argv[i + 1]) > 0)
-                               {
+               else if( !strcmp(argv[i], "-d") || !strcmp(argv[i], "-f") ) {
+                       operation = !strcmp(argv[i], "-d") ? DO_DEAMON : DO_DEAMON_FG;
+                       if( argc > i + 1 ) {
+                               if( atol(argv[i + 1]) > 0 ) {
                                        deamon_port = atol(argv[i + 1]);
                                        i++;
                                }
                        }
                }
-               else
-               if(!strcmp(argv[i], "-b"))
-               {
+               else if( !strcmp(argv[i], "-b") ) {
                        operation = DO_BRENDER;
-                       if(i > argc - 2)
-                       {
+                       if( i > argc - 2 ) {
                                fprintf(stderr, _("-b may not be used by the user.\n"));
                                exit(1);
                        }
                        else
                                strcpy(deamon_path, argv[i + 1]);
                }
-               else
-               if(!strcmp(argv[i], "-n"))
-               {
-                       if(argc > i + 1)
-                       {
+               else if( !strcmp(argv[i], "-n") ) {
+                       if( argc > i + 1 ) {
                                nice_value = atol(argv[i + 1]);
                                i++;
                        }
                }
-               else
-               if(!strcmp(argv[i], "-x"))
-               {
+               else if( !strcmp(argv[i], "-x") ) {
                        load_backup = 1;
                }
-               else
-               {
+               else if( !strcmp(argv[i], "-S") ) {
+                       load_perpetual = 0;
+               }
+               else {
                        char *new_filename;
                        new_filename = new char[BCTEXTLEN];
                        strcpy(new_filename, argv[i]);
@@ -259,11 +234,9 @@ int main(int argc, char *argv[])
 
 
 
-       if(operation == DO_GUI ||
-               operation == DO_DEAMON ||
-               operation == DO_DEAMON_FG ||
-               operation == DO_USAGE ||
-               operation == DO_BATCHRENDER) {
+       if( operation == DO_GUI ||
+           operation == DO_DEAMON || operation == DO_DEAMON_FG ||
+           operation == DO_USAGE  || operation == DO_BATCHRENDER) {
 
 #ifndef REPOMAINTXT
 #define REPOMAINTXT ""
@@ -283,8 +256,7 @@ int main(int argc, char *argv[])
                        PROGRAM_NAME, PROGRAM_NAME);
        }
 
-       switch(operation)
-       {
+       switch( operation ) {
                case DO_USAGE:
                        printf(_("\nUsage:\n"));
                        printf(_("%s [-f] [-c configuration] [-d port] [-n nice] [-r batch file] [filenames]\n\n"), argv[0]);
@@ -295,19 +267,18 @@ int main(int argc, char *argv[])
                                File::get_config_path(), CONFIG_FILE);
                        printf(_("-r = batch render the contents of the batch file (%s/%s) with no GUI.  batch file is optional.\n"),
                                File::get_config_path(), BATCH_PATH);
+                       printf(_("-S = do not reload perpetual session\n"));
+                       printf(_("-x = reload from backup\n"));
                        printf(_("filenames = files to load\n\n\n"));
                        exit(0);
                        break;
 
                case DO_DEAMON:
-               case DO_DEAMON_FG:
-               {
-                       if(operation == DO_DEAMON)
-                       {
+               case DO_DEAMON_FG: {
+                       if( operation == DO_DEAMON ) {
                                int pid = fork();
 
-                               if(pid)
-                               {
+                               if( pid ) {
 // Redhat 9 requires _exit instead of exit here.
                                        _exit(0);
                                }
@@ -318,36 +289,32 @@ int main(int argc, char *argv[])
                                nice_value,
                                config_path);
                        client.main_loop();
-                       break;
-               }
+                       break; }
 
 // Same thing without detachment
-               case DO_BRENDER:
-               {
+               case DO_BRENDER: {
                        RenderFarmClient client(0,
                                deamon_path,
                                20,
                                config_path);
                        client.main_loop();
-                       break;
-               }
+                       break; }
 
-               case DO_BATCHRENDER:
-               {
+               case DO_BATCHRENDER: {
                        BatchRenderThread *thread = new BatchRenderThread;
                        thread->start_rendering(config_path,
                                batch_path);
-                       break;
-               }
+                       break; }
 
-               case DO_GUI:
-               {
+               case DO_GUI: {
                        int restart = 0, done = 0;
                        while( !done ) {
                                BC_WindowBase::get_resources()->vframe_shm = 0;
                                MWindow mwindow;
                                mwindow.create_objects(1, !filenames.total, config_path);
                                CommandLineThread *thread  = 0;
+                               if( mwindow.preferences->perpetual_session && load_perpetual )
+                                       mwindow.load_undo_data();
 //SET_TRACE
 // load the initial files on seperate tracks
 // use a new thread so it doesn't block the GUI
@@ -382,6 +349,8 @@ int main(int argc, char *argv[])
                                        done = 1;
 
                                mwindow.save_defaults();
+                               if( mwindow.preferences->perpetual_session )
+                                       mwindow.save_undo_data();
 //PRINT_TRACE
                                filenames.remove_all_objects();
                                delete thread;
@@ -399,10 +368,9 @@ int main(int argc, char *argv[])
                                av[ac++] = 0;
                                execv(exe_path, av);
                        }
-               }
 //SET_TRACE
 DISABLE_BUFFER
-               break;
+               break; }
        }
 
        filenames.remove_all_objects();
index 3bc8d7cfde8af8135574fc4d1f2acadb13a8dbbc..9cd3562eba166f9dd1019f9712cd925ce74f8671 100644 (file)
@@ -292,3 +292,30 @@ void MainUndo::dump(FILE *fp)
        undo_stack->dump(fp);
 }
 
+void MainUndo::save(FILE *fp)
+{
+       undo_stack->save(fp);
+}
+
+void MainUndo::load(FILE *fp)
+{
+       undo_stack->load(fp);
+       UndoStackItem *current = undo_stack->current;
+       char *current_data = current ? current->get_data() : 0;
+       if( !current_data ) return;
+       mwindow->gui->lock_window("MainUndo::load");
+       UndoStackItem *next = current->next;
+       mwindow->gui->mainmenu->redo->
+               update_caption(next ? next->get_description() : "");
+       mwindow->set_filename(current->get_filename());
+       FileXML file;
+       file.read_from_string(current_data);
+       load_from_undo(&file, LOAD_ALL);
+       delete [] current_data;
+       UndoStackItem *prev = current->previous;
+       mwindow->gui->mainmenu->undo->
+               update_caption(prev ? prev->get_description() : "");
+       mwindow->update_project(LOADMODE_REPLACE);
+       mwindow->gui->unlock_window();
+}
+
index a0d3006dc02d1cab1c49d736cec9ae70d0c3aa11..d622adcfb70b7ec096b92be372f5a1fb9811fbfd 100644 (file)
@@ -57,6 +57,9 @@ public:
        int undo_load_flags();
        int redo_load_flags();
        void dump(FILE *fp=stdout);
+
+       void save(FILE *fp);
+       void load(FILE *fp);
 private:
 // Entry point for all update commands
        void update_undo_entry(const char *description,
index 56059c677d499b4414b576dda027a793b7e0953f..a69af4e7642b3907bb2c50f690ebfcdb031d6d99 100644 (file)
@@ -3349,9 +3349,12 @@ void MWindow::save_backup()
        FileXML file;
        edl->optimize();
        edl->set_path(session->filename);
-       char backup_path[BCTEXTLEN];
+       char backup_path[BCTEXTLEN], backup_path1[BCTEXTLEN];
        snprintf(backup_path, sizeof(backup_path), "%s/%s",
                File::get_config_path(), BACKUP_FILE);
+       snprintf(backup_path1, sizeof(backup_path1), "%s/%s",
+               File::get_config_path(), BACKUP_FILE1);
+       rename(backup_path, backup_path1);
        edl->save_xml(&file, backup_path);
        file.terminate_string();
        FileSystem fs;
@@ -3388,6 +3391,29 @@ void MWindow::load_backup()
        save_backup();
 }
 
+
+void MWindow::save_undo_data()
+{
+       char perpetual_path[BCTEXTLEN];
+       snprintf(perpetual_path, sizeof(perpetual_path), "%s/%s",
+               File::get_config_path(), PERPETUAL_FILE);
+       FILE *fp = fopen(perpetual_path,"w");
+       if( !fp ) return;
+       undo->save(fp);
+       fclose(fp);
+}
+
+void MWindow::load_undo_data()
+{
+       char perpetual_path[BCTEXTLEN];
+       snprintf(perpetual_path, sizeof(perpetual_path), "%s/%s",
+               File::get_config_path(), PERPETUAL_FILE);
+       FILE *fp = fopen(perpetual_path,"r");
+       if( !fp ) return;
+       undo->load(fp);
+       fclose(fp);
+}
+
 static inline int gcd(int m, int n)
 {
        int r;
index 0dfd24cef96bb3c466d1d6147a3ebe9dd3344d2d..252f96dbf99e5a741dfff8062063b14cd82ca06b 100644 (file)
@@ -484,7 +484,8 @@ public:
        int toggle_label(int is_mwindow);
        void undo_entry(BC_WindowBase *calling_window_gui);
        void redo_entry(BC_WindowBase *calling_window_gui);
-
+       void save_undo_data();
+       void load_undo_data();
 
        int cut_automation();
        int copy_automation();
index 804842c30ea93b1f4397e0762b4cda3846e71fc5..ee6b8ab0eb5cec660a02735b4723e176b1b326b0 100644 (file)
@@ -28,6 +28,7 @@
 #define CONFIG_FILE "Cinelerra_rc"
 // user presets
 #define PRESETS_FILE "Cinelerra_presets"
+#define PERPETUAL_FILE "perpetual.dat"
 // factory presets
 #define FACTORY_FILE "Cinelerra_factory"
 #define PICTURE_FILE "Cinelerra_picture"
index a2a19864703cb2cb9ff1c6b46b8c3ec741fe675f..9ae8c4ef8cae7068ac69c36ac5d00d205321cd6f 100644 (file)
@@ -425,6 +425,10 @@ int RecordPatch::button_press_event()
                        get_value(),
                        this,
                        &patch->track->record);
+               patch->title->set_back_color(patch->track->record ?
+                       get_resources()->text_background :
+                       get_resources()->text_background_disarmed);
+               patch->title->set_text_row(0);
                return 1;
        }
        return 0;
@@ -658,19 +662,23 @@ int ExpandPatch::button_release_event()
 }
 
 
-
-
-
 TitlePatch::TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
- : BC_TextBox(x,
-               y,
-               patch->patchbay->get_w() - 10,
-               1,
-               patch->track->title,
-               1, MEDIUMFONT, 1)
+ : BC_TextBox(x, y, patch->patchbay->get_w() - 10, 1,
+               patch->track->title, 1, MEDIUMFONT, 1)
 {
        this->mwindow = mwindow;
        this->patch = patch;
+       set_back_color(patch->track->record ?
+                       get_resources()->text_background :
+                       get_resources()->text_background_disarmed);
+}
+
+void TitlePatch::update(const char *text)
+{
+       set_back_color(patch->track->record ?
+                       get_resources()->text_background :
+                       get_resources()->text_background_disarmed);
+       BC_TextBox::update(text);
 }
 
 int TitlePatch::handle_event()
@@ -684,13 +692,6 @@ int TitlePatch::handle_event()
 }
 
 
-
-
-
-
-
-
-
 NudgePatch::NudgePatch(MWindow *mwindow,
        PatchGUI *patch,
        int x,
index 126b06661a0113d473d698c9e012bd1fed6628ba..da415bb94bd8411e00bf2b913d922c6d2110e10b 100644 (file)
@@ -115,6 +115,7 @@ class TitlePatch : public BC_TextBox
 public:
        TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
        int handle_event();
+       void update(const char *text);
        MWindow *mwindow;
        PatchGUI *patch;
 };
index b950b374fad860044b753368c0018bd254ede216..4e13c584c3e9cb1036cab425c89c47e74162a2bd 100644 (file)
@@ -63,6 +63,7 @@ Preferences::Preferences()
        index_count = 500;
        use_thumbnails = 1;
        keyframe_reticle = HAIRLINE_DRAGGING;
+       perpetual_session = 0;
        trap_sigsegv = 1;
        trap_sigintr = 1;
        theme[0] = 0;
@@ -168,6 +169,7 @@ void Preferences::copy_from(Preferences *that)
        index_count = that->index_count;
        use_thumbnails = that->use_thumbnails;
        keyframe_reticle = that->keyframe_reticle;
+       perpetual_session = that->perpetual_session;
        strcpy(theme, that->theme);
        strcpy(plugin_icons, that->plugin_icons);
        strcpy(snapshot_path, that->snapshot_path);
@@ -299,8 +301,8 @@ int Preferences::load_defaults(BC_Hash *defaults)
        defaults->get("INDEX_DIRECTORY", index_directory);
        index_size = defaults->get("INDEX_SIZE", index_size);
        index_count = defaults->get("INDEX_COUNT", index_count);
-       use_thumbnails = defaults->get("USE_THUMBNAILS", use_thumbnails);
        keyframe_reticle = defaults->get("KEYFRAME_RETICLE", keyframe_reticle);
+       perpetual_session = defaults->get("PERPETUAL_SESSION", perpetual_session);
        trap_sigsegv = defaults->get("TRAP_SIGSEGV", trap_sigsegv);
        trap_sigintr = defaults->get("TRAP_SIGINTR", trap_sigintr);
 
@@ -440,6 +442,7 @@ int Preferences::save_defaults(BC_Hash *defaults)
        defaults->update("INDEX_COUNT", index_count);
        defaults->update("USE_THUMBNAILS", use_thumbnails);
        defaults->update("KEYFRAME_RETICLE", keyframe_reticle);
+       defaults->update("PERPETUAL_SESSION", perpetual_session);
        defaults->update("TRAP_SIGSEGV", trap_sigsegv);
        defaults->update("TRAP_SIGINTR", trap_sigintr);
        defaults->update("THEME", theme);
index d7f449efa09efcc0fe8f081471d3eab086512b56..aab5c810b8fb33cb4fcd87f511defdaa9bcc5ba1 100644 (file)
@@ -89,6 +89,7 @@ public:
 // Use thumbnails in AWindow assets.
        int use_thumbnails;
        int keyframe_reticle;
+       int perpetual_session;
        int trap_sigsegv;
        int trap_sigintr;
 // Title of theme
index d05d201e040b9c0226f847383443c7e5f84a5d8c..69e4a7a8b9061c3419bd66c3fa19c9bada0df48e 100644 (file)
@@ -25,6 +25,7 @@
 // Run-time configuration directory
 #define DEAMON_PORT 400
 #define BACKUP_FILE "backup.xml"
+#define BACKUP_FILE1 "backup.prev"
 #define FFMPEG_EARLY_TIP _("Currently: Try FFMpeg first\n   Click to: Try FFMpeg last")
 #define FFMPEG_LATE_TIP  _("Currently: Try FFMpeg last\n   Click to: Try FFMpeg first")
 
index 5aff535abd7b37b121fc68fe2c428f3e824827bf..02eb20fa03c5003e06f375e542c00c6ab1f0ecd4 100644 (file)
@@ -33,6 +33,7 @@
 #include "formattools.h"
 #include "language.h"
 #include "mainerror.h"
+#include "mainindexes.h"
 #include "mainprogress.h"
 #include "mainundo.h"
 #include "mutex.h"
@@ -759,6 +760,11 @@ void ProxyClient::process_package(LoadPackage *ptr)
                }
                proxy_render->update_progress();
        }
+       if( !proxy_render->failed && !proxy_render->is_canceled() ) {
+               Asset *asset = mwindow->edl->assets->update(proxy);
+               mwindow->mainindexes->add_next_asset(0, asset);
+               mwindow->mainindexes->start_build();
+       }
 }
 
 
index 68e7817fa539cf21b943daf84f9d109e632e7a9f..35be0f44ca0a22c171834b2baf4f8313a4defebe 100644 (file)
@@ -30,6 +30,7 @@
 #include "mwindow.h"
 #include "mwindowgui.h"
 #include "playback3d.h"
+#include "preferences.h"
 #include "quit.h"
 #include "record.h"
 #include "render.h"
@@ -55,8 +56,9 @@ int Quit::handle_event()
 
 //printf("Quit::handle_event 1 %d\n", mwindow->session->changes_made);
        Record *record = mwindow->gui->record;
-       if( mwindow->session->changes_made || mwindow->render->in_progress ||
-               record->capturing || record->recording || record->writing_file ) {
+       if( !mwindow->preferences->perpetual_session &&
+           ( mwindow->session->changes_made || mwindow->render->in_progress ||
+             record->capturing || record->recording || record->writing_file ) ) {
                start();
        }
        else
index 0c49981b22ff63f025deab29a4f2561de1633bad..4adef936fbae44f3b31d974eaf2da6e7a136b1e5 100644 (file)
@@ -482,3 +482,58 @@ void* UndoStackItem::get_creator()
        return creator;
 }
 
+void UndoStackItem::save(FILE *fp)
+{
+       fwrite(&key,1,sizeof(key),fp);
+       fwrite(&load_flags,1,sizeof(load_flags),fp);
+       fwrite(&data_size,1,sizeof(data_size),fp);
+       fwrite(data,1,data_size,fp);
+       for( char *bp=session_filename; *bp; ++bp ) fputc(*bp, fp);
+       fputc(0, fp);
+       for( char *bp=description; *bp; ++bp ) fputc(*bp, fp);
+       fputc(0, fp);
+}
+
+void UndoStackItem::load(FILE *fp)
+{
+       fread(&key,1,sizeof(key),fp);
+       fread(&load_flags,1,sizeof(load_flags),fp);
+       fread(&data_size,1,sizeof(data_size),fp);
+       fread(data=new char[data_size],1,data_size,fp);
+       char filename[BCTEXTLEN], descr[BCTEXTLEN];
+       char *bp = filename, *ep = bp+sizeof(filename)-1;
+       for( int ch; bp<ep && (ch=fgetc(fp))>0; ++bp ) *bp = ch;
+       *bp = 0;
+       session_filename = cstrdup(filename);
+       bp = descr;  ep = bp+sizeof(descr)-1;
+       for( int ch; bp<ep && (ch=fgetc(fp))>0; ++bp ) *bp = ch;
+       *bp = 0;
+       description = cstrdup(descr);
+//printf("read undo key=%d,flags=%jx,data_size=%d,data=%p,file=%s,descr=%s\n",
+// key, load_flags, data_size, data, session_filename, description);
+}
+
+void UndoStack::save(FILE *fp)
+{
+       for( UndoStackItem *item=first; item; item=item->next ) {
+               int is_current = item == current ? 1 : 0;
+               fwrite(&is_current,1,sizeof(is_current),fp);
+               item->save(fp);
+//             if( item == current ) break; // stop at current
+       }
+}
+
+void UndoStack::load(FILE *fp)
+{
+       while( last ) delete last;
+       current = 0;
+       UndoStackItem *current_item = 0;
+       int is_current = 0;
+       while( fread(&is_current,1,sizeof(is_current),fp) == sizeof(is_current) ) {
+               UndoStackItem *item = push();
+               item->load(fp);
+               if( is_current ) current_item = item;
+       }
+       if( current_item ) current = current_item;
+}
+
index e6791d0a27d65441a6d3073272f047b22fb15a63..17bf1284bea8e8dda421dd59a97e5fa48402166f 100644 (file)
@@ -108,6 +108,8 @@ public:
        void set_creator(void *creator);
        void* get_creator();
 
+       void save(FILE *fp);
+       void load(FILE *fp);
 private:
 // command description for the menu item
        char *description;
@@ -147,6 +149,8 @@ public:
 // move to the next undo entry for a redo
        UndoStackItem* pull_next();
 
+       void save(FILE *fp);
+       void load(FILE *fp);
        void dump(FILE *fp=stdout);
 
        UndoStackItem* current;
index 557aae3cda02b6ddabed47b9914d8c6454f5e0a4..9159b78de203d116489d900b1be209668bba7865 100644 (file)
@@ -319,7 +319,7 @@ PKG_3RD([x265],[auto],
   [ . source ])
 
 PKG_3RD([libvpx],[auto],
-  [libvpx-1.6.1],
+  [libvpx-1.7.0],
   [ libvpx.a ],
   [ . ])
 
index 2c8950e6784e594982e9698cb8b30ff16dccd626..8ed4e6f4e9398bc9164a9b10c383484254511ee0 100644 (file)
@@ -759,6 +759,7 @@ new_vframes(20,default_medium_7segment,
        text_default = BLACK;
        highlight_inverse = WHITE ^ BLUE;
        text_background = WHITE;
+       text_background_disarmed = 0xc08080;
        text_background_hi = LTYELLOW;
        text_background_noborder_hi = LTGREY;
        text_background_noborder = -1;
index e22327fe35613a875222fd1d0b05ec3306fe1c8b..feca1095043be5ebdb31c95cad86e1b851421932 100644 (file)
@@ -165,6 +165,7 @@ public:
        int text_border2;
        int text_border2_hi;
        int text_background;
+       int text_background_disarmed;
        int text_background_hi;
        int text_background_noborder_hi;
        int text_border3;
index 2a34c18096952024b3c7c5fa9eb1a40a8432843c..da7afa0f42e8b701228ad73d0cf3beeedf652d50 100644 (file)
@@ -166,6 +166,8 @@ int BC_TextBox::reset_parameters(int rows, int has_border, int font, int size)
        text_x = 0;
        enabled = 1;
        highlighted = 0;
+       back_color = -1;
+       high_color = -1;
        precision = 4;
        if (!skip_cursor)
                skip_cursor = new Timer;
@@ -281,13 +283,13 @@ int BC_TextBox::initialize()
        BC_Resources *resources = get_resources();
        if(has_border)
        {
-               back_color = resources->text_background;
-               high_color = resources->text_background_hi;
+               if( back_color < 0 ) back_color = resources->text_background;
+               if( high_color < 0 ) high_color = resources->text_background_hi;
        }
        else
        {
-               high_color = resources->text_background_noborder_hi;
-               back_color = bg_color;
+               if( back_color < 0 ) back_color = bg_color;
+               if( high_color < 0 ) high_color = resources->text_background_noborder_hi;
        }
 
        draw(0);
@@ -456,7 +458,8 @@ int BC_TextBox::update(const char *text)
 {
 //printf("BC_TextBox::update 1 %d %s %s\n", tstrcmp(text), text, this->text);
 // Don't update if contents are the same
-       if(!tstrcmp(text)) return 0;
+       int bg_color = has_border || !highlighted ? back_color : high_color;
+       if( bg_color == background_color && !tstrcmp(text)) return 0;
        tstrcpy(text);
        int wtext_len = wtext_update();
        if(highlight_letter1 > wtext_len) highlight_letter1 = wtext_len;
@@ -519,6 +522,8 @@ int BC_TextBox::get_text_x() { return text_x; }
 int BC_TextBox::get_text_y() { return text_y; }
 void BC_TextBox::set_text_x(int v) { text_x = v; }
 void BC_TextBox::set_text_y(int v) { text_y = v; }
+int BC_TextBox::get_back_color() { return back_color; }
+void BC_TextBox::set_back_color(int v) { back_color = v; }
 
 int BC_TextBox::pixels_to_rows(BC_WindowBase *window, int font, int pixels)
 {
@@ -655,12 +660,7 @@ void BC_TextBox::draw(int flush)
 
 //printf("BC_TextBox::draw %d %s\n", __LINE__, text);
 // Background
-       if(has_border)
-               background_color = resources->text_background;
-       else if(highlighted)
-               background_color = high_color;
-       else
-               background_color = back_color;
+       background_color = has_border || !highlighted ? back_color : high_color;
        set_color(background_color);
        draw_box(0, 0, w, h);
 
index e461767eafd76bbe90e2c93677605ec8eb29ee11..425768bfde593671d8c843de32a0ba865b295599 100644 (file)
@@ -117,6 +117,8 @@ public:
        int get_text_y();
        void set_text_x(int v);
        void set_text_y(int v);
+       int get_back_color();
+       void set_back_color(int v);
 
        int reposition_window(int x, int y, int w = -1, int rows = -1);
        int uses_text();
index c587ed250037b185cdc47fe0040f1dc8bbc52dbe..c206f258af27131ab8e8dd0a3e1d12a3812444ef 100644 (file)
@@ -106,6 +106,8 @@ VFrame** BC_Theme::new_image_set_images(const char *title, int total, ...)
        BC_ThemeSet *existing_image_set = title[0] ? get_image_set_object(title) : 0;
        if( existing_image_set ) {
                image_sets.remove_object(existing_image_set);
+               last_image_set = 0;
+               last_image_data = 0;
        }
 
        BC_ThemeSet *result = new BC_ThemeSet(total, 0, title);
index dae8272693042190accd97d4a124e9fbd320ae2f..93f4da0bd50de178b6595ff103bdfcdf219def40 100644 (file)
@@ -108,6 +108,7 @@ void BlondTheme::initialize()
 
        resources->text_default = 0x000000;
        resources->text_background = 0xcecea2;
+       resources->text_background_disarmed = 0xefeddb;
        resources->text_border1 = 0x202020;
        resources->text_border2 = 0xcecea2;
        resources->text_border3 = 0xcecea2;
index be0e7a734a14271933625b7ebd3c9352e4bf970f..fdbffc8a0bae091f86f79a6dd768073f0bbb821c 100644 (file)
@@ -159,6 +159,7 @@ void BlondCVTheme::initialize()
 
        resources->text_default = 0x000000;
        resources->text_background = 0xffffff;
+       resources->text_background_disarmed = 0xff0000;
        resources->text_border1 = 0x4a484a; // (top outer)
        resources->text_border2 = 0x000000; // (top inner)
        resources->text_border3 = 0xacaeac; // (bottom inner)
index 1e19085580c9e10220d73ed03a9c21e68a72c349..fd8d270fec7e3433565e41aed3b825404053a4c2 100644 (file)
@@ -108,6 +108,7 @@ void BlueDotTheme::initialize()
 
        resources->text_default = 0xeeeeff;
        resources->text_background = 0x1a1447;
+       resources->text_background_disarmed = 0x7282d4;
        resources->text_border1 = 0x202020;
        resources->text_border2 = 0x1a1447;
        resources->text_border3 = 0x1a1447;
index 1eed422dbc5945ce4ecafcec0de5513263e4a10d..64c29f78e624a15f0ec20ec7970d33354e067014 100644 (file)
@@ -114,6 +114,7 @@ void BlueDotTheme::initialize()
        // COPIED FROM DEFAULT THEME 1>>
        resources->text_default = 0x000000;
        resources->text_background = 0xffffff;
+       resources->text_background_disarmed = 0xff3939;
                //listbox borders
        resources->text_border1 = 0x4a484a; // (top outer)
        resources->text_border2 = 0x000000; // (top inner)
index 2ad0b127e5067305269eeffff30a093ee251f590..30a6be942b3c3d1c7bcf70fff22d7cdadcc141de 100644 (file)
@@ -106,6 +106,7 @@ void BrightTheme::initialize()
 
        resources->text_default = 0x000000;
        resources->text_background = 0xffffff;
+       resources->text_background_disarmed = 0xaaaaaa;
        resources->text_background_hi = 0xffffff;
        resources->text_border1 = 0x000000;
        resources->text_border2 = 0xffffff;
index 2309ff039d0316a34266aa66bebdcef3d9c5a240..de88591f5c1b26dd816847a008a7d0cfd19a0bea 100644 (file)
@@ -109,6 +109,7 @@ void HULKTHEME::initialize()
 
        resources->text_default = 0x001000;
        resources->text_background = 0x75b697;
+       resources->text_background_disarmed = 0xce00ff;
        resources->text_border1 = 0x202020;
        resources->text_border2 = 0x75b697;
        resources->text_border3 = 0x75b697;
index 4007c355a66874e94eeec1e6437bf07afbbed0f5..f46efad7063d74d703193b3ef21811c0477b93ef 100644 (file)
@@ -94,6 +94,7 @@ void PINKLADY::initialize()
 
        resources->text_default = 0x1b0f11;
        resources->text_background = 0xffb1d0;
+       resources->text_background_disarmed = 0x0000ff;
        resources->text_border1 = 0x202020;
        resources->text_border2 = 0xffb1d0;
        resources->text_border3 = 0xffb1d0;
index 55ab0f87e3cb28fd7c6bd0416a083b4cdc3319ed..15a95b4ca0bd73115bb64bf8f849a4de5e6f9651 100644 (file)
@@ -105,6 +105,7 @@ void SUV::initialize()
 
        resources->text_default = 0xbfbfbf;
        resources->text_background = 0x373737;
+       resources->text_background_disarmed = 0xaf0000;
        resources->text_border1 = 0x202020;
        resources->text_border2 = 0x373737;
        resources->text_border3 = 0x373737;
index 5649253db074e8103092dfc8fcdd0884fe23a028..81c593ae4c1145722a894cca734144a64d41b358 100644 (file)
@@ -103,6 +103,7 @@ void UNFLATTHEME::initialize()
 
        resources->text_default = 0xbfbfbf;
        resources->text_background = 0x333333;
+       resources->text_background_disarmed = 0xaf0000;
        resources->text_border1 = 0x202020;
        resources->text_border2 = 0x333333;
        resources->text_border3 = 0x333333;
index 47936c5f0f8cf66789a1089d94b333286112a0a2..39f64c1e5a99d757aa9d91af769ea8b8d289be62 100644 (file)
@@ -31,6 +31,6 @@ https://sourceforge.net/projects/libuuid/files/latest/download?source=directory
 ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20170426-2245-stable.tar.bz2
 https://bitbucket.org/multicoreware/x265/downloads/x265_2.4.tar.gz
 http://ffmpeg.org/releases/ffmpeg-3.3.tar.bz2
-https://chromium.googlesource.com/webm/libvpx/+archive/0c0a05046db1c0b59a7fcc29785a190fdbbe39c2.tar.gz = 1,6,1
+https://github.com/webmproject/libvpx/releases/tag/v1.7.0
 https://github.com/swh/ladspa/releases/tag/v0.4.17, plugin.org.uk
 https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz
diff --git a/cinelerra-5.1/thirdparty/src/libvpx-1.6.1.tar.xz b/cinelerra-5.1/thirdparty/src/libvpx-1.6.1.tar.xz
deleted file mode 100644 (file)
index c982258..0000000
Binary files a/cinelerra-5.1/thirdparty/src/libvpx-1.6.1.tar.xz and /dev/null differ
diff --git a/cinelerra-5.1/thirdparty/src/libvpx-1.7.0.tar.xz b/cinelerra-5.1/thirdparty/src/libvpx-1.7.0.tar.xz
new file mode 100644 (file)
index 0000000..dbf89b3
Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/libvpx-1.7.0.tar.xz differ