Mercurial > mplayer.hg
annotate loader/module.c @ 21263:db9754cebfab
Move #include <QuickTime/ImageCodec.h> before internal headers
to avoid #define of always_inline which would break it.
author | uau |
---|---|
date | Sun, 26 Nov 2006 19:19:00 +0000 |
parents | a2e02e6b6379 |
children | efc774a1e5a4 |
rev | line source |
---|---|
1 | 1 /* |
2 * Modules | |
3 * | |
4 * Copyright 1995 Alexandre Julliard | |
15166
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
13745
diff
changeset
|
5 * |
18783 | 6 * Modified for use with MPlayer, detailed changelog at |
7 * http://svn.mplayerhq.hu/mplayer/trunk/ | |
15166
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
13745
diff
changeset
|
8 * $Id$ |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
13745
diff
changeset
|
9 * |
1 | 10 */ |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
11 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
12 // define for quicktime calls debugging and/or MacOS-level emulation: |
8286
1a9ea966d840
patching out threads ;) raw measure: 18% cpu instead 30%
alex
parents:
8277
diff
changeset
|
13 #define EMU_QTX_API |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
14 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
15 // define for quicktime debugging (verbose logging): |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
16 //#define DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
17 |
3465 | 18 #include "config.h" |
21261
a2e02e6b6379
Rename config.h --> debug.h and include config.h explicitly.
diego
parents:
18878
diff
changeset
|
19 #include "debug.h" |
1 | 20 |
21 #include <assert.h> | |
22 #include <errno.h> | |
23 #include <fcntl.h> | |
24 #include <stdio.h> | |
25 #include <stdlib.h> | |
26 #include <string.h> | |
27 #include <unistd.h> | |
28 #include <sys/mman.h> | |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
29 #include <inttypes.h> |
1 | 30 |
7386 | 31 #include "wine/windef.h" |
32 #include "wine/winerror.h" | |
33 #include "wine/heap.h" | |
34 #include "wine/module.h" | |
35 #include "wine/pe_image.h" | |
36 #include "wine/debugtools.h" | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
37 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
38 #undef HAVE_LIBDL |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
39 |
2069 | 40 #ifdef HAVE_LIBDL |
41 #include <dlfcn.h> | |
7386 | 42 #include "wine/elfdll.h" |
2069 | 43 #endif |
1307
d8c1b0b38edc
Add prototypes to wine/loader stuff, so that we can catch __stdcall function
jkeil
parents:
128
diff
changeset
|
44 #include "win32.h" |
7386 | 45 #include "driver.h" |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
46 |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
47 #ifdef EMU_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
48 #include "wrapper.h" |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
49 static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); |
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
50 static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
51 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
52 |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
53 //#undef TRACE |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
54 //#define TRACE printf |
1 | 55 |
56 //WINE_MODREF *local_wm=NULL; | |
57 modref_list* local_wm=NULL; | |
58 | |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
59 HANDLE SegptrHeap; |
2069 | 60 |
3465 | 61 WINE_MODREF* MODULE_FindModule(LPCSTR m) |
1 | 62 { |
63 modref_list* list=local_wm; | |
8277 | 64 TRACE("FindModule: Module %s request\n", m); |
1 | 65 if(list==NULL) |
66 return NULL; | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
67 // while(strcmp(m, list->wm->filename)) |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
68 while(!strstr(list->wm->filename, m)) |
1 | 69 { |
128 | 70 TRACE("%s: %x\n", list->wm->filename, list->wm->module); |
1 | 71 list=list->prev; |
72 if(list==NULL) | |
73 return NULL; | |
2069 | 74 } |
1 | 75 TRACE("Resolved to %s\n", list->wm->filename); |
76 return list->wm; | |
2069 | 77 } |
1 | 78 |
1307
d8c1b0b38edc
Add prototypes to wine/loader stuff, so that we can catch __stdcall function
jkeil
parents:
128
diff
changeset
|
79 static void MODULE_RemoveFromList(WINE_MODREF *mod) |
1 | 80 { |
81 modref_list* list=local_wm; | |
82 if(list==0) | |
83 return; | |
84 if(mod==0) | |
85 return; | |
86 if((list->prev==NULL)&&(list->next==NULL)) | |
87 { | |
88 free(list); | |
89 local_wm=NULL; | |
90 // uninstall_fs(); | |
91 return; | |
92 } | |
93 for(;list;list=list->prev) | |
94 { | |
95 if(list->wm==mod) | |
96 { | |
97 if(list->prev) | |
98 list->prev->next=list->next; | |
99 if(list->next) | |
100 list->next->prev=list->prev; | |
101 if(list==local_wm) | |
102 local_wm=list->prev; | |
103 free(list); | |
104 return; | |
105 } | |
106 } | |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
107 |
2069 | 108 } |
109 | |
1 | 110 WINE_MODREF *MODULE32_LookupHMODULE(HMODULE m) |
111 { | |
112 modref_list* list=local_wm; | |
8277 | 113 TRACE("LookupHMODULE: Module %X request\n", m); |
1 | 114 if(list==NULL) |
8277 | 115 { |
116 TRACE("LookupHMODULE failed\n"); | |
1 | 117 return NULL; |
8277 | 118 } |
1 | 119 while(m!=list->wm->module) |
120 { | |
121 // printf("Checking list %X wm %X module %X\n", | |
122 // list, list->wm, list->wm->module); | |
123 list=list->prev; | |
124 if(list==NULL) | |
8277 | 125 { |
126 TRACE("LookupHMODULE failed\n"); | |
1 | 127 return NULL; |
8277 | 128 } |
2069 | 129 } |
130 TRACE("LookupHMODULE hit %p\n", list->wm); | |
1 | 131 return list->wm; |
2069 | 132 } |
1 | 133 |
134 /************************************************************************* | |
135 * MODULE_InitDll | |
136 */ | |
137 static WIN_BOOL MODULE_InitDll( WINE_MODREF *wm, DWORD type, LPVOID lpReserved ) | |
138 { | |
139 WIN_BOOL retv = TRUE; | |
140 | |
2069 | 141 static LPCSTR typeName[] = { "PROCESS_DETACH", "PROCESS_ATTACH", |
1 | 142 "THREAD_ATTACH", "THREAD_DETACH" }; |
143 assert( wm ); | |
144 | |
145 | |
146 /* Skip calls for modules loaded with special load flags */ | |
147 | |
148 if ( ( wm->flags & WINE_MODREF_DONT_RESOLVE_REFS ) | |
149 || ( wm->flags & WINE_MODREF_LOAD_AS_DATAFILE ) ) | |
150 return TRUE; | |
151 | |
152 | |
153 TRACE("(%s,%s,%p) - CALL\n", wm->modname, typeName[type], lpReserved ); | |
154 | |
155 /* Call the initialization routine */ | |
156 switch ( wm->type ) | |
157 { | |
158 case MODULE32_PE: | |
159 retv = PE_InitDLL( wm, type, lpReserved ); | |
160 break; | |
161 | |
162 case MODULE32_ELF: | |
163 /* no need to do that, dlopen() already does */ | |
164 break; | |
165 | |
166 default: | |
167 ERR("wine_modref type %d not handled.\n", wm->type ); | |
168 retv = FALSE; | |
169 break; | |
170 } | |
171 | |
172 /* The state of the module list may have changed due to the call | |
173 to PE_InitDLL. We cannot assume that this module has not been | |
174 deleted. */ | |
175 TRACE("(%p,%s,%p) - RETURN %d\n", wm, typeName[type], lpReserved, retv ); | |
176 | |
177 return retv; | |
178 } | |
179 | |
180 /************************************************************************* | |
181 * MODULE_DllProcessAttach | |
2069 | 182 * |
1 | 183 * Send the process attach notification to all DLLs the given module |
184 * depends on (recursively). This is somewhat complicated due to the fact that | |
185 * | |
186 * - we have to respect the module dependencies, i.e. modules implicitly | |
187 * referenced by another module have to be initialized before the module | |
188 * itself can be initialized | |
2069 | 189 * |
1 | 190 * - the initialization routine of a DLL can itself call LoadLibrary, |
191 * thereby introducing a whole new set of dependencies (even involving | |
192 * the 'old' modules) at any time during the whole process | |
193 * | |
194 * (Note that this routine can be recursively entered not only directly | |
195 * from itself, but also via LoadLibrary from one of the called initialization | |
196 * routines.) | |
197 * | |
198 * Furthermore, we need to rearrange the main WINE_MODREF list to allow | |
199 * the process *detach* notifications to be sent in the correct order. | |
2069 | 200 * This must not only take into account module dependencies, but also |
1 | 201 * 'hidden' dependencies created by modules calling LoadLibrary in their |
202 * attach notification routine. | |
203 * | |
204 * The strategy is rather simple: we move a WINE_MODREF to the head of the | |
205 * list after the attach notification has returned. This implies that the | |
206 * detach notifications are called in the reverse of the sequence the attach | |
207 * notifications *returned*. | |
208 * | |
209 * NOTE: Assumes that the process critical section is held! | |
210 * | |
211 */ | |
3465 | 212 static WIN_BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved ) |
1 | 213 { |
214 WIN_BOOL retv = TRUE; | |
215 int i; | |
216 assert( wm ); | |
217 | |
218 /* prevent infinite recursion in case of cyclical dependencies */ | |
219 if ( ( wm->flags & WINE_MODREF_MARKER ) | |
220 || ( wm->flags & WINE_MODREF_PROCESS_ATTACHED ) ) | |
221 return retv; | |
222 | |
223 TRACE("(%s,%p) - START\n", wm->modname, lpReserved ); | |
224 | |
225 /* Tag current MODREF to prevent recursive loop */ | |
226 wm->flags |= WINE_MODREF_MARKER; | |
227 | |
228 /* Recursively attach all DLLs this one depends on */ | |
229 /* for ( i = 0; retv && i < wm->nDeps; i++ ) | |
230 if ( wm->deps[i] ) | |
231 retv = MODULE_DllProcessAttach( wm->deps[i], lpReserved ); | |
232 */ | |
233 /* Call DLL entry point */ | |
234 | |
235 //local_wm=wm; | |
236 if(local_wm) | |
237 { | |
7386 | 238 local_wm->next = (modref_list*) malloc(sizeof(modref_list)); |
1 | 239 local_wm->next->prev=local_wm; |
240 local_wm->next->next=NULL; | |
241 local_wm->next->wm=wm; | |
242 local_wm=local_wm->next; | |
243 } | |
244 else | |
245 { | |
18878 | 246 local_wm = malloc(sizeof(modref_list)); |
1 | 247 local_wm->next=local_wm->prev=NULL; |
248 local_wm->wm=wm; | |
2069 | 249 } |
1 | 250 /* Remove recursion flag */ |
251 wm->flags &= ~WINE_MODREF_MARKER; | |
2069 | 252 |
1 | 253 if ( retv ) |
254 { | |
255 retv = MODULE_InitDll( wm, DLL_PROCESS_ATTACH, lpReserved ); | |
256 if ( retv ) | |
257 wm->flags |= WINE_MODREF_PROCESS_ATTACHED; | |
258 } | |
259 | |
260 | |
261 TRACE("(%s,%p) - END\n", wm->modname, lpReserved ); | |
262 | |
263 return retv; | |
264 } | |
265 | |
266 /************************************************************************* | |
267 * MODULE_DllProcessDetach | |
2069 | 268 * |
269 * Send DLL process detach notifications. See the comment about calling | |
1 | 270 * sequence at MODULE_DllProcessAttach. Unless the bForceDetach flag |
271 * is set, only DLLs with zero refcount are notified. | |
272 */ | |
3465 | 273 static void MODULE_DllProcessDetach( WINE_MODREF* wm, WIN_BOOL bForceDetach, LPVOID lpReserved ) |
1 | 274 { |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
275 // WINE_MODREF *wm=local_wm; |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
276 modref_list* l = local_wm; |
1 | 277 wm->flags &= ~WINE_MODREF_PROCESS_ATTACHED; |
278 MODULE_InitDll( wm, DLL_PROCESS_DETACH, lpReserved ); | |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
279 /* while (l) |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
280 { |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
281 modref_list* f = l; |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
282 l = l->next; |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
283 free(f); |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
284 } |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
285 local_wm = 0;*/ |
1 | 286 } |
287 | |
3465 | 288 /*********************************************************************** |
289 * MODULE_LoadLibraryExA (internal) | |
290 * | |
291 * Load a PE style module according to the load order. | |
292 * | |
293 * The HFILE parameter is not used and marked reserved in the SDK. I can | |
294 * only guess that it should force a file to be mapped, but I rather | |
295 * ignore the parameter because it would be extremely difficult to | |
296 * integrate this with different types of module represenations. | |
297 * | |
298 */ | |
299 static WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HFILE hfile, DWORD flags ) | |
300 { | |
301 DWORD err = GetLastError(); | |
302 WINE_MODREF *pwm; | |
303 int i; | |
304 // module_loadorder_t *plo; | |
305 | |
306 SetLastError( ERROR_FILE_NOT_FOUND ); | |
307 TRACE("Trying native dll '%s'\n", libname); | |
308 pwm = PE_LoadLibraryExA(libname, flags); | |
309 #ifdef HAVE_LIBDL | |
310 if(!pwm) | |
311 { | |
312 TRACE("Trying ELF dll '%s'\n", libname); | |
313 pwm=(WINE_MODREF*)ELFDLL_LoadLibraryExA(libname, flags); | |
314 } | |
315 #endif | |
316 // printf("0x%08x\n", pwm); | |
317 // break; | |
318 if(pwm) | |
319 { | |
320 /* Initialize DLL just loaded */ | |
321 TRACE("Loaded module '%s' at 0x%08x, \n", libname, pwm->module); | |
322 /* Set the refCount here so that an attach failure will */ | |
323 /* decrement the dependencies through the MODULE_FreeLibrary call. */ | |
324 pwm->refCount++; | |
325 | |
326 SetLastError( err ); /* restore last error */ | |
327 return pwm; | |
328 } | |
329 | |
330 | |
331 WARN("Failed to load module '%s'; error=0x%08lx, \n", libname, GetLastError()); | |
332 return NULL; | |
333 } | |
334 | |
335 /*********************************************************************** | |
336 * MODULE_FreeLibrary | |
337 * | |
338 * NOTE: Assumes that the process critical section is held! | |
339 */ | |
340 static WIN_BOOL MODULE_FreeLibrary( WINE_MODREF *wm ) | |
341 { | |
342 TRACE("(%s) - START\n", wm->modname ); | |
343 | |
344 /* Recursively decrement reference counts */ | |
345 //MODULE_DecRefCount( wm ); | |
346 | |
347 /* Call process detach notifications */ | |
348 MODULE_DllProcessDetach( wm, FALSE, NULL ); | |
349 | |
350 PE_UnloadLibrary(wm); | |
351 | |
352 TRACE("END\n"); | |
353 | |
354 return TRUE; | |
355 } | |
1 | 356 |
357 /*********************************************************************** | |
358 * LoadLibraryExA (KERNEL32) | |
359 */ | |
360 HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags) | |
361 { | |
2069 | 362 WINE_MODREF *wm = 0; |
363 char* listpath[] = { "", "", "/usr/lib/win32", "/usr/local/lib/win32", 0 }; | |
364 extern char* def_path; | |
365 char path[512]; | |
366 char checked[2000]; | |
367 int i = -1; | |
1 | 368 |
2069 | 369 checked[0] = 0; |
1 | 370 if(!libname) |
371 { | |
372 SetLastError(ERROR_INVALID_PARAMETER); | |
373 return 0; | |
374 } | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
375 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
376 wm=MODULE_FindModule(libname); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
377 if(wm) return wm->module; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
378 |
3465 | 379 // if(fs_installed==0) |
380 // install_fs(); | |
2069 | 381 |
382 while (wm == 0 && listpath[++i]) | |
383 { | |
384 if (i < 2) | |
385 { | |
386 if (i == 0) | |
387 /* check just original file name */ | |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
388 strncpy(path, libname, 511); |
2069 | 389 else |
390 /* check default user path */ | |
391 strncpy(path, def_path, 300); | |
392 } | |
393 else if (strcmp(def_path, listpath[i])) | |
394 /* path from the list */ | |
395 strncpy(path, listpath[i], 300); | |
396 else | |
397 continue; | |
1 | 398 |
2069 | 399 if (i > 0) |
400 { | |
401 strcat(path, "/"); | |
402 strncat(path, libname, 100); | |
403 } | |
404 path[511] = 0; | |
405 wm = MODULE_LoadLibraryExA( path, hfile, flags ); | |
406 | |
407 if (!wm) | |
408 { | |
409 if (checked[0]) | |
410 strcat(checked, ", "); | |
411 strcat(checked, path); | |
412 checked[1500] = 0; | |
413 | |
414 } | |
415 } | |
1 | 416 if ( wm ) |
417 { | |
418 if ( !MODULE_DllProcessAttach( wm, NULL ) ) | |
419 { | |
420 WARN_(module)("Attach failed for module '%s', \n", libname); | |
421 MODULE_FreeLibrary(wm); | |
422 SetLastError(ERROR_DLL_INIT_FAILED); | |
423 MODULE_RemoveFromList(wm); | |
424 wm = NULL; | |
425 } | |
426 } | |
427 | |
2069 | 428 if (!wm) |
429 printf("Win32 LoadLibrary failed to load: %s\n", checked); | |
7386 | 430 |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
431 #define RVA(x) ((char *)wm->module+(unsigned int)(x)) |
13621
8c6b747eeacf
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
alex
parents:
13182
diff
changeset
|
432 if (strstr(libname,"vp31vfw.dll") && wm) |
8c6b747eeacf
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
alex
parents:
13182
diff
changeset
|
433 { |
8c6b747eeacf
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
alex
parents:
13182
diff
changeset
|
434 int i; |
8c6b747eeacf
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
alex
parents:
13182
diff
changeset
|
435 |
8c6b747eeacf
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
alex
parents:
13182
diff
changeset
|
436 // sse hack moved from patch dll into runtime patching |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
437 if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x1000)) { |
13621
8c6b747eeacf
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
alex
parents:
13182
diff
changeset
|
438 fprintf(stderr, "VP3 DLL found\n"); |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
439 for (i=0;i<18;i++) RVA(0x4bd6)[i]=0x90; |
13621
8c6b747eeacf
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
alex
parents:
13182
diff
changeset
|
440 } |
8c6b747eeacf
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
alex
parents:
13182
diff
changeset
|
441 } |
8c6b747eeacf
runtime patching vp31vfw.dll, so non-patched dlls can be used aswell. note: this does not breaks if the dll is already patched
alex
parents:
13182
diff
changeset
|
442 |
12042 | 443 // remove a few divs in the VP codecs that make trouble |
444 if (strstr(libname,"vp5vfw.dll") && wm) | |
445 { | |
446 int i; | |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
447 if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x3930)) { |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
448 for (i=0;i<3;i++) RVA(0x4e86)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
449 for (i=0;i<3;i++) RVA(0x5a23)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
450 for (i=0;i<3;i++) RVA(0x5bff)[i]=0x90; |
12042 | 451 } else { |
452 fprintf(stderr, "Unsupported VP5 version\n"); | |
453 return 0; | |
454 } | |
455 } | |
456 | |
457 if (strstr(libname,"vp6vfw.dll") && wm) | |
458 { | |
459 int i; | |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
460 if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x3ef0)) { |
12042 | 461 // looks like VP 6.1.0.2 |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
462 for (i=0;i<6;i++) RVA(0x7268)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
463 for (i=0;i<6;i++) RVA(0x7e83)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
464 for (i=0;i<6;i++) RVA(0x806a)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
465 } else if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x4120)) { |
12042 | 466 // looks like VP 6.2.0.10 |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
467 for (i=0;i<6;i++) RVA(0x7688)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
468 for (i=0;i<6;i++) RVA(0x82c3)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
469 for (i=0;i<6;i++) RVA(0x84aa)[i]=0x90; |
18628
ff4455b0bd7c
Nop some instructions causing the vfwvp6 dll encoder to crash.
banan
parents:
18617
diff
changeset
|
470 for (i=0;i<6;i++) RVA(0x1d2cc)[i]=0x90; |
ff4455b0bd7c
Nop some instructions causing the vfwvp6 dll encoder to crash.
banan
parents:
18617
diff
changeset
|
471 for (i=0;i<6;i++) RVA(0x2179d)[i]=0x90; |
ff4455b0bd7c
Nop some instructions causing the vfwvp6 dll encoder to crash.
banan
parents:
18617
diff
changeset
|
472 for (i=0;i<6;i++) RVA(0x1977f)[i]=0x90; |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
473 } else if (PE_FindExportedFunction(wm, "DriverProc", TRUE)==RVA(0x3e70)) { |
12422 | 474 // looks like VP 6.0.7.3 |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
475 for (i=0;i<6;i++) RVA(0x7559)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
476 for (i=0;i<6;i++) RVA(0x81c3)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
477 for (i=0;i<6;i++) RVA(0x839e)[i]=0x90; |
12042 | 478 } else { |
479 fprintf(stderr, "Unsupported VP6 version\n"); | |
480 return 0; | |
481 } | |
482 } | |
483 | |
13745
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
484 // Windows Media Video 9 Advanced |
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
485 if (strstr(libname,"wmvadvd.dll") && wm) |
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
486 { |
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
487 // The codec calls IsRectEmpty with coords 0,0,0,0 => result is 0 |
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
488 // but it really wants the rectangle to be not empty |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
489 if (PE_FindExportedFunction(wm, "CreateInstance", TRUE)==RVA(0xb812)) { |
13745
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
490 // Dll version is 10.0.0.3645 |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
491 *RVA(0x8b0f)=0xeb; // Jump always, ignoring IsRectEmpty result |
13745
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
492 } else { |
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
493 fprintf(stderr, "Unsupported WMVA version\n"); |
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
494 return 0; |
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
495 } |
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
496 } |
3db10035d297
Windows media video advanced profile (wmva) support via binary codec
rtognimp
parents:
13622
diff
changeset
|
497 |
8318
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
498 if (strstr(libname,"QuickTime.qts") && wm) |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
499 { |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
500 void** ptr; |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
501 void *dispatch_addr; |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
502 int i; |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
503 |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
504 // dispatch_addr = GetProcAddress(wm->module, "theQuickTimeDispatcher", TRUE); |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
505 dispatch_addr = PE_FindExportedFunction(wm, "theQuickTimeDispatcher", TRUE); |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
506 if (dispatch_addr == RVA(0x124c30)) |
8318
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
507 { |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
508 fprintf(stderr, "QuickTime5 DLLs found\n"); |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
509 ptr = (void **)RVA(0x375ca4); // dispatch_ptr |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
510 for (i=0;i<5;i++) RVA(0x19e842)[i]=0x90; // make_new_region ? |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
511 for (i=0;i<28;i++) RVA(0x19e86d)[i]=0x90; // call__call_CreateCompatibleDC ? |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
512 for (i=0;i<5;i++) RVA(0x19e898)[i]=0x90; // jmp_to_call_loadbitmap ? |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
513 for (i=0;i<9;i++) RVA(0x19e8ac)[i]=0x90; // call__calls_OLE_shit ? |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
514 for (i=0;i<106;i++) RVA(0x261b10)[i]=0x90; // disable threads |
8318
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
515 #if 0 |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
516 /* CreateThread callers */ |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
517 for (i=0;i<5;i++) RVA(0x1487c5)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
518 for (i=0;i<5;i++) RVA(0x14b275)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
519 for (i=0;i<5;i++) RVA(0x1a24b1)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
520 for (i=0;i<5;i++) RVA(0x1afc5a)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
521 for (i=0;i<5;i++) RVA(0x2f799c)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
522 for (i=0;i<5;i++) RVA(0x2f7efe)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
523 for (i=0;i<5;i++) RVA(0x2fa33e)[i]=0x90; |
8318
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
524 #endif |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
525 |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
526 #if 0 |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
527 /* TerminateQTML fix */ |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
528 for (i=0;i<47;i++) RVA(0x2fa3b8)[i]=0x90; // terminate thread |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
529 for (i=0;i<47;i++) RVA(0x2f7f78)[i]=0x90; // terminate thread |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
530 for (i=0;i<77;i++) RVA(0x1a13d5)[i]=0x90; |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
531 RVA(0x08e0ae)[0] = 0xc3; // font/dc remover |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
532 for (i=0;i<24;i++) RVA(0x07a1ad)[i]=0x90; // destroy window |
8318
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
533 #endif |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
534 } else if (dispatch_addr == RVA(0x13b330)) |
8318
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
535 { |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
536 fprintf(stderr, "QuickTime6 DLLs found\n"); |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
537 ptr = (void **)RVA(0x3b9524); // dispatcher_ptr |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
538 for (i=0;i<5;i++) RVA(0x2730cc)[i]=0x90; // make_new_region |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
539 for (i=0;i<28;i++) RVA(0x2730f7)[i]=0x90; // call__call_CreateCompatibleDC |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
540 for (i=0;i<5;i++) RVA(0x273122)[i]=0x90; // jmp_to_call_loadbitmap |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
541 for (i=0;i<9;i++) RVA(0x273131)[i]=0x90; // call__calls_OLE_shit |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
542 for (i=0;i<96;i++) RVA(0x2ac852)[i]=0x90; // disable threads |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
543 } else if (dispatch_addr == RVA(0x13c3e0)) |
10795
2ab9ab4f07b4
Support for QuickTime6.3 DLLs. Patch by Dima K. <dimakar@yahoo.com>
mosu
parents:
8451
diff
changeset
|
544 { |
2ab9ab4f07b4
Support for QuickTime6.3 DLLs. Patch by Dima K. <dimakar@yahoo.com>
mosu
parents:
8451
diff
changeset
|
545 fprintf(stderr, "QuickTime6.3 DLLs found\n"); |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
546 ptr = (void **)RVA(0x3ca01c); // dispatcher_ptr |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
547 for (i=0;i<5;i++) RVA(0x268f6c)[i]=0x90; // make_new_region |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
548 for (i=0;i<28;i++) RVA(0x268f97)[i]=0x90; // call__call_CreateCompatibleDC |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
549 for (i=0;i<5;i++) RVA(0x268fc2)[i]=0x90; // jmp_to_call_loadbitmap |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
550 for (i=0;i<9;i++) RVA(0x268fd1)[i]=0x90; // call__calls_OLE_shit |
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
551 for (i=0;i<96;i++) RVA(0x2b4722)[i]=0x90; // disable threads |
8318
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
552 } else |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
553 { |
8451 | 554 fprintf(stderr, "Unsupported QuickTime version (%p)\n", |
8318
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
555 dispatch_addr); |
8451 | 556 return 0; |
8318
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
557 } |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
558 |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
559 fprintf(stderr,"QuickTime.qts patched!!! old entry=%p\n",ptr[0]); |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
560 |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
561 #ifdef EMU_QTX_API |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
562 report_entry = report_func; |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
563 report_ret = report_func_ret; |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
564 wrapper_target=ptr[0]; |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
565 ptr[0]=wrapper; |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
566 #endif |
1ed329d61051
both qt5 and qt6 patching support (qt6 addresses found by arpi)
alex
parents:
8286
diff
changeset
|
567 } |
18617
8a1439ab0d51
Fix runtime-patching code to take into account the address when the codec is loaded.
reimar
parents:
15166
diff
changeset
|
568 #undef RVA |
2069 | 569 |
1 | 570 return wm ? wm->module : 0; |
571 } | |
572 | |
573 | |
574 /*********************************************************************** | |
575 * LoadLibraryA (KERNEL32) | |
576 */ | |
577 HMODULE WINAPI LoadLibraryA(LPCSTR libname) { | |
578 return LoadLibraryExA(libname,0,0); | |
579 } | |
580 | |
581 /*********************************************************************** | |
582 * FreeLibrary | |
583 */ | |
584 WIN_BOOL WINAPI FreeLibrary(HINSTANCE hLibModule) | |
585 { | |
586 WIN_BOOL retv = FALSE; | |
587 WINE_MODREF *wm; | |
588 | |
589 wm=MODULE32_LookupHMODULE(hLibModule); | |
590 | |
591 if ( !wm || !hLibModule ) | |
592 { | |
593 SetLastError( ERROR_INVALID_HANDLE ); | |
594 return 0; | |
2069 | 595 } |
1 | 596 else |
597 retv = MODULE_FreeLibrary( wm ); | |
2069 | 598 |
1 | 599 MODULE_RemoveFromList(wm); |
600 | |
128 | 601 /* garbage... */ |
602 if (local_wm == NULL) my_garbagecollection(); | |
603 | |
1 | 604 return retv; |
605 } | |
606 | |
607 /*********************************************************************** | |
608 * MODULE_DecRefCount | |
609 * | |
610 * NOTE: Assumes that the process critical section is held! | |
611 */ | |
612 static void MODULE_DecRefCount( WINE_MODREF *wm ) | |
613 { | |
614 int i; | |
615 | |
616 if ( wm->flags & WINE_MODREF_MARKER ) | |
617 return; | |
618 | |
619 if ( wm->refCount <= 0 ) | |
620 return; | |
621 | |
622 --wm->refCount; | |
623 TRACE("(%s) refCount: %d\n", wm->modname, wm->refCount ); | |
624 | |
625 if ( wm->refCount == 0 ) | |
626 { | |
627 wm->flags |= WINE_MODREF_MARKER; | |
628 | |
629 for ( i = 0; i < wm->nDeps; i++ ) | |
630 if ( wm->deps[i] ) | |
631 MODULE_DecRefCount( wm->deps[i] ); | |
632 | |
633 wm->flags &= ~WINE_MODREF_MARKER; | |
634 } | |
635 } | |
636 | |
637 /*********************************************************************** | |
638 * GetProcAddress (KERNEL32.257) | |
639 */ | |
640 FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function ) | |
641 { | |
642 return MODULE_GetProcAddress( hModule, function, TRUE ); | |
643 } | |
644 | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
645 #ifdef DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
646 |
13622 | 647 /* |
648 http://lists.apple.com/archives/quicktime-api/2003/Jan/msg00278.html | |
649 */ | |
650 | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
651 struct ComponentParameters { |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
652 unsigned char flags; /* call modifiers: sync/async, deferred, immed, etc */ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
653 unsigned char paramSize; /* size in bytes of actual parameters passed to this call */ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
654 short what; /* routine selector, negative for Component management calls */ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
655 long params[1]; /* actual parameters for the indicated routine */ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
656 }; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
657 typedef struct ComponentParameters ComponentParameters; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
658 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
659 static char* component_func(int what){ |
13622 | 660 if (what < 0) // Range 0: Standard Component Calls |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
661 switch(what){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
662 case -1: return "kComponentOpenSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
663 case -2: return "kComponentCloseSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
664 case -3: return "kComponentCanDoSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
665 case -4: return "kComponentVersionSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
666 case -5: return "kComponentRegisterSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
667 case -6: return "kComponentTargetSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
668 case -7: return "kComponentUnregisterSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
669 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
670 |
13622 | 671 if (what >= 0 && what <= 0xff) // Range 1: Generic codecs |
672 switch(what & 0xff){ | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
673 case 0: return "kImageCodecGetCodecInfoSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
674 case 1: return "kImageCodecGetCompressionTimeSelect"; |
13622 | 675 case 2: return "kImageCodecGetMaxCompressionSizeSelect"; |
676 case 3: return "kImageCodecPreCompressSelect"; | |
677 case 4: return "kImageCodecBandCompressSelect"; | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
678 case 5: return "kImageCodecPreDecompressSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
679 case 6: return "kImageCodecBandDecompressSelect"; |
13622 | 680 case 7: return "kImageCodecBusySelect"; |
681 // finish this list from the above URL | |
682 case 0x10: return "kImageCodecIsImageDescriptionEquivalentSelect"; | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
683 case 0x12: return "kImageCodecDisposeMemorySelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
684 case 0x14: return "kImageCodecNewImageBufferMemorySelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
685 case 0x28: return "kImageCodecRequestGammaLevelSelect"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
686 } |
13622 | 687 |
688 //if (what >= 0x100 && what <= 0x1ff) // Range 2: Specific to QT Photo JPEG codecs | |
689 | |
690 if (what >= 0x200 && what <= 0x2ff) // Range 3: Base Decompressor | |
691 switch(what & 0xff){ | |
692 case 0: return "Preflight"; | |
693 case 1: return "Initialize"; | |
694 case 2: return "BeginBand"; | |
695 case 3: return "DrawBand"; | |
696 case 4: return "EndBand"; | |
697 case 5: return "QueueStarting"; | |
698 case 6: return "QueueStopping"; | |
699 } | |
700 | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
701 return "???"; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
702 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
703 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
704 static int c_level=0; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
705 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
706 static int dump_component(char* name,int type,void* _orig, ComponentParameters *params,void** glob){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
707 int ( *orig)(ComponentParameters *params, void** glob) = _orig; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
708 int ret,i; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
709 |
13622 | 710 fprintf(stderr,"%*sComponentCall: %s flags=0x%X size=%d what=0x%X %s\n",3*c_level,"",name,params->flags, params->paramSize, params->what, component_func(params->what)); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
711 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
712 for(i=0;i<params->paramSize/4;i++) |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
713 fprintf(stderr,"%*s param[%d] = 0x%X\n",3*c_level,"",i,params->params[i]); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
714 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
715 ++c_level; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
716 ret=orig(params,glob); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
717 --c_level; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
718 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
719 if(ret>=0x1000) |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
720 fprintf(stderr,"%*s return=0x%X\n",3*c_level,"",ret); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
721 else |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
722 fprintf(stderr,"%*s return=%d\n",3*c_level,"",ret); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
723 return ret; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
724 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
725 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
726 #define DECL_COMPONENT(sname,name,type) \ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
727 static void* real_ ## sname = NULL; \ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
728 static int fake_ ## sname(ComponentParameters *params,void** glob){ \ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
729 return dump_component(name,type,real_ ## sname, params, glob); \ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
730 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
731 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
732 #include "qt_comp.h" |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
733 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
734 #undef DECL_COMPONENT |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
735 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
736 #include "qt_fv.h" |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
737 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
738 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
739 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
740 #ifdef EMU_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
741 |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
742 static uint32_t ret_array[4096]; |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
743 static int ret_i=0; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
744 |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
745 static int report_func(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
746 { |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
747 #ifdef DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
748 int i; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
749 int* dptr; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
750 void* pwrapper=NULL; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
751 void* pptr=NULL; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
752 char* pname=NULL; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
753 int plen=-1; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
754 // find the code: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
755 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
756 dptr=0x62b67ae0;dptr+=2*((reg->eax>>16)&255); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
757 // printf("FUNC: flag=%d ptr=%p\n",dptr[0],dptr[1]); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
758 if(dptr[0]&255){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
759 dptr=dptr[1];dptr+=4*(reg->eax&65535); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
760 // printf("FUNC: ptr2=%p eax=%p edx=%p\n",dptr[1],dptr[0],dptr[2]); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
761 pwrapper=dptr[1]; pptr=dptr[0]; plen=dptr[2]; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
762 } else { |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
763 pwrapper=0x62924910; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
764 switch(dptr[1]){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
765 case 0x629248d0: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
766 dptr=0x62b672c0;dptr+=2*(reg->eax&65535); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
767 // printf("FUNC: ptr2=%p eax=%p edx=%p\n",0x62924910,dptr[0],dptr[1]); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
768 pptr=dptr[0]; plen=dptr[1]; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
769 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
770 case 0x62924e40: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
771 dptr=0x62b67c70;dptr+=2*(reg->eax&65535); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
772 // printf("FUNC: ptr2=%p eax=%p edx=%p\n",0x62924910,dptr[0],dptr[1]); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
773 pptr=dptr[0]; plen=dptr[1]; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
774 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
775 case 0x62924e60: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
776 dptr=0x62b68108;if(reg->eax&0x8000) dptr+=2*(reg->eax|0xffff0000); else dptr+=2*(reg->eax&65535); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
777 // printf("FUNC: ptr2=%p eax=%p edx=%p\n",0x62924910,dptr[0],dptr[1]); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
778 pptr=dptr[0]; plen=dptr[1]; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
779 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
780 case 0x62924e80: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
781 dptr=0x62b68108;if(reg->eax&0x8000) dptr+=2*(reg->eax|0xffff0000); else dptr+=2*(reg->eax&65535); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
782 // printf("FUNC: ptr2=%p eax=%p edx=%p\n",0x62924910,dptr[0],dptr[1]); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
783 pptr=dptr[0]; plen=dptr[1]; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
784 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
785 default: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
786 printf("FUNC: unknown ptr & psize!\n"); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
787 pwrapper=dptr[1]; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
788 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
789 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
790 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
791 for(i=0;qt_fv_list[i].name;i++){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
792 if(qt_fv_list[i].id==reg->eax){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
793 pname=qt_fv_list[i].name; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
794 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
795 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
796 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
797 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
798 printf("FUNC[%X/%s]: wrapper=%p func=%p len=%d\n",reg->eax, |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
799 pname?pname:"???",pwrapper,pptr,plen); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
800 |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
801 printf("FUNC: caller=%p ebx=%p\n",((uint32_t *)stack_base)[0],reg->ebx); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
802 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
803 if(pname) |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
804 printf("%*sENTER(%d): %s(",ret_i*2,"",ret_i,pname); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
805 else |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
806 printf("%*sENTER(%d): %X(",ret_i*2,"",ret_i,reg->eax); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
807 for (i=0;i<plen/4;i++){ |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
808 unsigned int val=((uint32_t *)stack_base)[1+i]; |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
809 unsigned char* fcc=&val; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
810 printf("%s0x%X", i?", ":"",val); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
811 if(fcc[0]>=0x20 && fcc[0]<128 && |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
812 fcc[1]>=0x20 && fcc[1]<128 && |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
813 fcc[2]>=0x20 && fcc[2]<128 && |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
814 fcc[3]>=0x20 && fcc[3]<128) printf("='%c%c%c%c'",fcc[3],fcc[2],fcc[1],fcc[0]); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
815 else if(val>=8 && val<65536) printf("=%d",val); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
816 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
817 printf(")\n"); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
818 fflush(stdout); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
819 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
820 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
821 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
822 #if 1 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
823 // emulate some functions: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
824 switch(reg->eax){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
825 // memory management: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
826 case 0x150011: //NewPtrClear |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
827 case 0x150012: //NewPtrSysClear |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
828 reg->eax=(uint32_t)malloc(((uint32_t *)stack_base)[1]); |
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
829 memset((void *)reg->eax,0,((uint32_t *)stack_base)[1]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
830 #ifdef DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
831 printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
832 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
833 return 1; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
834 case 0x15000F: //NewPtr |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
835 case 0x150010: //NewPtrSys |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
836 reg->eax=(uint32_t)malloc(((uint32_t *)stack_base)[1]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
837 #ifdef DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
838 printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
839 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
840 return 1; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
841 case 0x15002f: //DisposePtr |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
842 if(((uint32_t *)stack_base)[1]>=0x60000000) |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
843 printf("WARNING! Invalid Ptr handle!\n"); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
844 else |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
845 free((void *)((uint32_t *)stack_base)[1]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
846 reg->eax=0; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
847 #ifdef DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
848 printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
849 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
850 return 1; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
851 // mutexes: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
852 case 0x1d0033: //QTMLCreateMutex |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
853 reg->eax=0xdeadbabe; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
854 #ifdef DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
855 printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
856 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
857 return 1; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
858 case 0x1d0034: //QTMLDestroyMutex |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
859 case 0x1d0035: //QTMLGrabMutex |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
860 case 0x1d0036: //QTMLReturnMutex |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
861 case 0x1d003d: //QTMLTryGrabMutex |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
862 reg->eax=0; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
863 #ifdef DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
864 printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
865 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
866 return 1; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
867 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
868 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
869 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
870 #if 0 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
871 switch(reg->eax){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
872 // case 0x00010000: |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
873 // printf("FUNC: ImageCodecInitialize/ImageCodecGetCodecInfo(ci=%p,&icap=%p)\n",((uint32_t *)stack_base)[1],((uint32_t *)stack_base)[4]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
874 // break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
875 case 0x00010003: |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
876 printf("FUNC: CountComponents(&desc=%p)\n",((uint32_t *)stack_base)[1]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
877 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
878 case 0x00010004: |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
879 printf("FUNC: FindNextComponent(prev=%p,&desc=%p)\n",((uint32_t *)stack_base)[1],((uint32_t *)stack_base)[2]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
880 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
881 case 0x00010007: |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
882 printf("FUNC: OpenComponent(prev=%p)\n",((uint32_t *)stack_base)[1]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
883 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
884 case 0x0003008b: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
885 printf("FUNC: QTNewGWorldFromPtr(&pts=%p,fourcc=%.4s,&rect=%p,x1=%p,x2=%p,x3=%p,plane=%p,stride=%d)\n", |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
886 ((uint32_t *)stack_base)[1], |
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
887 &(((uint32_t *)stack_base)[2]), |
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
888 ((uint32_t *)stack_base)[3], |
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
889 ((uint32_t *)stack_base)[4], |
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
890 ((uint32_t *)stack_base)[5], |
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
891 ((uint32_t *)stack_base)[6], |
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
892 ((uint32_t *)stack_base)[7], |
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
893 ((uint32_t *)stack_base)[8]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
894 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
895 case 0x001c0018: |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
896 printf("FUNC: GetGWorldPixMap(gworld=%p)\n",((uint32_t *)stack_base)[1]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
897 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
898 case 0x00110001: |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
899 printf("FUNC: Gestalt(fourcc=%.4s, &ret=%p)\n",&(((uint32_t *)stack_base)[1]),((uint32_t *)stack_base)[2]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
900 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
901 default: { |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
902 int i; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
903 for(i=0;qt_fv_list[i].name;i++){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
904 if(qt_fv_list[i].id==reg->eax){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
905 printf("FUNC: %s\n",qt_fv_list[i].name); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
906 break; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
907 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
908 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
909 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
910 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
911 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
912 // print stack/reg information |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
913 printf("ENTER(%d) stack = %d bytes @ %p\n" |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
914 "eax = 0x%08x edx = 0x%08x ebx = 0x%08x ecx = 0x%08x\n" |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
915 "esp = 0x%08x ebp = 0x%08x esi = 0x%08x edi = 0x%08x\n" |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
916 "flags = 0x%08x\n", ret_i, |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
917 stack_size, stack_base, |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
918 reg->eax, reg->edx, reg->ebx, reg->ecx, |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
919 reg->esp, reg->ebp, reg->esi, reg->edi, |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
920 *flags); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
921 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
922 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
923 // save ret addr: |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
924 ret_array[ret_i]=((uint32_t *)stack_base)[0]; |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
925 ++ret_i; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
926 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
927 #if 0 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
928 // print first 7 longs in the stack (return address, arg[1], arg[2] ... ) |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
929 printf("stack[] = { "); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
930 for (i=0;i<7;i++) { |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
931 printf("%08x ", ((uint32_t *)stack_base)[i]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
932 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
933 printf("}\n\n"); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
934 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
935 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
936 // // mess with function parameters |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
937 // ((uint32_t *)stack_base)[1] = 0x66554433; |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
938 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
939 // // mess with return address... |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
940 // reg->eax = 0x11223344; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
941 return 0; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
942 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
943 |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
944 static int report_func_ret(void *stack_base, int stack_size, reg386_t *reg, uint32_t *flags) |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
945 { |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
946 int i; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
947 short err; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
948 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
949 // restore ret addr: |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
950 --ret_i; |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
951 ((uint32_t *)stack_base)[0]=ret_array[ret_i]; |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
952 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
953 #ifdef DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
954 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
955 #if 1 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
956 printf("%*sLEAVE(%d): 0x%X",ret_i*2,"",ret_i, reg->eax); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
957 err=reg->eax; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
958 if(err && (reg->eax>>16)==0) printf(" = %d",err); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
959 printf("\n"); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
960 fflush(stdout); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
961 #else |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
962 // print stack/reg information |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
963 printf("LEAVE(%d) stack = %d bytes @ %p\n" |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
964 "eax = 0x%08x edx = 0x%08x ebx = 0x%08x ecx = 0x%08x\n" |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
965 "esp = 0x%08x ebp = 0x%08x esi = 0x%08x edi = 0x%08x\n" |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
966 "flags = 0x%08x\n", ret_i, |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
967 stack_size, stack_base, |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
968 reg->eax, reg->edx, reg->ebx, reg->ecx, |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
969 reg->esp, reg->ebp, reg->esi, reg->edi, |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
970 *flags); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
971 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
972 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
973 #if 0 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
974 // print first 7 longs in the stack (return address, arg[1], arg[2] ... ) |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
975 printf("stack[] = { "); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
976 for (i=0;i<7;i++) { |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
977 printf("%08x ", ((uint32_t *)stack_base)[i]); |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
978 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
979 printf("}\n\n"); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
980 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
981 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
982 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
983 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
984 // // mess with function parameters |
11868
711e584107af
switch to inttypes.h (u_int32_t vs uint32_t) in favour of Solaris9/x86 support
alex
parents:
10795
diff
changeset
|
985 // ((uint32_t *)stack_base)[1] = 0x66554433; |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
986 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
987 // // mess with return address... |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
988 // reg->eax = 0x11223344; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
989 return 0; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
990 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
991 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
992 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
993 |
1 | 994 /*********************************************************************** |
995 * MODULE_GetProcAddress (internal) | |
996 */ | |
2069 | 997 FARPROC MODULE_GetProcAddress( |
1 | 998 HMODULE hModule, /* [in] current module handle */ |
999 LPCSTR function, /* [in] function to be looked up */ | |
1000 WIN_BOOL snoop ) | |
1001 { | |
1002 WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); | |
2069 | 1003 // WINE_MODREF *wm=local_wm; |
1 | 1004 FARPROC retproc; |
1005 | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1006 #ifdef DEBUG_QTX_API |
1 | 1007 if (HIWORD(function)) |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1008 fprintf(stderr,"XXX GetProcAddress(%08lx,%s)\n",(DWORD)hModule,function); |
1 | 1009 else |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1010 fprintf(stderr,"XXX GetProcAddress(%08lx,%p)\n",(DWORD)hModule,function); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1011 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1012 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1013 // TRACE_(win32)("(%08lx,%s)\n",(DWORD)hModule,function); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1014 // else |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1015 // TRACE_(win32)("(%08lx,%p)\n",(DWORD)hModule,function); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1016 |
1 | 1017 if (!wm) { |
1018 SetLastError(ERROR_INVALID_HANDLE); | |
1019 return (FARPROC)0; | |
1020 } | |
1021 switch (wm->type) | |
1022 { | |
1023 case MODULE32_PE: | |
1024 retproc = PE_FindExportedFunction( wm, function, snoop ); | |
1025 if (!retproc) SetLastError(ERROR_PROC_NOT_FOUND); | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1026 break; |
2069 | 1027 #ifdef HAVE_LIBDL |
1 | 1028 case MODULE32_ELF: |
2069 | 1029 retproc = (FARPROC) dlsym( (void*) wm->module, function); |
1 | 1030 if (!retproc) SetLastError(ERROR_PROC_NOT_FOUND); |
1031 return retproc; | |
1032 #endif | |
1033 default: | |
1034 ERR("wine_modref type %d not handled.\n",wm->type); | |
1035 SetLastError(ERROR_INVALID_HANDLE); | |
1036 return (FARPROC)0; | |
1037 } | |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1038 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1039 #ifdef EMU_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1040 if (HIWORD(function) && retproc){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1041 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1042 #ifdef DEBUG_QTX_API |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1043 #define DECL_COMPONENT(sname,name,type) \ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1044 if(!strcmp(function,name)){ \ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1045 fprintf(stderr,name "dispatcher catched -> %p\n",retproc); \ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1046 real_ ## sname = retproc; retproc = fake_ ## sname; \ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1047 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1048 #include "qt_comp.h" |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1049 #undef DECL_COMPONENT |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1050 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1051 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1052 if(!strcmp(function,"theQuickTimeDispatcher") |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1053 // || !strcmp(function,"_CallComponentFunctionWithStorage") |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1054 // || !strcmp(function,"_CallComponent") |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1055 ){ |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1056 fprintf(stderr,"theQuickTimeDispatcher catched -> %p\n",retproc); |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1057 report_entry = report_func; |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1058 report_ret = report_func_ret; |
13182 | 1059 wrapper_target=(void(*)(void))retproc; |
8451 | 1060 retproc=(FARPROC)wrapper; |
8269
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1061 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1062 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1063 } |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1064 #endif |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1065 |
8b905703a450
- qtx (quicktime's macos emulation layer) debugging/emulation environment :)
arpi
parents:
7386
diff
changeset
|
1066 return retproc; |
1 | 1067 } |
1068 | |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1069 static int acounter = 0; |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1070 void CodecAlloc(void) |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1071 { |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1072 acounter++; |
3465 | 1073 //printf("**************CODEC ALLOC %d\n", acounter); |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1074 } |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1075 |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1076 void CodecRelease(void) |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1077 { |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1078 acounter--; |
3465 | 1079 //printf("**************CODEC RELEASE %d\n", acounter); |
2651
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1080 if (acounter == 0) |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1081 { |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1082 for (;;) |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1083 { |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1084 modref_list* list = local_wm; |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1085 if (!local_wm) |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1086 break; |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1087 //printf("CODECRELEASE %p\n", list); |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1088 MODULE_FreeLibrary(list->wm); |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1089 MODULE_RemoveFromList(list->wm); |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1090 if (local_wm == NULL) |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1091 my_garbagecollection(); |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1092 } |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1093 } |
958d10763c34
partially synced with avifile... (TODO: migrate to new registry.c and driver.c)
arpi
parents:
2069
diff
changeset
|
1094 } |