fix plugin probe when LANG != en
authorGood Guy <good1.2guy@gmail.com>
Tue, 23 Feb 2016 19:35:28 +0000 (12:35 -0700)
committerGood Guy <good1.2guy@gmail.com>
Tue, 23 Feb 2016 19:35:28 +0000 (12:35 -0700)
cinelerra-5.0/build/Makefile.cinelerra
cinelerra-5.0/cinelerra/filempeg.C
cinelerra-5.0/cinelerra/pluginserver.C
cinelerra-5.0/plugins/Makefile

index 761f57f2f93adcbd0157ffc96fc6206324cd67b2..6537a5ea32b71c328601fc79ca7896c8ed2465d4 100644 (file)
@@ -46,15 +46,21 @@ dist-clean:
 #      find \( -name .deps \) -exec rm -rf {} \; -prune
        find \( -name .libs \) -exec rm -rf {} \; -prune
 
 #      find \( -name .deps \) -exec rm -rf {} \; -prune
        find \( -name .libs \) -exec rm -rf {} \; -prune
 
-MJPEGDIR := $(shell expr thirdparty/mjpegtools* )
+MJPEGDIR := $(shell expr $(THIRDPARTY)/mjpegtools* )
+MPEG2ENC := bin/mpeg2enc
+MPEG2PLEX := bin/mplex
+HVEG2ENC := bin/hveg2enc
 
 
-$(PLUGIN_DIR)/mpeg2enc.plugin:
-       /bin/cp -a $(MJPEGDIR)/mpeg2enc/mpeg2enc $@
+$(MPEG2ENC):
+       cp -a $(MJPEGDIR)/mpeg2enc/mpeg2enc $@
 
 
-bin/mplex:
-       /bin/cp -a $(MJPEGDIR)/mplex/mplex $@
+$(MPEG2PLEX):
+       cp -a $(MJPEGDIR)/mplex/mplex $@
 
 
-install:       $(PLUGIN_DIR)/mpeg2enc.plugin bin/mplex
+$(HVEG2ENC):
+       cp -a $(TOPDIR)/mpeg2enc/$(OBJDIR)/hveg2enc $@
+
+install:       $(MPEG2PLEX) $(MPEG2ENC) $(HVEG2ENC)
        $(MAKE) -C plugins install
        DST=../bin $(MAKE) -C libzmpeg3 install
        $(MAKE) -C po install
        $(MAKE) -C plugins install
        DST=../bin $(MAKE) -C libzmpeg3 install
        $(MAKE) -C po install
index b8e9c497ff7344d58d71934f45cc9d21eef33be6..e14b657ed92a3d1d38b97039362298eb600ac84c 100644 (file)
@@ -50,8 +50,8 @@
 #include <unistd.h>
 
 
 #include <unistd.h>
 
 
-#define HVPEG_EXE "/hveg2enc.plugin"
-#define MJPEG_EXE "/mpeg2enc.plugin"
+#define HVPEG_EXE "/hveg2enc"
+#define MJPEG_EXE "/mpeg2enc"
 
 
 // M JPEG dependancies
 
 
 // M JPEG dependancies
@@ -484,10 +484,9 @@ int FileMPEG::open_file(int rd, int wr)
 // Construct command line
                        if(!result)
                        {
 // Construct command line
                        if(!result)
                        {
-                               char string[BCTEXTLEN];  string[0] = 0;
-                               sprintf(mjpeg_command, "%s%s", 
-                                       file->preferences->plugin_dir, HVPEG_EXE);
-                               append_vcommand_line(string);
+                               char string[BCTEXTLEN];
+                               get_exe_path(string);
+                               sprintf(mjpeg_command, "%s/%s", string, HVPEG_EXE);
 
                                if(asset->aspect_ratio > 0)
                                {
 
                                if(asset->aspect_ratio > 0)
                                {
@@ -535,8 +534,9 @@ int FileMPEG::open_file(int rd, int wr)
 // mjpegtools encoder
 //  this one is cinelerra-x.x.x/thirdparty/mjpegtools/mpeg2enc
                {
 // mjpegtools encoder
 //  this one is cinelerra-x.x.x/thirdparty/mjpegtools/mpeg2enc
                {
-                       sprintf(mjpeg_command, "%s%s -v 0 ", 
-                               file->preferences->plugin_dir, MJPEG_EXE);
+                       char string[BCTEXTLEN];
+                       get_exe_path(string);
+                       sprintf(mjpeg_command, "%s/%s -v 0 ", string, MJPEG_EXE);
 
 // Must disable interlacing if MPEG-1
                        switch (asset->vmpeg_preset)
 
 // Must disable interlacing if MPEG-1
                        switch (asset->vmpeg_preset)
@@ -550,7 +550,6 @@ int FileMPEG::open_file(int rd, int wr)
 
 // The current usage of mpeg2enc requires bitrate of 0 when quantization is fixed and
 // quantization of 1 when bitrate is fixed.  Perfectly intuitive.
 
 // The current usage of mpeg2enc requires bitrate of 0 when quantization is fixed and
 // quantization of 1 when bitrate is fixed.  Perfectly intuitive.
-                       char string[BCTEXTLEN];
                        if(asset->vmpeg_fix_bitrate)
                        {
                                sprintf(string, " -b %d -q 1", asset->vmpeg_bitrate / 1000);
                        if(asset->vmpeg_fix_bitrate)
                        {
                                sprintf(string, " -b %d -q 1", asset->vmpeg_bitrate / 1000);
index 6602f1eb70b0c6b9deac7420e0d2ed6e7529ff41..25573cf4b95986e61e61ae4ec3af2af501f73567 100644 (file)
@@ -314,16 +314,11 @@ int PluginServer::open_plugin(int master,
        this->plugin = plugin;
        this->edl = edl;
        if( plugin_type != PLUGIN_TYPE_FFMPEG && plugin_type != PLUGIN_TYPE_EXECUTABLE && !load_obj() ) {
        this->plugin = plugin;
        this->edl = edl;
        if( plugin_type != PLUGIN_TYPE_FFMPEG && plugin_type != PLUGIN_TYPE_EXECUTABLE && !load_obj() ) {
-// If the load failed it may still be an executable tool for a specific
-// file format, in which case we just store the path.
-               set_title(path);
-               char string[BCTEXTLEN];
-               strcpy(string, load_error());
-               if( !strstr(string, "executable") ) {
-                       eprintf("PluginServer::open_plugin: load_obj %s = %s\n", path, string);
-                       return PLUGINSERVER_NOT_RECOGNIZED;
-               }
-               plugin_type = PLUGIN_TYPE_EXECUTABLE;
+// If the load failed, can't use error to detect executable
+//  because locale and language selection change the load_error()
+//     if( !strstr(string, "executable") ) { set_title(path); plugin_type = PLUGIN_TYPE_EXECUTABLE; }
+               eprintf("PluginServer::open_plugin: load_obj %s = %s\n", path, load_error());
+               return PLUGINSERVER_NOT_RECOGNIZED;
        }
        if( plugin_type == PLUGIN_TYPE_UNKNOWN || plugin_type == PLUGIN_TYPE_BUILTIN ) {
                new_plugin =
        }
        if( plugin_type == PLUGIN_TYPE_UNKNOWN || plugin_type == PLUGIN_TYPE_BUILTIN ) {
                new_plugin =
index 19064e0a90218eefca98650e31ca4bcdbd569182..e45c30b5c57e9f7abe83b68f8de7ba0216fd7499 100644 (file)
@@ -138,21 +138,13 @@ DIRS = \
 #      findobject \
 
 DATA = $(PLUGIN_DIR)/fonts $(PLUGIN_DIR)/shapes
 #      findobject \
 
 DATA = $(PLUGIN_DIR)/fonts $(PLUGIN_DIR)/shapes
-MPEG2ENC = $(PLUGIN_DIR)/mpeg2enc.plugin
-HVEG2ENC = $(PLUGIN_DIR)/hveg2enc.plugin
 LADSPA = $(BINDIR)/ladspa
 
 LADSPA = $(BINDIR)/ladspa
 
-all:   $(DIRS) $(DATA) $(MPEG2ENC) $(HVEG2ENC) $(LADSPA)
+all:   $(DIRS) $(DATA) $(LADSPA)
 
 $(DATA):
        cp -a $(notdir $@) $(PLUGIN_DIR)/.
 
 
 $(DATA):
        cp -a $(notdir $@) $(PLUGIN_DIR)/.
 
-$(MPEG2ENC):
-       cp -a ../thirdparty/mjpegtools*/mpeg2enc/mpeg2enc $@
-
-$(HVEG2ENC):
-       cp -a ../mpeg2enc/$(OBJDIR)/hveg2enc $@
-
 $(LADSPA):
        mkdir -p $@
        if [ -d $(THIRDPARTY)/ladspa-*/usr/local/lib/ladspa ]; then \
 $(LADSPA):
        mkdir -p $@
        if [ -d $(THIRDPARTY)/ladspa-*/usr/local/lib/ladspa ]; then \