From a8d08e2ad7749b5b97e6cd509854cd21bdef4a17 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 6 Nov 2014 16:07:54 -0600 Subject: [PATCH] windowscodecs: Implement MetadataReaderInfo_GetContainerFormats. --- dlls/windowscodecs/info.c | 8 +++++--- dlls/windowscodecs/tests/info.c | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c index d42d7264e36..ea81dbade2d 100644 --- a/dlls/windowscodecs/info.c +++ b/dlls/windowscodecs/info.c @@ -56,6 +56,7 @@ static const WCHAR supportstransparency_valuename[] = {'S','u','p','p','o','r',' static const WCHAR requiresfullstream_valuename[] = {'R','e','q','u','i','r','e','s','F','u','l','l','S','t','r','e','a','m',0}; static const WCHAR supportspadding_valuename[] = {'S','u','p','p','o','r','t','s','P','a','d','d','i','n','g',0}; static const WCHAR fileextensions_valuename[] = {'F','i','l','e','E','x','t','e','n','s','i','o','n','s',0}; +static const WCHAR containers_keyname[] = {'C','o','n','t','a','i','n','e','r','s',0}; static HRESULT ComponentInfo_GetStringValue(HKEY classkey, LPCWSTR value, UINT buffer_size, WCHAR *buffer, UINT *actual_size) @@ -1635,10 +1636,11 @@ static HRESULT WINAPI MetadataReaderInfo_GetMetadataFormat(IWICMetadataReaderInf static HRESULT WINAPI MetadataReaderInfo_GetContainerFormats(IWICMetadataReaderInfo *iface, UINT length, GUID *formats, UINT *actual_length) { - if (!actual_length) return E_INVALIDARG; + MetadataReaderInfo *This = impl_from_IWICMetadataReaderInfo(iface); + TRACE("(%p,%u,%p,%p)\n", iface, length, formats, actual_length); - FIXME("(%p,%u,%p,%p): stub\n", iface, length, formats, actual_length); - return E_NOTIMPL; + return ComponentInfo_GetGuidList(This->classkey, containers_keyname, length, + formats, actual_length); } static HRESULT WINAPI MetadataReaderInfo_GetDeviceManufacturer(IWICMetadataReaderInfo *iface, diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c index 5753f6bcd19..98c06ecf78f 100644 --- a/dlls/windowscodecs/tests/info.c +++ b/dlls/windowscodecs/tests/info.c @@ -415,9 +415,7 @@ static void test_reader_info(void) count = 0xdeadbeef; hr = IWICMetadataReaderInfo_GetContainerFormats(reader_info, 0, NULL, &count); -todo_wine ok(hr == S_OK, "GetContainerFormats failed, hr=%x\n", hr); -todo_wine ok(count == 0, "unexpected count %d\n", count); hr = IWICMetadataReaderInfo_GetPatterns(reader_info, &GUID_ContainerFormatPng, -- 2.11.4.GIT