Commit ceabad19 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

dmime: Improved tracing of the DMUS_OBJECTDESC structure.

parent 96c4a1b9
...@@ -285,7 +285,7 @@ static HRESULT WINAPI path_IDirectMusicObject_ParseDescriptor(IDirectMusicObject ...@@ -285,7 +285,7 @@ static HRESULT WINAPI path_IDirectMusicObject_ParseDescriptor(IDirectMusicObject
desc->guidClass = CLSID_DirectMusicAudioPathConfig; desc->guidClass = CLSID_DirectMusicAudioPathConfig;
desc->dwValidData |= DMUS_OBJ_CLASS; desc->dwValidData |= DMUS_OBJ_CLASS;
TRACE("returning descriptor:\n%s\n", debugstr_DMUS_OBJECTDESC (desc)); dump_DMUS_OBJECTDESC(desc);
return S_OK; return S_OK;
} }
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "dmutils.h" #include "dmutils.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmfile); WINE_DEFAULT_DEBUG_CHANNEL(dmfile);
WINE_DECLARE_DEBUG_CHANNEL(dmime);
static HRESULT IDirectMusicUtils_IPersistStream_ParseDescGeneric (DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm, LPDMUS_OBJECTDESC pDesc) { static HRESULT IDirectMusicUtils_IPersistStream_ParseDescGeneric (DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm, LPDMUS_OBJECTDESC pDesc) {
...@@ -143,7 +144,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface, ...@@ -143,7 +144,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
TRACE("** DM Reference Begin of Load ***\n"); TRACE("** DM Reference Begin of Load ***\n");
TRACE("With Desc:\n"); TRACE("With Desc:\n");
debugstr_DMUS_OBJECTDESC(&ref_desc); dump_DMUS_OBJECTDESC(&ref_desc);
{ {
LPDIRECTMUSICGETLOADER pGetLoader = NULL; LPDIRECTMUSICGETLOADER pGetLoader = NULL;
...@@ -430,26 +431,33 @@ static const char *debugstr_DMUS_OBJ_FLAGS (DWORD flagmask) { ...@@ -430,26 +431,33 @@ static const char *debugstr_DMUS_OBJ_FLAGS (DWORD flagmask) {
return debugstr_flags(flagmask, flags, ARRAY_SIZE(flags)); return debugstr_flags(flagmask, flags, ARRAY_SIZE(flags));
} }
const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) { void dump_DMUS_OBJECTDESC(DMUS_OBJECTDESC *pDesc)
{
if (!TRACE_ON(dmime))
return;
if (pDesc) { if (pDesc) {
char buffer[1024], *ptr = buffer; TRACE_(dmime)("DMUS_OBJECTDESC (%p):", pDesc);
TRACE_(dmime)(" - dwSize = 0x%08X\n", pDesc->dwSize);
ptr += sprintf(ptr, "DMUS_OBJECTDESC (%p):\n", pDesc); TRACE_(dmime)(" - dwValidData = 0x%08X ( %s)\n", pDesc->dwValidData, debugstr_DMUS_OBJ_FLAGS (pDesc->dwValidData));
ptr += sprintf(ptr, " - dwSize = 0x%08X\n", pDesc->dwSize); if (pDesc->dwValidData & DMUS_OBJ_CLASS)
ptr += sprintf(ptr, " - dwValidData = 0x%08X ( %s)\n", pDesc->dwValidData, debugstr_DMUS_OBJ_FLAGS (pDesc->dwValidData)); TRACE_(dmime)(" - guidClass = %s\n", debugstr_dmguid(&pDesc->guidClass));
if (pDesc->dwValidData & DMUS_OBJ_CLASS) ptr += sprintf(ptr, " - guidClass = %s\n", debugstr_dmguid(&pDesc->guidClass)); if (pDesc->dwValidData & DMUS_OBJ_OBJECT)
if (pDesc->dwValidData & DMUS_OBJ_OBJECT) ptr += sprintf(ptr, " - guidObject = %s\n", debugstr_guid(&pDesc->guidObject)); TRACE_(dmime)(" - guidObject = %s\n", debugstr_guid(&pDesc->guidObject));
if (pDesc->dwValidData & DMUS_OBJ_DATE) ptr += sprintf(ptr, " - ftDate = %s\n", debugstr_filetime (&pDesc->ftDate)); if (pDesc->dwValidData & DMUS_OBJ_DATE)
if (pDesc->dwValidData & DMUS_OBJ_VERSION) ptr += sprintf(ptr, " - vVersion = %s\n", debugstr_dmversion(&pDesc->vVersion)); TRACE_(dmime)(" - ftDate = %s\n", debugstr_filetime (&pDesc->ftDate));
if (pDesc->dwValidData & DMUS_OBJ_NAME) ptr += sprintf(ptr, " - wszName = %s\n", debugstr_w(pDesc->wszName)); if (pDesc->dwValidData & DMUS_OBJ_VERSION)
if (pDesc->dwValidData & DMUS_OBJ_CATEGORY) ptr += sprintf(ptr, " - wszCategory = %s\n", debugstr_w(pDesc->wszCategory)); TRACE_(dmime)(" - vVersion = %s\n", debugstr_dmversion(&pDesc->vVersion));
if (pDesc->dwValidData & DMUS_OBJ_FILENAME) ptr += sprintf(ptr, " - wszFileName = %s\n", debugstr_w(pDesc->wszFileName)); if (pDesc->dwValidData & DMUS_OBJ_NAME)
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) ptr += sprintf(ptr, " - llMemLength = 0x%s\n - pbMemData = %p\n", TRACE_(dmime)(" - wszName = %s\n", debugstr_w(pDesc->wszName));
wine_dbgstr_longlong(pDesc->llMemLength), pDesc->pbMemData); if (pDesc->dwValidData & DMUS_OBJ_CATEGORY)
if (pDesc->dwValidData & DMUS_OBJ_STREAM) ptr += sprintf(ptr, " - pStream = %p\n", pDesc->pStream); TRACE_(dmime)(" - wszCategory = %s\n", debugstr_w(pDesc->wszCategory));
if (pDesc->dwValidData & DMUS_OBJ_FILENAME)
return wine_dbg_sprintf("%s", buffer); TRACE_(dmime)(" - wszFileName = %s\n", debugstr_w(pDesc->wszFileName));
} else { if (pDesc->dwValidData & DMUS_OBJ_MEMORY)
return wine_dbg_sprintf("(NULL)"); TRACE_(dmime)(" - llMemLength = 0x%s\n - pbMemData = %p\n", wine_dbgstr_longlong(pDesc->llMemLength),
pDesc->pbMemData);
if (pDesc->dwValidData & DMUS_OBJ_STREAM)
TRACE_(dmime)(" - pStream = %p\n", pDesc->pStream);
} }
} }
...@@ -56,6 +56,6 @@ extern const char *debugstr_fourcc (DWORD fourcc) DECLSPEC_HIDDEN; ...@@ -56,6 +56,6 @@ extern const char *debugstr_fourcc (DWORD fourcc) DECLSPEC_HIDDEN;
extern const char *debugstr_dmguid (const GUID *id) DECLSPEC_HIDDEN; extern const char *debugstr_dmguid (const GUID *id) DECLSPEC_HIDDEN;
/* dump whole DMUS_OBJECTDESC struct */ /* dump whole DMUS_OBJECTDESC struct */
extern const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) DECLSPEC_HIDDEN; void dump_DMUS_OBJECTDESC(DMUS_OBJECTDESC *pDesc) DECLSPEC_HIDDEN;
#endif /* __WINE_DMUTILS_H */ #endif /* __WINE_DMUTILS_H */
...@@ -216,7 +216,7 @@ static HRESULT WINAPI graph_IDirectMusicObject_ParseDescriptor(IDirectMusicObjec ...@@ -216,7 +216,7 @@ static HRESULT WINAPI graph_IDirectMusicObject_ParseDescriptor(IDirectMusicObjec
desc->guidClass = CLSID_DirectMusicGraph; desc->guidClass = CLSID_DirectMusicGraph;
desc->dwValidData |= DMUS_OBJ_CLASS; desc->dwValidData |= DMUS_OBJ_CLASS;
TRACE("returning descriptor:\n%s\n", debugstr_DMUS_OBJECTDESC (desc)); dump_DMUS_OBJECTDESC(desc);
return S_OK; return S_OK;
} }
......
...@@ -607,7 +607,7 @@ static HRESULT WINAPI seg_IDirectMusicObject_ParseDescriptor(IDirectMusicObject ...@@ -607,7 +607,7 @@ static HRESULT WINAPI seg_IDirectMusicObject_ParseDescriptor(IDirectMusicObject
desc->guidClass = CLSID_DirectMusicSegment; desc->guidClass = CLSID_DirectMusicSegment;
desc->dwValidData |= DMUS_OBJ_CLASS; desc->dwValidData |= DMUS_OBJ_CLASS;
TRACE("returning descriptor:\n%s\n", debugstr_DMUS_OBJECTDESC (desc)); dump_DMUS_OBJECTDESC(desc);
return S_OK; return S_OK;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment