[MPlayer-cvslog] CVS: main/libmpcodecs vd_qtvideo.c, 1.19, 1.20 ad_qtaudio.c, 1.15, 1.16 ve_qtvideo.c, 1.10, 1.11

Sascha Sommer CVS syncmail at mplayerhq.hu
Mon Jan 17 21:57:51 CET 2005


CVS change done by Sascha Sommer CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv26724/libmpcodecs

Modified Files:
	vd_qtvideo.c ad_qtaudio.c ve_qtvideo.c 
Log Message:
preload quicktime.qts, this allows us to ignore the hardcoded path inside the dlls so that quicktime.qts doesn't need to be in the windows system dir, patch by Gianluigi Tiesi <mplayer at netfarm.it>, comments by myself

Index: vd_qtvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_qtvideo.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- vd_qtvideo.c	10 Oct 2004 19:51:17 -0000	1.19
+++ vd_qtvideo.c	17 Jan 2005 20:57:48 -0000	1.20
@@ -52,7 +52,7 @@
 
 static GWorldPtr OutBufferGWorld = NULL;//a GWorld is some kind of description for a drawing environment
 static ImageDescriptionHandle framedescHandle;
-//static HINSTANCE qtml_dll;
+static HINSTANCE qtime_qts; // handle to the preloaded quicktime.qts
 static HMODULE handler;
 
 #if defined(USE_QTX_CODECS) && !defined(MACOSX)
@@ -116,6 +116,13 @@
     Setup_LDT_Keeper();
 #endif
 
+    //preload quicktime.qts to avoid the problems caused by the hardcoded path inside the dll
+    qtime_qts = LoadLibraryA("QuickTime.qts");
+    if(!qtime_qts){
+    mp_msg(MSGT_DECVIDEO,MSGL_ERR,"unable to load QuickTime.qts\n" );
+    return 0;
+    }
+    
     handler = LoadLibraryA("qtmlClient.dll");
     if(!handler){
     mp_msg(MSGT_DECVIDEO,MSGL_ERR,"unable to load qtmlClient.dll\n");

Index: ad_qtaudio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_qtaudio.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ad_qtaudio.c	10 Oct 2004 19:51:18 -0000	1.15
+++ ad_qtaudio.c	17 Jan 2005 20:57:48 -0000	1.16
@@ -68,6 +68,7 @@
                                 unsigned long *outputBytes);
 typedef int (__cdecl* LPFUNC9)(SoundConverter         sc) ;                                
 
+static HINSTANCE qtime_qts; // handle to the preloaded quicktime.qts
 static HINSTANCE qtml_dll;
 static LPFUNC1 InitializeQTML;
 static LPFUNC2 SoundConverterOpen;
@@ -91,10 +92,17 @@
 #ifdef WIN32_LOADER
     Setup_LDT_Keeper();
 #endif
+    //preload quicktime.qts to avoid the problems caused by the hardcoded path inside the dll
+    qtime_qts = LoadLibraryA("QuickTime.qts");
+    if( qtime_qts == (HMODULE)NULL )
+    {
+        mp_msg(MSGT_DECAUDIO,MSGL_ERR,"failed loading QuickTime.qts\n" );
+        return 1;
+    }
     qtml_dll = LoadLibraryA("qtmlClient.dll");
     if( qtml_dll == (HMODULE)NULL )
     {
-        mp_msg(MSGT_DECAUDIO,MSGL_ERR,"failed loading dll\n" );
+        mp_msg(MSGT_DECAUDIO,MSGL_ERR,"failed loading qtmlClient.dll\n" );
 	return 1;
     }
 #if 1
@@ -269,6 +277,8 @@
 //    printf("TerminateQTML:%i\n",error);
 //    FreeLibrary( qtml_dll );
 //    qtml_dll = NULL;
+//    FreeLibrary( qtime_qts );
+//    qtime_qts = NULL;
 //    printf("qt dll loader uninit done\n");
 #ifdef MACOSX
     ExitMovies();

Index: ve_qtvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_qtvideo.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ve_qtvideo.c	28 Aug 2004 20:59:49 -0000	1.10
+++ ve_qtvideo.c	17 Jan 2005 20:57:48 -0000	1.11
@@ -34,6 +34,7 @@
 HMODULE   WINAPI LoadLibraryA(LPCSTR);
 FARPROC   WINAPI GetProcAddress(HMODULE,LPCSTR);
 int       WINAPI FreeLibrary(HMODULE);
+static HINSTANCE qtime_qts; //handle to preloaded quicktime.qts
 static HMODULE handler;
 
 static OSErr        (*FindCodec)(CodecType              cType,
@@ -296,6 +297,13 @@
 #ifdef WIN32_LOADER
     Setup_LDT_Keeper();
 #endif
+    //preload quicktime.qts to avoid the problems caused by the hardcoded path inside the dll
+    qtime_qts = LoadLibraryA("QuickTime.qts");
+    if(!qtime_qts){
+        mp_msg(MSGT_MENCODER,MSGL_ERR,"unable to load QuickTime.qts\n" );
+        return 0;
+    }
+    
     handler = LoadLibraryA("qtmlClient.dll");
     if(!handler){
         mp_msg(MSGT_MENCODER,MSGL_ERR,"unable to load qtmlClient.dll\n");




More information about the MPlayer-cvslog mailing list