diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-12 16:33:00 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-12 16:33:00 +0000 |
commit | 90717623aad02545dae99d047c83878bf8878d23 (patch) | |
tree | f2b362e32a9d9d27018a1f26b568a374e5287b5a | |
parent | bf45cf730f97e9cc2bd827fcdc2d2301f7da489e (diff) |
better component_func
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13623 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | loader/module.c | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/loader/module.c b/loader/module.c index 206fb7435a..9e7bc1c3c5 100644 --- a/loader/module.c +++ b/loader/module.c @@ -619,6 +619,10 @@ FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function ) #ifdef DEBUG_QTX_API +/* +http://lists.apple.com/archives/quicktime-api/2003/Jan/msg00278.html +*/ + struct ComponentParameters { unsigned char flags; /* call modifiers: sync/async, deferred, immed, etc */ unsigned char paramSize; /* size in bytes of actual parameters passed to this call */ @@ -628,6 +632,7 @@ struct ComponentParameters { typedef struct ComponentParameters ComponentParameters; static char* component_func(int what){ +if (what < 0) // Range 0: Standard Component Calls switch(what){ case -1: return "kComponentOpenSelect"; case -2: return "kComponentCloseSelect"; @@ -637,23 +642,39 @@ case -5: return "kComponentRegisterSelect"; case -6: return "kComponentTargetSelect"; case -7: return "kComponentUnregisterSelect"; } -return "???"; -} -static char* component_func_type(int type,int what){ -if(type==1) switch(what){ +if (what >= 0 && what <= 0xff) // Range 1: Generic codecs +switch(what & 0xff){ case 0: return "kImageCodecGetCodecInfoSelect"; case 1: return "kImageCodecGetCompressionTimeSelect"; +case 2: return "kImageCodecGetMaxCompressionSizeSelect"; +case 3: return "kImageCodecPreCompressSelect"; +case 4: return "kImageCodecBandCompressSelect"; case 5: return "kImageCodecPreDecompressSelect"; case 6: return "kImageCodecBandDecompressSelect"; -case 0x12: return "kImageCodecDisposeMemorySelect"; +case 7: return "kImageCodecBusySelect"; +// finish this list from the above URL case 0x10: return "kImageCodecIsImageDescriptionEquivalentSelect"; +case 0x12: return "kImageCodecDisposeMemorySelect"; case 0x14: return "kImageCodecNewImageBufferMemorySelect"; case 0x28: return "kImageCodecRequestGammaLevelSelect"; } -return "???"; + +//if (what >= 0x100 && what <= 0x1ff) // Range 2: Specific to QT Photo JPEG codecs + +if (what >= 0x200 && what <= 0x2ff) // Range 3: Base Decompressor +switch(what & 0xff){ +case 0: return "Preflight"; +case 1: return "Initialize"; +case 2: return "BeginBand"; +case 3: return "DrawBand"; +case 4: return "EndBand"; +case 5: return "QueueStarting"; +case 6: return "QueueStopping"; } +return "???"; +} static int c_level=0; @@ -661,10 +682,7 @@ static int dump_component(char* name,int type,void* _orig, ComponentParameters * int ( *orig)(ComponentParameters *params, void** glob) = _orig; int ret,i; - if(params->what<0) - fprintf(stderr,"%*sComponentCall: %s flags=0x%X size=%d what=%d %s\n",3*c_level,"",name,params->flags, params->paramSize, params->what, component_func(params->what)); - else - 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_type(type,params->what)); + 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)); for(i=0;i<params->paramSize/4;i++) fprintf(stderr,"%*s param[%d] = 0x%X\n",3*c_level,"",i,params->params[i]); |