update Features5.pdf, fixes for awindowgui
authorGood Guy <good1.2guy@gmail.com>
Sat, 4 Jun 2016 22:02:33 +0000 (16:02 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sat, 4 Jun 2016 22:02:33 +0000 (16:02 -0600)
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/awindowgui.h
cinelerra-5.1/cinelerra/filempeg.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/preferences.C
cinelerra-5.1/doc/Features5.pdf
cinelerra-5.1/guicast/bclistbox.h
cinelerra-5.1/guicast/vicon.C
cinelerra-5.1/mpeg2enc/ratectl.c

index 95c8056ff6f8d00e971e855353623950ecad7785..6acc2c512baecff7baf99f6b0cf83bd4dbb82509 100644 (file)
@@ -840,7 +840,6 @@ void AWindowRemovePlugin::handle_close_event(int result)
                strcpy(plugin_path, plugin->path);
                MWindow *mwindow = awindow->mwindow;
                mwindow->plugindb->remove(plugin);
-               delete plugin;  plugin = 0;
                remove(plugin_path);
                char index_path[BCTEXTLEN];
                sprintf(index_path, "%s/%s", mwindow->preferences->plugin_dir, PLUGIN_FILE);
@@ -850,6 +849,7 @@ void AWindowRemovePlugin::handle_close_event(int result)
                        remove(png_path);
                if( plugin->get_theme_png_path(png_path, "picon") )
                        remove(png_path);
+               delete plugin;  plugin = 0;
                awindow->gui->async_update_assets();
        }
 }
@@ -1843,17 +1843,16 @@ int AWindowAssets::column_resize_event()
        return 1;
 }
 
-int AWindowAssets::cursor_enter_event()
+int AWindowAssets::focus_in_event()
 {
-       int ret = BC_ListBox::cursor_enter_event();
        gui->start_vicon_drawing();
-       return ret;
+       return 0;
 }
 
-int AWindowAssets::cursor_leave_event()
+int AWindowAssets::focus_out_event()
 {
        gui->stop_vicon_drawing();
-       return BC_ListBox::cursor_leave_event();
+       return BC_ListBox::focus_out_event();
 }
 
 
index 7ca0e6a68c6abe10c2ea9145b18ed72ed2e6f22d..a1d2b5e5ea6355699852327b84139ca715810493 100644 (file)
@@ -270,8 +270,8 @@ public:
        int drag_stop_event();
        int button_press_event();
        int column_resize_event();
-       int cursor_enter_event();
-       int cursor_leave_event();
+       int focus_in_event();
+       int focus_out_event();
 
        MWindow *mwindow;
        AWindowGUI *gui;
index c51cf4463fe5973a8545b286607a0cca1191fab8..d1eb02c15dbeb04fe532c49c5794f51e843ceab3 100644 (file)
@@ -492,6 +492,7 @@ int FileMPEG::open_file(int rd, int wr)
                        {
                                const char *exec_path = File::get_cinlib_path();
                                sprintf(mjpeg_command, "%s/%s", exec_path, HVPEG_EXE);
+                               append_vcommand_line(mjpeg_command);
 
                                if(asset->aspect_ratio > 0)
                                {
@@ -515,7 +516,7 @@ int FileMPEG::open_file(int rd, int wr)
                                append_vcommand_line(asset->vmpeg_cmodel == BC_YUV422P ? "-422" : "");
                                if(asset->vmpeg_fix_bitrate)
                                {
-                                       append_vcommand_line("--cbr -b");
+                                       append_vcommand_line("-b");
                                        append_vcommand_line(bitrate_string);
                                }
                                else
index dcca2ca75d6470512a18bc2ff26fd1ccf1555b46..ad361ecf3e35109af1958b7be0eb44e7822d3e5b 100644 (file)
@@ -2880,7 +2880,6 @@ void MWindow::save_backup()
                File::get_config_path(), BACKUP_FILE);
        edl->save_xml(&file, backup_path, 0, 0);
        file.terminate_string();
-       char path[BCTEXTLEN];
        FileSystem fs;
        fs.complete_path(backup_path);
 
index 24d3654c696b30875124eb918685174cc9dae1ab..cbdf27cd9353a5648987a45cf358cce1d4cc5770 100644 (file)
@@ -702,7 +702,8 @@ int Preferences::get_asset_file_path(Asset *asset, char *path)
 {
        strcpy(path, asset->path);
        int result = !access(path, R_OK) ? 0 : -1;
-       if( !result && asset->format == FILE_MPEG ) {
+       if( !result && ( asset->format == FILE_MPEG ||
+               asset->format == FILE_VMPEG || asset->format == FILE_AMPEG ) ) {
                char source_filename[BCTEXTLEN], index_filename[BCTEXTLEN];
                IndexFile::get_index_filename(source_filename,
                        index_directory, index_filename, asset->path, ".toc");
index 812fd15c51133840627106b86a26c04c6572969c..2d97f2643d39c60654f92786feaa54ee0eb4a7cb 100644 (file)
Binary files a/cinelerra-5.1/doc/Features5.pdf and b/cinelerra-5.1/doc/Features5.pdf differ
index 73c5ddb3a4805296ce795d36b9e0d9af709e5888..7a61af7120ff551de5fc6fd724421339f66b365d 100644 (file)
@@ -178,16 +178,17 @@ public:
                int *result /* = 0 */,
                int master_column);
 
-
-       int focus_out_event();
+       virtual int focus_out_event();
+       virtual int keypress_event();
        virtual int button_press_event();
-       int button_release_event();
-       int cursor_enter_event();
-       int cursor_leave_event();
-       int cursor_motion_event();
+       virtual int button_release_event();
+       virtual int cursor_enter_event();
+       virtual int cursor_leave_event();
+       virtual int cursor_motion_event();
        virtual int drag_start_event();
        virtual int drag_motion_event();
        virtual int drag_stop_event();
+
        int deactivate();
 // After popping up a menu call this to interrupt the selection process
        void deactivate_selection();
@@ -196,7 +197,6 @@ public:
 // textbox
        int activate(int take_focus = 1);
 
-       virtual int keypress_event();
        int translation_event();
        int repeat_event(int64_t duration);
        BC_DragWindow* get_drag_popup();
index deb3c57fd6370b1aa7af9b7d54ca4c88b8c01b9c..9f8d93ccc105be9d65c69b57f2e5c2e471f53943 100644 (file)
@@ -76,7 +76,7 @@ VIconThread(BC_WindowBase *wdw, int vw, int vh)
        timer = new Timer();
        this->refresh_rate = VICON_RATE;
        done = 0;
-       interrupted = 1;
+       interrupted = -1;
 }
 
 VIconThread::
@@ -100,8 +100,9 @@ start_drawing()
        wdw->lock_window("VIconThread::start_drawing");
        if( view_win )
                wdw->set_active_subwindow(view_win);
-        if( interrupted )
+        if( interrupted < 0 )
                draw_lock->unlock();
+       interrupted = 0;
        wdw->unlock_window();
 }
 
@@ -110,7 +111,8 @@ stop_drawing()
 {
        wdw->lock_window("VIconThread::stop_drawing");
        set_view_popup(0);
-       interrupted = 1;
+       if( !interrupted )
+               interrupted = 1;
        wdw->unlock_window();
 }
 
@@ -260,9 +262,8 @@ run()
 {
        while(!done) {
                draw_lock->lock("VIconThread::run 0");
-               if( done ) break;;
+               if( done ) break;
                wdw->lock_window("BC_WindowBase::run 1");
-               interrupted = 0;
                drawing_started();
                reset_images();
                int64_t seq_no = 0, now = 0;
index 768384307e752f852a951b989a90b406cab72ff4..1fc465aa04dfabd8795e865cc91e7d187f655aa3 100644 (file)
@@ -253,9 +253,9 @@ static double calc_actj(pict_data_s *picture)
                         */
 
 
-                       for( l = 0; l < 6; ++l )
-                               actsum += 
-                                       (*pquant_weight_coeff_sum)
+                       if( cur_picture.mbinfo[k].dctblocks )
+                               for( l = 0; l < 6; ++l )
+                                       actsum += (*pquant_weight_coeff_sum)
                                            ( cur_picture.mbinfo[k].dctblocks[l], i_q_mat ) ;
                        actj = (double)actsum / (double)COEFFSUM_SCALE;
                        if( actj < 12.0 )