From: Good Guy Date: Sun, 7 May 2017 21:42:56 +0000 (-0600) Subject: update versioninfo, locks for read_data in plugins, minor fixes X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=a91176d7510310919776d0250d5708bb244d440b;p=goodguy%2Fhistory.git update versioninfo, locks for read_data in plugins, minor fixes --- diff --git a/cinelerra-5.1/cinelerra/pluginfclient.C b/cinelerra-5.1/cinelerra/pluginfclient.C index 6ff20fd9..373f3d25 100644 --- a/cinelerra-5.1/cinelerra/pluginfclient.C +++ b/cinelerra-5.1/cinelerra/pluginfclient.C @@ -1016,13 +1016,14 @@ static int get_defaults(const char *name, char *args) FILE *fp = fopen(defaults_path,"r"); if( !fp ) return 0; char ff_plugin[BCSTRLEN], ff_args[BCTEXTLEN], *ap = 0; - while( !ap && fgets(ff_args, sizeof(ff_args), fp) ) { - if( *(ap=ff_args) == ';' ) continue; - if( *(ap=ff_args) == '#' ) ++ap; + while( fgets(ff_args, sizeof(ff_args), fp) ) { + char *cp = ff_args; + if( *cp == ';' ) continue; + if( *cp == '#' ) ++cp; char *bp = ff_plugin, *ep = bp + sizeof(ff_plugin)-1; - while( bp < ep && *ap && *ap != '\n' && *ap != ' ' ) *bp++ = *ap++; + while( bp < ep && *cp && *cp != '\n' && *cp != ' ' ) *bp++ = *cp++; *bp = 0; - if( strcmp(ff_plugin, name) ) ap = 0; + if( !strcmp(ff_plugin, name) ) { ap = cp; break; } } fclose(fp); if( !ap ) return 0; diff --git a/cinelerra-5.1/cinelerra/versioninfo.h b/cinelerra-5.1/cinelerra/versioninfo.h index 5dd68710..7eaf05f3 100644 --- a/cinelerra-5.1/cinelerra/versioninfo.h +++ b/cinelerra-5.1/cinelerra/versioninfo.h @@ -2,11 +2,10 @@ #define __VERSIONINFO_H__ #define CINELERRA_VERSION "5.1" -#define REPOMAINTXT " git://git.cinelerra-cv.org/goodguy/cinelerra.git " -#define COPYRIGHT_DATE "2015" -#define COPYRIGHT_OWNER "Adam Williams" -#define COPYRIGHTTEXT1 "(c)" COPYRIGHT_DATE ": " COPYRIGHT_OWNER "\n" -#define COPYRIGHTTEXT2 +#define REPOMAINTXT " git://git.cinelerra-cv.org/goodguy/cinelerra.git\n" +#define COPYRIGHT_DATE "2017" +#define COPYRIGHTTEXT1 "(c) 2006-2016 Heroine Virtual Ltd. by Adam Williams\n" +#define COPYRIGHTTEXT2 "(c) 2007-2017 cin5 derivative by W.P. Morrow aka goodguy\n" #undef COMPILEDATE #endif diff --git a/cinelerra-5.1/plugins/compressor/compressor.C b/cinelerra-5.1/plugins/compressor/compressor.C index 481988bd..9797bc3d 100644 --- a/cinelerra-5.1/plugins/compressor/compressor.C +++ b/cinelerra-5.1/plugins/compressor/compressor.C @@ -189,15 +189,13 @@ void CompressorEffect::save_data(KeyFrame *keyframe) void CompressorEffect::update_gui() { - if(thread) - { - if(load_configuration()) - { - thread->window->lock_window("CompressorEffect::update_gui"); - ((CompressorWindow*)thread->window)->update(); - thread->window->unlock_window(); - } - } + if( !thread ) return; + CompressorWindow *window = (CompressorWindow*)thread->window; +// load_configuration,read_data deletes levels + window->lock_window("CompressorEffect::update_gui"); + if( load_configuration() ) + window->update(); + window->unlock_window(); } diff --git a/cinelerra-5.1/plugins/graphic/graphic.C b/cinelerra-5.1/plugins/graphic/graphic.C index 0fbf84ee..f927679c 100644 --- a/cinelerra-5.1/plugins/graphic/graphic.C +++ b/cinelerra-5.1/plugins/graphic/graphic.C @@ -1129,28 +1129,23 @@ void GraphicEQ::save_data(KeyFrame *keyframe) void GraphicEQ::update_gui() { - if(thread) - { - if(load_configuration() && - ((GraphicGUI*)thread->window)->canvas->state != GraphicCanvas::DRAG_POINT) - { - ((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui"); - ((GraphicGUI*)thread->window)->update_canvas(); - ((GraphicGUI*)thread->window)->update_textboxes(); - ((GraphicGUI*)thread->window)->unlock_window(); - } - else - { - int total_frames = get_gui_update_frames(); + if( !thread ) return; + GraphicGUI *window = (GraphicGUI *)thread->window; +//lock here for points, needed by window cursor_motion callback +// deleted in load_configuration by read_data + window->lock_window("GraphicEQ::update_gui"); + if( load_configuration() && + window->canvas->state != GraphicCanvas::DRAG_POINT ) { + window->update_canvas(); + window->update_textboxes(); + } + else { + int total_frames = get_gui_update_frames(); //printf("ParametricEQ::update_gui %d %d\n", __LINE__, total_frames); - if(total_frames) - { - ((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui"); - ((GraphicGUI*)thread->window)->update_canvas(); - ((GraphicGUI*)thread->window)->unlock_window(); - } - } + if( total_frames ) + window->update_canvas(); } + window->unlock_window(); } void GraphicEQ::reconfigure() diff --git a/cinelerra-5.1/plugins/histogram_bezier/bistogram.C b/cinelerra-5.1/plugins/histogram_bezier/bistogram.C index 16a27cb9..53ebceeb 100644 --- a/cinelerra-5.1/plugins/histogram_bezier/bistogram.C +++ b/cinelerra-5.1/plugins/histogram_bezier/bistogram.C @@ -109,21 +109,16 @@ void HistogramMain::render_gui(void *data) void HistogramMain::update_gui() { - if(thread) - { - thread->window->lock_window("HistogramMain::update_gui"); - int reconfigure = load_configuration(); - if(reconfigure) - { - HistogramWindow *window = (HistogramWindow *)thread->window; - window->update(0); - if(!config.automatic) - { - window->update_input(); - } - } - thread->window->unlock_window(); + if( !thread ) return; + HistogramWindow *window = (HistogramWindow *)thread->window; +// points delete in load_configuration,read_data + window->lock_window("HistogramMain::update_gui"); + if( load_configuration() ) { + window->update(0); + if(!config.automatic) + window->update_input(); } + window->unlock_window(); } diff --git a/cinelerra-5.1/plugins/piano/piano.C b/cinelerra-5.1/plugins/piano/piano.C index ec130f15..a1fa01ea 100644 --- a/cinelerra-5.1/plugins/piano/piano.C +++ b/cinelerra-5.1/plugins/piano/piano.C @@ -162,13 +162,13 @@ void Piano::raise_window() void Piano::update_gui() { - if(thread) - { - load_configuration(); - thread->window->lock_window(); - thread->window->update_gui(); - thread->window->unlock_window(); - } + if( !thread ) return; + PianoWindow *window = (PianoWindow *)thread->window: +// load_configuration,read_data deletes oscillator_config + window->lock_window("Piano::update_gui"); + load_configuration(); + window->update_gui(); + window->unlock_window(); } diff --git a/cinelerra-5.1/plugins/rgb601/rgb601.C b/cinelerra-5.1/plugins/rgb601/rgb601.C index 05a715b0..c67de4af 100644 --- a/cinelerra-5.1/plugins/rgb601/rgb601.C +++ b/cinelerra-5.1/plugins/rgb601/rgb601.C @@ -117,14 +117,8 @@ void RGB601Main::read_data(KeyFrame *keyframe) } } } - - if(thread) - { - ((RGB601Window*)thread->window)->update(); - } } - #define CREATE_TABLE(max) \ { \ for(int i = 0; i < max; i++) \ diff --git a/cinelerra-5.1/plugins/synthesizer/synthesizer.C b/cinelerra-5.1/plugins/synthesizer/synthesizer.C index 840eb90c..5838a48f 100644 --- a/cinelerra-5.1/plugins/synthesizer/synthesizer.C +++ b/cinelerra-5.1/plugins/synthesizer/synthesizer.C @@ -176,15 +176,13 @@ void Synth::save_data(KeyFrame *keyframe) void Synth::update_gui() { - if(thread) - { - if(load_configuration()) - { - thread->window->lock_window(); - ((SynthWindow*)thread->window)->update_gui(); - thread->window->unlock_window(); - } - } + if( !thread ) return; + SynthWindow *window = (SynthWindow*)thread->window; +// load_configuration,read_data deletes oscillator_config + window->lock_window("Synth::update_gui"); + if( load_configuration() ) + window->update_gui(); + window->unlock_window(); }