diff --git a/dlls/mf/mf_private.h b/dlls/mf/mf_private.h index db6f101cd6d..6f28c93aea3 100644 --- a/dlls/mf/mf_private.h +++ b/dlls/mf/mf_private.h @@ -79,6 +79,40 @@ static inline const char *debugstr_time(LONGLONG time) return wine_dbg_sprintf("%s", rev); } +static inline const char *debugstr_propvar(const PROPVARIANT *v) +{ + if (!v) + return "(null)"; + + switch (v->vt) + { + case VT_EMPTY: + return wine_dbg_sprintf("%p {VT_EMPTY}", v); + case VT_NULL: + return wine_dbg_sprintf("%p {VT_NULL}", v); + case VT_UI4: + return wine_dbg_sprintf("%p {VT_UI4: %ld}", v, v->ulVal); + case VT_UI8: + return wine_dbg_sprintf("%p {VT_UI8: %s}", v, wine_dbgstr_longlong(v->uhVal.QuadPart)); + case VT_I8: + return wine_dbg_sprintf("%p {VT_I8: %s}", v, wine_dbgstr_longlong(v->hVal.QuadPart)); + case VT_R4: + return wine_dbg_sprintf("%p {VT_R4: %.8e}", v, v->fltVal); + case VT_R8: + return wine_dbg_sprintf("%p {VT_R8: %lf}", v, v->dblVal); + case VT_CLSID: + return wine_dbg_sprintf("%p {VT_CLSID: %s}", v, wine_dbgstr_guid(v->puuid)); + case VT_LPWSTR: + return wine_dbg_sprintf("%p {VT_LPWSTR: %s}", v, wine_dbgstr_w(v->pwszVal)); + case VT_VECTOR | VT_UI1: + return wine_dbg_sprintf("%p {VT_VECTOR|VT_UI1: %p}", v, v->caub.pElems); + case VT_UNKNOWN: + return wine_dbg_sprintf("%p {VT_UNKNOWN: %p}", v, v->punkVal); + default: + return wine_dbg_sprintf("%p {vt %#x}", v, v->vt); + } +} + extern BOOL mf_is_sample_copier_transform(IMFTransform *transform) DECLSPEC_HIDDEN; extern BOOL mf_is_sar_sink(IMFMediaSink *sink) DECLSPEC_HIDDEN; extern HRESULT topology_node_get_object(IMFTopologyNode *node, REFIID riid, void **obj) DECLSPEC_HIDDEN; diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 29dae316ce0..85cbcc29630 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -2009,7 +2009,7 @@ static HRESULT WINAPI mfsession_Start(IMFMediaSession *iface, const GUID *format struct session_op *op; HRESULT hr; - TRACE("%p, %s, %p.\n", iface, debugstr_guid(format), start_position); + TRACE("%p, %s, %p.\n", iface, debugstr_guid(format), debugstr_propvar(start_position)); if (!start_position) return E_POINTER;