windowscodecs: Log unsupported conversion formats.

This commit is contained in:
Vincent Povirk 2011-04-15 02:13:15 -05:00 committed by Alexandre Julliard
parent d65f579912
commit 80470260d0
1 changed files with 18 additions and 2 deletions

View File

@ -960,6 +960,7 @@ static HRESULT WINAPI FormatConverter_Initialize(IWICFormatConverter *iface,
if (!srcinfo) if (!srcinfo)
{ {
res = WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT; res = WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT;
FIXME("Unsupported source format %s\n", debugstr_guid(&srcFormat));
goto end; goto end;
} }
@ -967,6 +968,7 @@ static HRESULT WINAPI FormatConverter_Initialize(IWICFormatConverter *iface,
if (!dstinfo) if (!dstinfo)
{ {
res = WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT; res = WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT;
FIXME("Unsupported destination format %s\n", debugstr_guid(dstFormat));
goto end; goto end;
} }
@ -981,7 +983,10 @@ static HRESULT WINAPI FormatConverter_Initialize(IWICFormatConverter *iface,
This->source = pISource; This->source = pISource;
} }
else else
{
FIXME("Unsupported conversion %s -> %s\n", debugstr_guid(&srcFormat), debugstr_guid(dstFormat));
res = WINCODEC_ERR_UNSUPPORTEDOPERATION; res = WINCODEC_ERR_UNSUPPORTEDOPERATION;
}
end: end:
@ -1001,16 +1006,27 @@ static HRESULT WINAPI FormatConverter_CanConvert(IWICFormatConverter *iface,
debugstr_guid(dstPixelFormat), pfCanConvert); debugstr_guid(dstPixelFormat), pfCanConvert);
srcinfo = get_formatinfo(srcPixelFormat); srcinfo = get_formatinfo(srcPixelFormat);
if (!srcinfo) return WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT; if (!srcinfo)
{
FIXME("Unsupported source format %s\n", debugstr_guid(srcPixelFormat));
return WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT;
}
dstinfo = get_formatinfo(dstPixelFormat); dstinfo = get_formatinfo(dstPixelFormat);
if (!dstinfo) return WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT; if (!dstinfo)
{
FIXME("Unsupported destination format %s\n", debugstr_guid(dstPixelFormat));
return WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT;
}
if (dstinfo->copy_function && if (dstinfo->copy_function &&
SUCCEEDED(dstinfo->copy_function(This, NULL, 0, 0, NULL, dstinfo->format))) SUCCEEDED(dstinfo->copy_function(This, NULL, 0, 0, NULL, dstinfo->format)))
*pfCanConvert = TRUE; *pfCanConvert = TRUE;
else else
{
FIXME("Unsupported conversion %s -> %s\n", debugstr_guid(srcPixelFormat), debugstr_guid(dstPixelFormat));
*pfCanConvert = FALSE; *pfCanConvert = FALSE;
}
return S_OK; return S_OK;
} }