From 53f919f88484c8611457fbcd552f6931218cc219 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Mon, 4 Nov 2019 14:38:40 -0700 Subject: [PATCH] plugin gui ref by id fixes, plugin gui opengl update fixes, prores opts files --- cinelerra-5.1/cinelerra/module.C | 7 +++-- cinelerra-5.1/cinelerra/mwindow.C | 4 +++ cinelerra-5.1/cinelerra/plugin.C | 3 ++- cinelerra-5.1/cinelerra/pluginset.C | 9 ++----- cinelerra-5.1/cinelerra/pluginset.h | 1 - cinelerra-5.1/ffmpeg/audio/pcm_s24.pro | 1 + cinelerra-5.1/ffmpeg/video/ks.pro | 2 -- cinelerra-5.1/ffmpeg/video/med422p10.pro | 3 --- cinelerra-5.1/ffmpeg/video/prores.pro | 10 +++++++ cinelerra-5.1/ffmpeg/video/prores_ks.pro | 11 ++++++++ cinelerra-5.1/ffmpeg/video/prores_proxy.pro | 4 +++ .../plugins/deinterlace/deinterlace.C | 2 +- cinelerra-5.1/plugins/gamma/gamma.C | 26 +++++++------------ cinelerra-5.1/plugins/histogram/histogram.C | 8 ++---- cinelerra-5.1/plugins/threshold/threshold.C | 4 +-- 15 files changed, 52 insertions(+), 43 deletions(-) create mode 100644 cinelerra-5.1/ffmpeg/audio/pcm_s24.pro delete mode 100644 cinelerra-5.1/ffmpeg/video/ks.pro delete mode 100644 cinelerra-5.1/ffmpeg/video/med422p10.pro create mode 100644 cinelerra-5.1/ffmpeg/video/prores.pro create mode 100644 cinelerra-5.1/ffmpeg/video/prores_ks.pro create mode 100644 cinelerra-5.1/ffmpeg/video/prores_proxy.pro diff --git a/cinelerra-5.1/cinelerra/module.C b/cinelerra-5.1/cinelerra/module.C index a2e17bb2..3c21504e 100644 --- a/cinelerra-5.1/cinelerra/module.C +++ b/cinelerra-5.1/cinelerra/module.C @@ -272,10 +272,9 @@ int Module::test_plugins() (!attachment && use_plugin)) return 1; // Plugin not the same - if(plugin && - attachment && - attachment->plugin && - !plugin->identical(attachment->plugin)) return 1; + if( plugin && attachment && attachment->plugin && ( + plugin->gui_id != attachment->plugin->gui_id || + !plugin->identical(attachment->plugin) ) ) return 1; } return 0; diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index e4e6f837..ee89074e 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -3220,6 +3220,8 @@ SET_TRACE } } plugin_gui_lock->unlock(); +// update show/gui_id + sync_parameters(CHANGE_PARAMS); //printf("MWindow::show_plugin %d\n", __LINE__); SET_TRACE //sleep(1); @@ -3251,6 +3253,8 @@ void MWindow::hide_plugin(Plugin *plugin, int lock) } } if(lock) plugin_gui_lock->unlock(); +// update show/gui_id + sync_parameters(CHANGE_PARAMS); } void MWindow::delete_plugin(PluginServer *plugin) diff --git a/cinelerra-5.1/cinelerra/plugin.C b/cinelerra-5.1/cinelerra/plugin.C index e37e930f..d28087b8 100644 --- a/cinelerra-5.1/cinelerra/plugin.C +++ b/cinelerra-5.1/cinelerra/plugin.C @@ -139,7 +139,7 @@ void Plugin::copy_base(Edit *edit) this->out = plugin->out; this->show = plugin->show; this->on = plugin->on; - this->gui_id = plugin->gui_id; +// dont copy gui_id, it will be a duplicate ref // Should reconfigure this based on where the first track is now. this->shared_location = plugin->shared_location; strcpy(this->title, plugin->title); @@ -178,6 +178,7 @@ void Plugin::synchronize_params(Edit *edit) this->in = plugin->in; this->out = plugin->out; this->show = plugin->show; + this->gui_id = plugin->gui_id; this->on = plugin->on; strcpy(this->title, plugin->title); copy_keyframes(plugin); diff --git a/cinelerra-5.1/cinelerra/pluginset.C b/cinelerra-5.1/cinelerra/pluginset.C index e1f1215e..86bb4b66 100644 --- a/cinelerra-5.1/cinelerra/pluginset.C +++ b/cinelerra-5.1/cinelerra/pluginset.C @@ -44,13 +44,6 @@ PluginSet::~PluginSet() } -PluginSet& PluginSet::operator=(PluginSet& plugins) -{ -printf("PluginSet::operator= 1\n"); - copy_from(&plugins); - return *this; -} - void PluginSet::copy_from(PluginSet *src) { while(last) delete last; @@ -59,6 +52,8 @@ void PluginSet::copy_from(PluginSet *src) Plugin *new_plugin; append(new_plugin = (Plugin*)create_edit()); new_plugin->copy_from(current); +// update gui_id when copying edl + new_plugin->gui_id = current->gui_id; } this->record = src->record; } diff --git a/cinelerra-5.1/cinelerra/pluginset.h b/cinelerra-5.1/cinelerra/pluginset.h index 4e149e76..c0e4b8af 100644 --- a/cinelerra-5.1/cinelerra/pluginset.h +++ b/cinelerra-5.1/cinelerra/pluginset.h @@ -41,7 +41,6 @@ public: virtual ~PluginSet(); virtual void synchronize_params(PluginSet *plugin_set); - virtual PluginSet& operator=(PluginSet& plugins); virtual Plugin* create_plugin() { return 0; }; // Returns the point to restart background rendering at. // -1 means nothing changed. diff --git a/cinelerra-5.1/ffmpeg/audio/pcm_s24.pro b/cinelerra-5.1/ffmpeg/audio/pcm_s24.pro new file mode 100644 index 00000000..5a833fe4 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/audio/pcm_s24.pro @@ -0,0 +1 @@ +mov pcm_s24le diff --git a/cinelerra-5.1/ffmpeg/video/ks.pro b/cinelerra-5.1/ffmpeg/video/ks.pro deleted file mode 100644 index 7170a158..00000000 --- a/cinelerra-5.1/ffmpeg/video/ks.pro +++ /dev/null @@ -1,2 +0,0 @@ -mov prores_ks -profile=4444 diff --git a/cinelerra-5.1/ffmpeg/video/med422p10.pro b/cinelerra-5.1/ffmpeg/video/med422p10.pro deleted file mode 100644 index f2791b52..00000000 --- a/cinelerra-5.1/ffmpeg/video/med422p10.pro +++ /dev/null @@ -1,3 +0,0 @@ -mov prores -preset medium -pix_fmt yuv422p10le diff --git a/cinelerra-5.1/ffmpeg/video/prores.pro b/cinelerra-5.1/ffmpeg/video/prores.pro new file mode 100644 index 00000000..e8e589bb --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/prores.pro @@ -0,0 +1,10 @@ +mov prores +# ProRes, encoder prores_aw. Container Apple QuickTime movie (.mov). +profile=2 +# The possible video profile values for the ProRes codec are: +# 5 = 4444xq +# 4 = 4444 +# 3 = HQ (high quality) +# 2 = Standard +# 1 = LT (light) +# 0 = Proxy diff --git a/cinelerra-5.1/ffmpeg/video/prores_ks.pro b/cinelerra-5.1/ffmpeg/video/prores_ks.pro new file mode 100644 index 00000000..a56767d6 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/prores_ks.pro @@ -0,0 +1,11 @@ +mov prores_ks +# ProRes, encoder prores_ks. Container Apple QuickTime movie (.mov). +# The encoder delivers a higher quality but is very slow in comparison. +profile=4444 +# The possible video profile values for the ProRes codec are: +# 5 = 4444xq +# 4 = 4444 +# 3 = HQ (high quality) +# 2 = Standard +# 1 = LT (light) +# 0 = Proxy diff --git a/cinelerra-5.1/ffmpeg/video/prores_proxy.pro b/cinelerra-5.1/ffmpeg/video/prores_proxy.pro new file mode 100644 index 00000000..5b297ecc --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/prores_proxy.pro @@ -0,0 +1,4 @@ +matroska prores +#ProRes: For fast creation of proxies. Container Matroska (.mkv). +# Do not render audio as it will fail with current opts +profile=0 diff --git a/cinelerra-5.1/plugins/deinterlace/deinterlace.C b/cinelerra-5.1/plugins/deinterlace/deinterlace.C index e6a15283..59fb042b 100644 --- a/cinelerra-5.1/plugins/deinterlace/deinterlace.C +++ b/cinelerra-5.1/plugins/deinterlace/deinterlace.C @@ -397,7 +397,7 @@ int DeInterlaceMain::process_buffer(VFrame *frame, deinterlace_swap(frame, frame, 0); break; } - send_render_gui(&changed_rows); +// send_render_gui(&changed_rows); return 0; } diff --git a/cinelerra-5.1/plugins/gamma/gamma.C b/cinelerra-5.1/plugins/gamma/gamma.C index 71267770..f03df480 100644 --- a/cinelerra-5.1/plugins/gamma/gamma.C +++ b/cinelerra-5.1/plugins/gamma/gamma.C @@ -437,29 +437,23 @@ int GammaMain::process_buffer(VFrame *frame, frame_rate, use_opengl); - if(use_opengl) - { + int plot = config.plot; + if( config.automatic ) { + calculate_max(frame); + plot = 1; // Always plot to set the slider + } + if( plot ) { + send_render_gui(this); + } + + if(use_opengl) { // Aggregate if(next_effect_is(_("Histogram"))) return 0; if(next_effect_is(_("Color Balance"))) return 0; - - return run_opengl(); } - else - if(config.automatic) - { - calculate_max(frame); -// Always plot to set the slider - send_render_gui(this); - } - else - if(config.plot) - { - send_render_gui(this); - } if(!engine) engine = new GammaEngine(this); engine->process_packages(GammaEngine::APPLY, frame); diff --git a/cinelerra-5.1/plugins/histogram/histogram.C b/cinelerra-5.1/plugins/histogram/histogram.C index 523c863f..f16e3fd4 100644 --- a/cinelerra-5.1/plugins/histogram/histogram.C +++ b/cinelerra-5.1/plugins/histogram/histogram.C @@ -446,9 +446,6 @@ int HistogramMain::process_buffer(VFrame *frame, frame_rate, use_opengl); -// Apply histogram in hardware - if(use_opengl) return run_opengl(); - this->input = frame; this->output = frame; if( !engine ) @@ -494,12 +491,11 @@ int HistogramMain::process_buffer(VFrame *frame, // config.gamma[HISTOGRAM_BLUE], // config.high_input[HISTOGRAM_BLUE]); - +// Apply histogram in hardware + if(use_opengl) return run_opengl(); // Apply histogram engine->process_packages(HistogramEngine::APPLY, input, 0); - - return 0; } diff --git a/cinelerra-5.1/plugins/threshold/threshold.C b/cinelerra-5.1/plugins/threshold/threshold.C index ad685198..e7e510ed 100644 --- a/cinelerra-5.1/plugins/threshold/threshold.C +++ b/cinelerra-5.1/plugins/threshold/threshold.C @@ -155,10 +155,10 @@ int ThresholdMain::process_buffer(VFrame *frame, get_framerate(), use_opengl); - if(use_opengl) return run_opengl(); - send_render_gui(frame); + if(use_opengl) return run_opengl(); + if(!threshold_engine) threshold_engine = new ThresholdEngine(this); threshold_engine->process_packages(frame); -- 2.26.2