Module: wine Branch: master Commit: e9fba4fc07c012433c1fd189e967fadb380dfb18 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e9fba4fc07c012433c1fd189e9...
Author: Vincent Povirk vincent@codeweavers.com Date: Wed Jul 27 16:03:09 2011 -0500
windowscodecs: Implement GetDecoderInfo for all the decoders.
---
dlls/windowscodecs/icoformat.c | 16 ++++++++++++++-- dlls/windowscodecs/jpegformat.c | 16 ++++++++++++++-- dlls/windowscodecs/pngformat.c | 16 ++++++++++++++-- dlls/windowscodecs/tgaformat.c | 16 ++++++++++++++-- dlls/windowscodecs/tiffformat.c | 16 ++++++++++++++-- 5 files changed, 70 insertions(+), 10 deletions(-)
diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c index a49683a..fcb5d49 100644 --- a/dlls/windowscodecs/icoformat.c +++ b/dlls/windowscodecs/icoformat.c @@ -534,8 +534,20 @@ static HRESULT WINAPI IcoDecoder_GetContainerFormat(IWICBitmapDecoder *iface, static HRESULT WINAPI IcoDecoder_GetDecoderInfo(IWICBitmapDecoder *iface, IWICBitmapDecoderInfo **ppIDecoderInfo) { - FIXME("(%p,%p): stub\n", iface, ppIDecoderInfo); - return E_NOTIMPL; + HRESULT hr; + IWICComponentInfo *compinfo; + + TRACE("(%p,%p)\n", iface, ppIDecoderInfo); + + hr = CreateComponentInfo(&CLSID_WICIcoDecoder, &compinfo); + if (FAILED(hr)) return hr; + + hr = IWICComponentInfo_QueryInterface(compinfo, &IID_IWICBitmapDecoderInfo, + (void**)ppIDecoderInfo); + + IWICComponentInfo_Release(compinfo); + + return hr; }
static HRESULT WINAPI IcoDecoder_CopyPalette(IWICBitmapDecoder *iface, diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index ab21fbf..083a352 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -362,8 +362,20 @@ static HRESULT WINAPI JpegDecoder_GetContainerFormat(IWICBitmapDecoder *iface, static HRESULT WINAPI JpegDecoder_GetDecoderInfo(IWICBitmapDecoder *iface, IWICBitmapDecoderInfo **ppIDecoderInfo) { - FIXME("(%p,%p): stub\n", iface, ppIDecoderInfo); - return E_NOTIMPL; + HRESULT hr; + IWICComponentInfo *compinfo; + + TRACE("(%p,%p)\n", iface, ppIDecoderInfo); + + hr = CreateComponentInfo(&CLSID_WICJpegDecoder, &compinfo); + if (FAILED(hr)) return hr; + + hr = IWICComponentInfo_QueryInterface(compinfo, &IID_IWICBitmapDecoderInfo, + (void**)ppIDecoderInfo); + + IWICComponentInfo_Release(compinfo); + + return hr; }
static HRESULT WINAPI JpegDecoder_CopyPalette(IWICBitmapDecoder *iface, diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index f1c0e3c..f5f6fdb 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -475,8 +475,20 @@ static HRESULT WINAPI PngDecoder_GetContainerFormat(IWICBitmapDecoder *iface, static HRESULT WINAPI PngDecoder_GetDecoderInfo(IWICBitmapDecoder *iface, IWICBitmapDecoderInfo **ppIDecoderInfo) { - FIXME("(%p,%p): stub\n", iface, ppIDecoderInfo); - return E_NOTIMPL; + HRESULT hr; + IWICComponentInfo *compinfo; + + TRACE("(%p,%p)\n", iface, ppIDecoderInfo); + + hr = CreateComponentInfo(&CLSID_WICPngDecoder, &compinfo); + if (FAILED(hr)) return hr; + + hr = IWICComponentInfo_QueryInterface(compinfo, &IID_IWICBitmapDecoderInfo, + (void**)ppIDecoderInfo); + + IWICComponentInfo_Release(compinfo); + + return hr; }
static HRESULT WINAPI PngDecoder_CopyPalette(IWICBitmapDecoder *iface, diff --git a/dlls/windowscodecs/tgaformat.c b/dlls/windowscodecs/tgaformat.c index 8db1cf1..0a12056 100644 --- a/dlls/windowscodecs/tgaformat.c +++ b/dlls/windowscodecs/tgaformat.c @@ -351,8 +351,20 @@ static HRESULT WINAPI TgaDecoder_GetContainerFormat(IWICBitmapDecoder *iface, static HRESULT WINAPI TgaDecoder_GetDecoderInfo(IWICBitmapDecoder *iface, IWICBitmapDecoderInfo **ppIDecoderInfo) { - FIXME("(%p,%p): stub\n", iface, ppIDecoderInfo); - return E_NOTIMPL; + HRESULT hr; + IWICComponentInfo *compinfo; + + TRACE("(%p,%p)\n", iface, ppIDecoderInfo); + + hr = CreateComponentInfo(&CLSID_WineTgaDecoder, &compinfo); + if (FAILED(hr)) return hr; + + hr = IWICComponentInfo_QueryInterface(compinfo, &IID_IWICBitmapDecoderInfo, + (void**)ppIDecoderInfo); + + IWICComponentInfo_Release(compinfo); + + return hr; }
static HRESULT WINAPI TgaDecoder_CopyPalette(IWICBitmapDecoder *iface, diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index fb4f65c..6422b62 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -590,8 +590,20 @@ static HRESULT WINAPI TiffDecoder_GetContainerFormat(IWICBitmapDecoder *iface, static HRESULT WINAPI TiffDecoder_GetDecoderInfo(IWICBitmapDecoder *iface, IWICBitmapDecoderInfo **ppIDecoderInfo) { - FIXME("(%p,%p): stub\n", iface, ppIDecoderInfo); - return E_NOTIMPL; + HRESULT hr; + IWICComponentInfo *compinfo; + + TRACE("(%p,%p)\n", iface, ppIDecoderInfo); + + hr = CreateComponentInfo(&CLSID_WICTiffDecoder, &compinfo); + if (FAILED(hr)) return hr; + + hr = IWICComponentInfo_QueryInterface(compinfo, &IID_IWICBitmapDecoderInfo, + (void**)ppIDecoderInfo); + + IWICComponentInfo_Release(compinfo); + + return hr; }
static HRESULT WINAPI TiffDecoder_CopyPalette(IWICBitmapDecoder *iface,