[PATCH] strmbase: Support FORMAT_VideoInfo2 in strmbase_dump_media_type().
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> --- dlls/strmbase/mediatype.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/dlls/strmbase/mediatype.c b/dlls/strmbase/mediatype.c index 84fe0d8f69c..38c94e51487 100644 --- a/dlls/strmbase/mediatype.c +++ b/dlls/strmbase/mediatype.c @@ -23,6 +23,7 @@ #include "qedit.h" #include "d3d9.h" #include "vmr9.h" +#include "dvdmedia.h" WINE_DEFAULT_DEBUG_CHANNEL(strmbase); @@ -216,9 +217,34 @@ void strmbase_dump_media_type(const AM_MEDIA_TYPE *mt) { VIDEOINFOHEADER *vih = (VIDEOINFOHEADER *)mt->pbFormat; - TRACE("source %s, target %s, bitrate %u, error rate %u, %s sec/frame, ", - wine_dbgstr_rect(&vih->rcSource), wine_dbgstr_rect(&vih->rcTarget), - vih->dwBitRate, vih->dwBitErrorRate, debugstr_time(vih->AvgTimePerFrame)); + if (!IsRectEmpty(&vih->rcSource)) TRACE("source %s, ", wine_dbgstr_rect(&vih->rcSource)); + if (!IsRectEmpty(&vih->rcTarget)) TRACE("target %s, ", wine_dbgstr_rect(&vih->rcTarget)); + if (vih->dwBitRate) TRACE("bitrate %u, ", vih->dwBitRate); + if (vih->dwBitErrorRate) TRACE("error rate %u, ", vih->dwBitErrorRate); + TRACE("%s sec/frame, ", debugstr_time(vih->AvgTimePerFrame)); + TRACE("size %dx%d, %u planes, %u bpp, compression %s, image size %u", + vih->bmiHeader.biWidth, vih->bmiHeader.biHeight, vih->bmiHeader.biPlanes, + vih->bmiHeader.biBitCount, debugstr_fourcc(vih->bmiHeader.biCompression), + vih->bmiHeader.biSizeImage); + if (vih->bmiHeader.biXPelsPerMeter || vih->bmiHeader.biYPelsPerMeter) + TRACE(", resolution %dx%d", vih->bmiHeader.biXPelsPerMeter, vih->bmiHeader.biYPelsPerMeter); + if (vih->bmiHeader.biClrUsed) TRACE(", %d colours", vih->bmiHeader.biClrUsed); + if (vih->bmiHeader.biClrImportant) TRACE(", %d important colours", vih->bmiHeader.biClrImportant); + TRACE(".\n"); + } + else if (IsEqualGUID(&mt->formattype, &FORMAT_VideoInfo2) && mt->cbFormat >= sizeof(VIDEOINFOHEADER2)) + { + VIDEOINFOHEADER2 *vih = (VIDEOINFOHEADER2 *)mt->pbFormat; + + if (!IsRectEmpty(&vih->rcSource)) TRACE("source %s, ", wine_dbgstr_rect(&vih->rcSource)); + if (!IsRectEmpty(&vih->rcTarget)) TRACE("target %s, ", wine_dbgstr_rect(&vih->rcTarget)); + if (vih->dwBitRate) TRACE("bitrate %u, ", vih->dwBitRate); + if (vih->dwBitErrorRate) TRACE("error rate %u, ", vih->dwBitErrorRate); + TRACE("%s sec/frame, ", debugstr_time(vih->AvgTimePerFrame)); + if (vih->dwInterlaceFlags) TRACE("interlace flags %#x, ", vih->dwInterlaceFlags); + if (vih->dwCopyProtectFlags) TRACE("copy-protection flags %#x, ", vih->dwCopyProtectFlags); + TRACE("aspect ratio %u/%u, ", vih->dwPictAspectRatioX, vih->dwPictAspectRatioY); + if (vih->u.dwControlFlags) TRACE("control flags %#x, ", vih->u.dwControlFlags); TRACE("size %dx%d, %u planes, %u bpp, compression %s, image size %u", vih->bmiHeader.biWidth, vih->bmiHeader.biHeight, vih->bmiHeader.biPlanes, vih->bmiHeader.biBitCount, debugstr_fourcc(vih->bmiHeader.biCompression), -- 2.25.1
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> --- dlls/quartz/quartz_private.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/quartz/quartz_private.h b/dlls/quartz/quartz_private.h index 28bb016fdf9..1cec5755c13 100644 --- a/dlls/quartz/quartz_private.h +++ b/dlls/quartz/quartz_private.h @@ -51,6 +51,7 @@ static inline const char *debugstr_time(REFERENCE_TIME time) if (time < 0) buffer[i++] = '-'; while (i--) rev[j++] = buffer[i]; + while (rev[j-1] == '0' && rev[j-2] != '.') --j; rev[j] = 0; return wine_dbg_sprintf("%s", rev); -- 2.25.1
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68217 Your paranoid android. === debiant (32 bit report) === quartz: vmr9.c:2714: Test succeeded inside todo block: Got 1 calls to PresentImage().
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> --- dlls/strmbase/strmbase_private.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/strmbase/strmbase_private.h b/dlls/strmbase/strmbase_private.h index e0628c13a1e..0a23592bd28 100644 --- a/dlls/strmbase/strmbase_private.h +++ b/dlls/strmbase/strmbase_private.h @@ -47,6 +47,7 @@ static inline const char *debugstr_time(REFERENCE_TIME time) if (time < 0) buffer[i++] = '-'; while (i--) rev[j++] = buffer[i]; + while (rev[j-1] == '0' && rev[j-2] != '.') --j; rev[j] = 0; return wine_dbg_sprintf("%s", rev); -- 2.25.1
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=68213 Your paranoid android. === debiant (build log) === error: patch failed: dlls/strmbase/mediatype.c:23 Task: Patch failed to apply === debiant (build log) === error: patch failed: dlls/strmbase/mediatype.c:23 Task: Patch failed to apply
participants (2)
-
Marvin -
Zebediah Figura