[gimp-gap/gap-2-8] provided workaround for win 64bit crash on video encoder window move attempt



commit cd00fa067540f137ad8cdca13f35bb7188e4e0a0
Author: Wolfgang Hofer <wolfgangh svn gnome org>
Date:   Thu Jun 19 13:01:51 2014 +0200

    provided workaround for win 64bit crash on video encoder window move attempt

 ChangeLog                |   18 +++++++++++++++
 README                   |   54 ++++++++++++++++++++++++++++++++++++---------
 configure.in             |   22 +++++++++++++++++-
 vid_common/gap_cme_gui.c |   18 ++++++--------
 4 files changed, 90 insertions(+), 22 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 41e72dd..c04898b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2014-06-19 Wolfgang Hofer <hof gimp org>
+
+- workaround for windows specific crash of the master video encoder window
+  on attempt to move the window.
+  
+  (gtk seems to have a bug in WINDOWS 64 bit environment when the GUI uses threads
+   see also http://stackoverflow.com/questions/15675751/gtk-window-moved-then-crash)
+   
+  fortunately the master video encoder GUI already provides a fallback 
+  implementation without using threads that now can be compiled optionally
+  via configure option:
+  
+  (this option shall be used for WINDOWS 64 bit builds 
+  
+  * configure.in
+  * README
+  * gap/gap_cme_gui.c
+
 2014-05-30 Wolfgang Hofer <hof gimp org>
 
 - fixed typos (applied path by Anders Jonsson see #730549)
diff --git a/README b/README
index debb5c6..f0a5c04 100644
--- a/README
+++ b/README
@@ -7,12 +7,12 @@ Animations as sequences of single frames.
 
 Requires:
 =========
- - gimp 2.6.0 or higher.
-     This release was tested with gimp-2.6.6
+ - gimp 2.8.0 or higher.
+     This release was tested with gimp-2.8.10
      
      Note: GIMP-GAP provides some features that are able to call many of the
            GIMP standard filters. (plug-in programs that are shiped with 
-           gimp-2.6.6) Those features depend on the tested PDB interface
+           gimp-2.8.10) Those features depend on the tested PDB interface
            versions and may fail if newer version are used.
 
  - glib 2.8 or higher.
@@ -81,7 +81,7 @@ Those configure_option files are read by the master .configure script
 
 
 
-Installation from SVN source tree:
+Installation from GIT source tree:
 ==================================
 
   ./autogen.sh   # includes generation of the configure script ant the ./configure call
@@ -105,6 +105,31 @@ Additional notes:
   This version of GIMP-GAP is a separated Package since GIMP-1.3.x
   and does not compile/run with GIMP-1.2.x or older GIMP versions than 2.4.
 
+Cross compilation for Windows:
+==================================
+
+GIMP-GAP was succesfully built for Windows 64 bit systems
+on a 64 bit Linux Host by following those cross compilation steps:
+
+    o) installed most dependency libs from openSuSE 13.1 windows 64 bit
+       Note that openSuSE already provides many cross compiled libraries for Windows.
+       The url for the win 64 bit repository is:
+       http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_13.1/
+    o) have a script to setup environment varbles 
+       (PREFIX, LD_LIBRARY_PATH and other stuff see the gimp wiki crosscompile page)
+    o) crosscompiled some dependency libs that were not provided as binary by openSUSE 13.1
+    o) crosscompiled gimp-2.8.10 (see gimp wiki crosscompile page)
+
+    o) configure GAP for cross compilation:
+    
+       -) Add the options:
+              --enable-cross-compile  --target-os=mingw32  --arch=x86_64
+          to the file:  extern_libs/configure_options_ffmpeg_win32.txt
+          
+       -) run configure (or autogen.sh) with the following configure options:
+           ./configure  --prefix=$PREFIX --host=x86_64-w64-mingw32 --disable-libmpeg3 
--disable-gui-thread-support
+           
+
 
 Notes:
 ======
@@ -122,7 +147,7 @@ Notes:
      The programs mpeg2encode, mpeg_encode, and xanim
      are old and you may not need them at all since GIMP-GAP-2.2
      provides improved alternatives for all of them.
-     Note that the old frontends are not bulit by default.
+     Note that the old frontends are not maintained and not bulit by default.
      
      If you want to use that old stuff, you should install
        xanim 2.80.1 (loki)
@@ -132,17 +157,24 @@ Notes:
      
      
      
-     It is recommanded to install the program mplayer.
+     It is recommended to install the program mplayer.
      MPlayer does support very much videofileformats.
      
 
    - The GIMP-GAP playback module provides audiosupport for audiofiles
-     in RIFF WAV format.  The audiosupport is based on wavplay (tested
-     with version 1.4).
+     in RIFF WAV format based on the SDL library.
+     
+     The older implementation of audiosupport is based on wavplay (tested
+     with version 1.4) is still available 
+     (but you should not need it anyway since the SDL based implementation
+     works without an external audioserver and is available on multiple operation systems).
+     
+     
+     If you want to have the OLD audiosupport you must install wavplay
+     and configure and compile gimp-gap with the configure options:
      
-     If you want to have audiosupport you must install wavplay
-     and configure and compile gimp-gap without the
-     configure option --disable-audiosupport
+     --enable-audio-support-wavplay
+     --disable-audio-support-sdl
      
      As far as i know, wavplay is available only for LINUX, but i may
      be wrong..
diff --git a/configure.in b/configure.in
index a999847..8501c58 100644
--- a/configure.in
+++ b/configure.in
@@ -1073,7 +1073,7 @@ AC_SUBST(LMPEG3_A)
 
 dnl 
 dnl TODO: check for required gthread version, 
-dnl and disable GAP_USE_GTHREAD if not available
+dnl and disable GAP_GUI_USE_GTHREAD if not available
 dnl
 GTHREAD_LIBS=`$PKG_CONFIG --libs gthread-2.0`
 AC_SUBST(GTHREAD_LIBS)
@@ -1088,6 +1088,26 @@ else
 fi
 
 
+dnl The GAP dialog window (of the master video encoder) typically uses threads
+dnl to keep refresh alive while calling various vdieo encoder partameter dialogs
+dnl via the PDB.
+dnl A bug that occurs in Windows 64 bit environment leads to crash on attempts to
+dnl move the video encoder window when threads are used.
+dnl (Note that threads and refresh work fine on win 64 systems as long as you
+dnl do not move the window)
+dnl With the option --disable-gui-thread-support GAP can be configured to
+dnl compile an alternative implementation without threads that is recommended
+dnl for windows. When used you lose the refresh while encoder parameter window is open
+dnl but do not run into the crash.
+dnl  
+AC_ARG_ENABLE(gui_thread_support,
+              [  --disable-gui-thread-support      build GUI without g_thread_init ])
+  if test "x$enable_gui_thread_support" != "xno"; then
+        AC_DEFINE(GAP_GUI_USE_GTHREAD, 1,
+              [Define to 1 to enable gthread usage in GAP dialogs])
+  fi
+
+
 GAPVIDEOAPI_EXTLIBS="\$(GAP_VLIBS_FFMPEG) \$(GAP_VLIBS_MPEG3) \$(GAP_VLIBS_PNG) -lz \$(GTHREAD_LIBS) 
\$(GAP_PTHREAD_LIB) -lm"
 GAPVIDEOAPI_EXTINCS="\$(GAP_VINCS_FFMPEG) \$(GAP_VINCS_MPEG3)"
 AC_SUBST(GAPVIDEOAPI_EXTLIBS)
diff --git a/vid_common/gap_cme_gui.c b/vid_common/gap_cme_gui.c
index 9bf62e7..f7d5168 100644
--- a/vid_common/gap_cme_gui.c
+++ b/vid_common/gap_cme_gui.c
@@ -38,12 +38,10 @@
  */
 
 
-/* the gui can run even if we dont have gthread library
+/* if not defined GAP_GUI_USE_GTHREAD (from config.h) the gui can run without the gthread library
  * (but the main window refresh will not be done while the encoder
  * parameter dialog -- that is called via pdb -- is open)
  */
-#define GAP_USE_GTHREAD
-
 
 #include <config.h>
 
@@ -217,7 +215,7 @@ gap_cme_gui_pdb_call_encoder_gui_plugin(GapCmeGlobalParams *gpp)
     return -1;
   }
 
-#ifdef GAP_USE_GTHREAD
+#ifdef GAP_GUI_USE_GTHREAD
   if(gap_cme_gui_check_gui_thread_is_active(gpp)) return -1;
 
   /* start a thread for asynchron PDB call of the gui_ procedure
@@ -282,7 +280,7 @@ gap_cme_gui_thread_async_pdb_call(gpointer data)
 
   gpp = gap_cme_main_get_global_params();
 
-#ifdef GAP_USE_GTHREAD
+#ifdef GAP_GUI_USE_GTHREAD
   if(gap_debug) 
   {
     gap_file_printf("THREAD: gap_cme_gui_thread_async_pdb_call &gpp: %ld\n", (long)gpp);
@@ -1493,7 +1491,7 @@ p_storybord_job_finished(GapCmeGlobalParams *gpp, t_global_stb *gstb)
   g_snprintf(gstb->status_msg, sizeof(gstb->status_msg), _("ready"));
   p_status_progress(gpp, gstb);
 
-#ifdef GAP_USE_GTHREAD
+#ifdef GAP_GUI_USE_GTHREAD
    /* is the encoder specific gui_thread still open ? */
    if(gpp->val.gui_proc_thread)
    {
@@ -1964,7 +1962,7 @@ gap_cme_gui_check_storyboard_file(GapCmeGlobalParams *gpp)
 
 
 
-#ifdef GAP_USE_GTHREAD
+#ifdef GAP_GUI_USE_GTHREAD
   if(gap_cme_gui_check_gui_thread_is_active(gpp))  { return; }
   if(gstb->poll_timertag >= 0)           { return; }
 
@@ -4358,7 +4356,7 @@ gap_cme_gui_start_video_encoder_as_thread(GapCmeGlobalParams *gpp)
     return -1;
   }
 
-#ifdef GAP_USE_GTHREAD
+#ifdef GAP_GUI_USE_GTHREAD
   if(gpp->productive_encoder_thread != NULL)
   {
     return -1;
@@ -4418,7 +4416,7 @@ gap_cme_gui_master_encoder_dialog(GapCmeGlobalParams *gpp)
     gap_file_printf("gap_cme_gui_master_encoder_dialog: Start\n");
   }
 
-#ifdef GAP_USE_GTHREAD
+#ifdef GAP_GUI_USE_GTHREAD
   /* check and init thread system */
   gap_base_thread_init();
   gdk_threads_init ();
@@ -4486,7 +4484,7 @@ gap_cme_gui_master_encoder_dialog(GapCmeGlobalParams *gpp)
 
   gpp->val.run = 0;
   gtk_main ();
-#ifdef GAP_USE_GTHREAD
+#ifdef GAP_GUI_USE_GTHREAD
   gdk_threads_leave ();
 #endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]