Revision: 4490
          http://pd-gem.svn.sourceforge.net/pd-gem/?rev=4490&view=rev
Author:   zmoelnig
Date:     2011-08-25 16:04:52 +0000 (Thu, 25 Aug 2011)
Log Message:
-----------
initialize QuickTime in the plugins

Modified Paths:
--------------
    trunk/Gem/plugins/filmQT/filmQT.cpp
    trunk/Gem/plugins/imageQT/imageQT.cpp
    trunk/Gem/plugins/recordQT/recordQT.cpp

Modified: trunk/Gem/plugins/filmQT/filmQT.cpp
===================================================================
--- trunk/Gem/plugins/filmQT/filmQT.cpp 2011-08-25 16:04:12 UTC (rev 4489)
+++ trunk/Gem/plugins/filmQT/filmQT.cpp 2011-08-25 16:04:52 UTC (rev 4490)
@@ -96,6 +96,9 @@
                         duration(0),
                         m_bInit(false)
 {
+  if(!filmQT_initQT()) {
+    throw(GemException("unable to initialize QuickTime"));
+  }
   m_image.image.setCsizeByFormat(GL_RGBA);
   m_bInit = true;
 }

Modified: trunk/Gem/plugins/imageQT/imageQT.cpp
===================================================================
--- trunk/Gem/plugins/imageQT/imageQT.cpp       2011-08-25 16:04:12 UTC (rev 
4489)
+++ trunk/Gem/plugins/imageQT/imageQT.cpp       2011-08-25 16:04:52 UTC (rev 
4490)
@@ -232,15 +232,21 @@
 imageQT :: imageQT() : imageBase(false)
 {
   static bool firsttime=true;
-  if(firsttime) {
-#if defined _WIN32
-    OSErr err=InitializeQTML(0);
-    if(err!=noErr) {
-      throw(GemException("could not initialize QTML"));
+  if(firsttime) { 
+#ifdef _WIN32
+    // Initialize QuickTime Media Layer
+    OSErr              err = noErr;
+    if ((err = InitializeQTML(0))) {
+      throw(GemException("unable to initialize QuickTime"));
+    }  
+    // start QuickTime
+    if (err = EnterMovies()) {
+      throw(GemException("unable to initialize QuickTime/Movies"));
     }
-#endif
+    verbose(1, "imageQT: QT init done");
+#endif // WINDOWS
+    firsttime=false;
   }
-  firsttime=false;
   //post("imageQT");
 }
 imageQT :: ~imageQT()

Modified: trunk/Gem/plugins/recordQT/recordQT.cpp
===================================================================
--- trunk/Gem/plugins/recordQT/recordQT.cpp     2011-08-25 16:04:12 UTC (rev 
4489)
+++ trunk/Gem/plugins/recordQT/recordQT.cpp     2011-08-25 16:04:52 UTC (rev 
4490)
@@ -77,22 +77,22 @@
 {
   m_filename[0] = 0;
 
+  static bool firsttime=true;
+  if(firsttime) { 
 #ifdef _WIN32
-  // Initialize QuickTime Media Layer
-  /* isn't this done in GemMan/GemWinCreateNT already? */
-  OSErr                err = noErr;
-  if ((err = InitializeQTML(0))) {
-    //    error("recordQT: Could not initialize quicktime: error %d", err);
-    throw(GemException("unable to initialize QuickTime"));
+    // Initialize QuickTime Media Layer
+    OSErr              err = noErr;
+    if ((err = InitializeQTML(0))) {
+      throw(GemException("unable to initialize QuickTime"));
+    }  
+    // start QuickTime
+    if (err = EnterMovies()) {
+      throw(GemException("unable to initialize QuickTime/Movies"));
+    }
+    verbose(1, "recordQT: QT init done");
+#endif // WINDOWS
+    firsttime=false;
   }
-       
-  // Initialize QuickTime
-  if (err = EnterMovies()) {
-    //error("recordQT: Could not initialize quicktime-movies: error %d", err);
-    throw(GemException("unable to initialize QuickTime/Movies"));
-  }
-  verbose(1, "recordQT: QT init done");
-#endif // WINDOWS
 
   //get list of codecs installed  -- useful later
   CodecNameSpecListPtr codecList;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
pd-gem-CVS mailing list
pd-gem-CVS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pd-gem-cvs

Reply via email to