From: Good Guy Date: Sat, 4 Jun 2016 22:02:33 +0000 (-0600) Subject: update Features5.pdf, fixes for awindowgui X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=8b3b351f3703224915cf26d1b01d1d8ee632a178;p=goodguy%2Fhistory.git update Features5.pdf, fixes for awindowgui --- diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 95c8056f..6acc2c51 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -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(); } diff --git a/cinelerra-5.1/cinelerra/awindowgui.h b/cinelerra-5.1/cinelerra/awindowgui.h index 7ca0e6a6..a1d2b5e5 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.h +++ b/cinelerra-5.1/cinelerra/awindowgui.h @@ -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; diff --git a/cinelerra-5.1/cinelerra/filempeg.C b/cinelerra-5.1/cinelerra/filempeg.C index c51cf446..d1eb02c1 100644 --- a/cinelerra-5.1/cinelerra/filempeg.C +++ b/cinelerra-5.1/cinelerra/filempeg.C @@ -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 diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index dcca2ca7..ad361ecf 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -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); diff --git a/cinelerra-5.1/cinelerra/preferences.C b/cinelerra-5.1/cinelerra/preferences.C index 24d3654c..cbdf27cd 100644 --- a/cinelerra-5.1/cinelerra/preferences.C +++ b/cinelerra-5.1/cinelerra/preferences.C @@ -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"); diff --git a/cinelerra-5.1/doc/Features5.pdf b/cinelerra-5.1/doc/Features5.pdf index 812fd15c..2d97f264 100644 Binary files a/cinelerra-5.1/doc/Features5.pdf and b/cinelerra-5.1/doc/Features5.pdf differ diff --git a/cinelerra-5.1/guicast/bclistbox.h b/cinelerra-5.1/guicast/bclistbox.h index 73c5ddb3..7a61af71 100644 --- a/cinelerra-5.1/guicast/bclistbox.h +++ b/cinelerra-5.1/guicast/bclistbox.h @@ -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(); diff --git a/cinelerra-5.1/guicast/vicon.C b/cinelerra-5.1/guicast/vicon.C index deb3c57f..9f8d93cc 100644 --- a/cinelerra-5.1/guicast/vicon.C +++ b/cinelerra-5.1/guicast/vicon.C @@ -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; diff --git a/cinelerra-5.1/mpeg2enc/ratectl.c b/cinelerra-5.1/mpeg2enc/ratectl.c index 76838430..1fc465aa 100644 --- a/cinelerra-5.1/mpeg2enc/ratectl.c +++ b/cinelerra-5.1/mpeg2enc/ratectl.c @@ -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 )