plugin gui ref by id fixes, plugin gui opengl update fixes, prores opts files
authorGood Guy <good1.2guy@gmail.com>
Mon, 4 Nov 2019 21:38:40 +0000 (14:38 -0700)
committerGood Guy <good1.2guy@gmail.com>
Mon, 4 Nov 2019 21:38:40 +0000 (14:38 -0700)
15 files changed:
cinelerra-5.1/cinelerra/module.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/plugin.C
cinelerra-5.1/cinelerra/pluginset.C
cinelerra-5.1/cinelerra/pluginset.h
cinelerra-5.1/ffmpeg/audio/pcm_s24.pro [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/ks.pro [deleted file]
cinelerra-5.1/ffmpeg/video/med422p10.pro [deleted file]
cinelerra-5.1/ffmpeg/video/prores.pro [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/prores_ks.pro [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/prores_proxy.pro [new file with mode: 0644]
cinelerra-5.1/plugins/deinterlace/deinterlace.C
cinelerra-5.1/plugins/gamma/gamma.C
cinelerra-5.1/plugins/histogram/histogram.C
cinelerra-5.1/plugins/threshold/threshold.C

index a2e17bb22f085ff2a7ebbb5cc328ad6205378ba6..3c21504e6a7e30471c91866bd50774cd447d6f60 100644 (file)
@@ -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;
index e4e6f8370f243202d344d00d6292e37fda23d0ff..ee89074ee5d316e9972be5b588d4cf23e44a1b5d 100644 (file)
@@ -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)
index e37e930f9342802d3d678bacc63efdd0482cf5c6..d28087b838a86b838165bfb316dc79cf678b0448 100644 (file)
@@ -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);
index e1f1215e9f6beba10f7bd85ac7f7aa6062296269..86bb4b6687290e24f3904ec637b021481f466cfc 100644 (file)
@@ -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;
 }
index 4e149e76f5e85a17f4e23e968304d28c0b041422..c0e4b8af8490ba33a273f29fb84cd51218fcfac8 100644 (file)
@@ -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 (file)
index 0000000..5a833fe
--- /dev/null
@@ -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 (file)
index 7170a15..0000000
+++ /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 (file)
index f2791b5..0000000
+++ /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 (file)
index 0000000..e8e589b
--- /dev/null
@@ -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 (file)
index 0000000..a56767d
--- /dev/null
@@ -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 (file)
index 0000000..5b297ec
--- /dev/null
@@ -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
index e6a152832db3a2edee998df32a5e9200f0a53ae3..59fb042b8862af442d61cab2a08207678eaa899f 100644 (file)
@@ -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;
 }
 
index 71267770eca9cbad4ba90006402bf02d4bc18c4d..f03df480dad900444415f23634fc9ad3c101f128 100644 (file)
@@ -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);
index 523c863f3e0bc142c8b372dbde030f44c147a737..f16e3fd4f46a771db8f1f4b24b27da0339fad9c4 100644 (file)
@@ -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;
 }
 
index ad68519830ef042fc89489cf7a402f7ad45c624b..e7e510ed6ac1304fd92f755a70db6d12813394da 100644 (file)
@@ -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);