projects
/
goodguy
/
cinelerra.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
19ba0ed
)
improvements/fixes from MatN and Andrew related to AppImage and batch render
author
Good Guy
<good1.2guy@gmail.com>
Fri, 15 Oct 2021 23:01:39 +0000
(17:01 -0600)
committer
Good Guy
<good1.2guy@gmail.com>
Fri, 15 Oct 2021 23:01:39 +0000
(17:01 -0600)
cinelerra-5.1/cinelerra/batchrender.C
patch
|
blob
|
history
cinelerra-5.1/cinelerra/mwindow.C
patch
|
blob
|
history
cinelerra-5.1/cinelerra/mwindow.h
patch
|
blob
|
history
cinelerra-5.1/cinelerra/render.C
patch
|
blob
|
history
cinelerra-5.1/cinelerra/renderfarmclient.C
patch
|
blob
|
history
diff --git
a/cinelerra-5.1/cinelerra/batchrender.C
b/cinelerra-5.1/cinelerra/batchrender.C
index b657e0f096002b6a8525cb803590b490fccdb015..20d817b5df222837f07ff18320cf28aa483b5449 100644
(file)
--- a/
cinelerra-5.1/cinelerra/batchrender.C
+++ b/
cinelerra-5.1/cinelerra/batchrender.C
@@
-597,8
+597,10
@@
void BatchRenderThread::start_rendering(char *config_path,
else {
BC_Trace::disable_locks();
}
else {
BC_Trace::disable_locks();
}
-
+// In batch mode there is no mwindow, so init_plugins is called with
+// mwindow* = NULL.
MWindow::init_plugins(0, preferences);
MWindow::init_plugins(0, preferences);
+ MWindow::init_ladspa_plugins(0, preferences);
char font_path[BCTEXTLEN];
strcpy(font_path, preferences->plugin_dir);
strcat(font_path, "/" FONT_SEARCHPATH);
char font_path[BCTEXTLEN];
strcpy(font_path, preferences->plugin_dir);
strcat(font_path, "/" FONT_SEARCHPATH);
diff --git
a/cinelerra-5.1/cinelerra/mwindow.C
b/cinelerra-5.1/cinelerra/mwindow.C
index b7af252fc68f0b9b7b00690d3427abfd92f4858f..9d71e561103f80a42d237bb66926232c5c83baf6 100644
(file)
--- a/
cinelerra-5.1/cinelerra/mwindow.C
+++ b/
cinelerra-5.1/cinelerra/mwindow.C
@@
-240,7
+240,6
@@
MWindow::MWindow()
sighandler = 0;
restart_status = 0;
screens = 1;
sighandler = 0;
restart_status = 0;
screens = 1;
- appimageDir = getenv("APPDIR"); //NULL if not running as appimage
in_destructor = 0;
speed_edl = 0;
beeper = 0;
in_destructor = 0;
speed_edl = 0;
beeper = 0;
@@
-561,9
+560,8
@@
void MWindow::get_plugin_path(char *path, const char *plug_dir, const char *fs_p
* @brief Load plugins according to an index file.
*
* @details Builds an ArrayList of plugin servers only if there is no
* @brief Load plugins according to an index file.
*
* @details Builds an ArrayList of plugin servers only if there is no
-* mismatch for file layout version, index identifier, or executable
-* timestamp mismatch for the built-in plugins. If OK, add the plugin
-* servers to the global list.
+* mismatch for file layout version, index identifier, or timestamp of
+* the built-in plugins. If OK, add the plugin servers to the global list.
*
* @note If an error is returned the index file needs to be rebuilt, and
* then this function must be called again.
*
* @note If an error is returned the index file needs to be rebuilt, and
* then this function must be called again.
@@
-673,9
+671,13
@@
int MWindow::check_plugin_index(ArrayList<PluginServer*> &plugins,
}
return 0;
}
}
return 0;
}
-/*
+
+/**
* @brief Load built-in and LV2 plugins as specified in index file,
* rebuild the index file if needed.
* @brief Load built-in and LV2 plugins as specified in index file,
* rebuild the index file if needed.
+* @param[in] mwindow: GUI class pointer, will be NULL for batch
+* rendering or renderfarm client.
+* @param[in] preferences: Information from cinelerra_rc file.
*/
int MWindow::init_plugins(MWindow *mwindow, Preferences *preferences)
{
*/
int MWindow::init_plugins(MWindow *mwindow, Preferences *preferences)
{
@@
-689,7
+691,7
@@
int MWindow::init_plugins(MWindow *mwindow, Preferences *preferences)
// index_id is 2nd line of the index file, normally full plugin path,
// but fixed value if AppImage because the path changes on each run.
// And if the second line does not match on the next run the index is rebuilt.
// index_id is 2nd line of the index file, normally full plugin path,
// but fixed value if AppImage because the path changes on each run.
// And if the second line does not match on the next run the index is rebuilt.
- if(
mwindow->appimageDir
) strcpy(index_id, getenv("CINGG_BUILD"));
+ if(
getenv("APPDIR") && getenv("CINGG_BUILD")
) strcpy(index_id, getenv("CINGG_BUILD"));
else strcpy(index_id, plugin_path);
FILE *fp = fopen(index_path,"a+");
if( !fp ) {
else strcpy(index_id, plugin_path);
FILE *fp = fopen(index_path,"a+");
if( !fp ) {
@@
-723,14
+725,18
@@
int MWindow::init_plugins(MWindow *mwindow, Preferences *preferences)
return ret;
}
return ret;
}
-/*
+/*
*
* @brief Load ladspa plugins as specified in index files, for each ladspa
* directory keep a separate index file. Rebuild index file(s) if needed.
* @brief Load ladspa plugins as specified in index files, for each ladspa
* directory keep a separate index file. Rebuild index file(s) if needed.
-**/
+* @param[in] mwindow: GUI class pointer, will be NULL for batch
+* rendering or renderfarm client.
+* @param[in] preferences: Information from cinelerra_rc file.
+*/
int MWindow::init_ladspa_plugins(MWindow *mwindow, Preferences *preferences)
{
#ifdef HAVE_LADSPA
char *path = getenv("LADSPA_PATH");
int MWindow::init_ladspa_plugins(MWindow *mwindow, Preferences *preferences)
{
#ifdef HAVE_LADSPA
char *path = getenv("LADSPA_PATH");
+ char *appdir = getenv("APPDIR");
char ladspa_path[BCTEXTLEN];
if( !path ) { // if no env var, use CinGG's own ladspa dir
strncpy(ladspa_path, File::get_ladspa_path(), sizeof(ladspa_path));
char ladspa_path[BCTEXTLEN];
if( !path ) { // if no env var, use CinGG's own ladspa dir
strncpy(ladspa_path, File::get_ladspa_path(), sizeof(ladspa_path));
@@
-749,7
+755,7
@@
int MWindow::init_ladspa_plugins(MWindow *mwindow, Preferences *preferences)
// If the first part of the plugin_path matches the APPDIR, we are
// referring to CinGG's ladspa, replace the path by a fixed ID. APPDIR
// only exists if we are running as AppImage (with variable mount points).
// If the first part of the plugin_path matches the APPDIR, we are
// referring to CinGG's ladspa, replace the path by a fixed ID. APPDIR
// only exists if we are running as AppImage (with variable mount points).
- if(
mwindow->appimageDir && strncmp(plugin_path, mwindow->appimageDir, strlen(mwindow->appimageD
ir)) == 0 )
+ if(
appdir && strncmp(plugin_path, appdir, strlen(appd
ir)) == 0 )
strcpy(index_id, getenv("CINGG_BUILD"));
else strcpy(index_id, plugin_path);
strcpy(index_id, getenv("CINGG_BUILD"));
else strcpy(index_id, plugin_path);
@@
-818,7
+824,7
@@
void MWindow::scan_plugin_index(MWindow *mwindow, Preferences *preferences, FILE
char fs_path[BCTEXTLEN], path[BCTEXTLEN];
get_plugin_path(fs_path, 0, fs.dir_list[i]->path);
get_plugin_path(path, plug_dir, fs_path);
char fs_path[BCTEXTLEN], path[BCTEXTLEN];
get_plugin_path(fs_path, 0, fs.dir_list[i]->path);
get_plugin_path(path, plug_dir, fs_path);
- if( fs.is_dir(fs_path) ) {
+ if( fs.is_dir(fs_path) ) {
// recursively scan child directory
scan_plugin_index(mwindow, preferences, fp, plug_dir, path, idx);
continue;
}
scan_plugin_index(mwindow, preferences, fp, plug_dir, path, idx);
continue;
}
diff --git
a/cinelerra-5.1/cinelerra/mwindow.h
b/cinelerra-5.1/cinelerra/mwindow.h
index 46e96643ae1930f562dad77a34471025011a89cc..f0814499ca6a1da3266580a01ec3b32c7b7c9f7e 100644
(file)
--- a/
cinelerra-5.1/cinelerra/mwindow.h
+++ b/
cinelerra-5.1/cinelerra/mwindow.h
@@
-858,7
+858,6
@@
public:
SigHandler *sighandler;
int restart_status;
int screens;
SigHandler *sighandler;
int restart_status;
int screens;
- const char *appimageDir;
int in_destructor;
Shuttle *shuttle;
WinTV *wintv;
int in_destructor;
Shuttle *shuttle;
WinTV *wintv;
diff --git
a/cinelerra-5.1/cinelerra/render.C
b/cinelerra-5.1/cinelerra/render.C
index 77e7ce790f39413d53b60e883feb68e79a999adf..1136be9bb5415c475b0efcd58f11baaa9ad858e3 100644
(file)
--- a/
cinelerra-5.1/cinelerra/render.C
+++ b/
cinelerra-5.1/cinelerra/render.C
@@
-684,7
+684,7
@@
void RenderThread::render_single(int test_overwrite, Asset *asset, EDL *edl,
render->result = 0;
// Create rendering command
render->result = 0;
// Create rendering command
- TransportCommand *command = new TransportCommand(
mwindow
->preferences);
+ TransportCommand *command = new TransportCommand(
render
->preferences);
command->command = NORMAL_FWD;
command->get_edl()->copy_all(edl);
command->change_type = CHANGE_ALL;
command->command = NORMAL_FWD;
command->get_edl()->copy_all(edl);
command->change_type = CHANGE_ALL;
diff --git
a/cinelerra-5.1/cinelerra/renderfarmclient.C
b/cinelerra-5.1/cinelerra/renderfarmclient.C
index 807b866afd2c9c96b09924ebe01decc99c43f2e5..24e52db718e0c7a5978d51e2fd413f7336ec3326 100644
(file)
--- a/
cinelerra-5.1/cinelerra/renderfarmclient.C
+++ b/
cinelerra-5.1/cinelerra/renderfarmclient.C
@@
-77,6
+77,7
@@
RenderFarmClient::RenderFarmClient(int port,
boot_preferences = new Preferences;
boot_preferences->load_defaults(boot_defaults);
MWindow::init_plugins(0, boot_preferences);
boot_preferences = new Preferences;
boot_preferences->load_defaults(boot_defaults);
MWindow::init_plugins(0, boot_preferences);
+ MWindow::init_ladspa_plugins(0, boot_preferences);
BC_Signals::set_catch_segv(boot_preferences->trap_sigsegv);
BC_Signals::set_catch_intr(0);
if( boot_preferences->trap_sigsegv ) {
BC_Signals::set_catch_segv(boot_preferences->trap_sigsegv);
BC_Signals::set_catch_intr(0);
if( boot_preferences->trap_sigsegv ) {