Commit 0dee027d authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

windowscodecs: Implement IWICComponentInfo::GetFriendlyName.

parent 2846921f
...@@ -38,6 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs); ...@@ -38,6 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
static const WCHAR mimetypes_valuename[] = {'M','i','m','e','T','y','p','e','s',0}; static const WCHAR mimetypes_valuename[] = {'M','i','m','e','T','y','p','e','s',0};
static const WCHAR author_valuename[] = {'A','u','t','h','o','r',0}; static const WCHAR author_valuename[] = {'A','u','t','h','o','r',0};
static const WCHAR friendlyname_valuename[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
static const WCHAR pixelformats_keyname[] = {'P','i','x','e','l','F','o','r','m','a','t','s',0}; static const WCHAR pixelformats_keyname[] = {'P','i','x','e','l','F','o','r','m','a','t','s',0};
static const WCHAR containerformat_valuename[] = {'C','o','n','t','a','i','n','e','r','F','o','r','m','a','t',0}; static const WCHAR containerformat_valuename[] = {'C','o','n','t','a','i','n','e','r','F','o','r','m','a','t',0};
...@@ -219,8 +220,12 @@ static HRESULT WINAPI BitmapDecoderInfo_GetSpecVersion(IWICBitmapDecoderInfo *if ...@@ -219,8 +220,12 @@ static HRESULT WINAPI BitmapDecoderInfo_GetSpecVersion(IWICBitmapDecoderInfo *if
static HRESULT WINAPI BitmapDecoderInfo_GetFriendlyName(IWICBitmapDecoderInfo *iface, UINT cchFriendlyName, static HRESULT WINAPI BitmapDecoderInfo_GetFriendlyName(IWICBitmapDecoderInfo *iface, UINT cchFriendlyName,
WCHAR *wzFriendlyName, UINT *pcchActual) WCHAR *wzFriendlyName, UINT *pcchActual)
{ {
FIXME("(%p,%u,%p,%p): stub\n", iface, cchFriendlyName, wzFriendlyName, pcchActual); BitmapDecoderInfo *This = impl_from_IWICBitmapDecoderInfo(iface);
return E_NOTIMPL;
TRACE("(%p,%u,%p,%p)\n", iface, cchFriendlyName, wzFriendlyName, pcchActual);
return ComponentInfo_GetStringValue(This->classkey, friendlyname_valuename,
cchFriendlyName, wzFriendlyName, pcchActual);
} }
static HRESULT WINAPI BitmapDecoderInfo_GetContainerFormat(IWICBitmapDecoderInfo *iface, static HRESULT WINAPI BitmapDecoderInfo_GetContainerFormat(IWICBitmapDecoderInfo *iface,
...@@ -669,8 +674,12 @@ static HRESULT WINAPI BitmapEncoderInfo_GetSpecVersion(IWICBitmapEncoderInfo *if ...@@ -669,8 +674,12 @@ static HRESULT WINAPI BitmapEncoderInfo_GetSpecVersion(IWICBitmapEncoderInfo *if
static HRESULT WINAPI BitmapEncoderInfo_GetFriendlyName(IWICBitmapEncoderInfo *iface, UINT cchFriendlyName, static HRESULT WINAPI BitmapEncoderInfo_GetFriendlyName(IWICBitmapEncoderInfo *iface, UINT cchFriendlyName,
WCHAR *wzFriendlyName, UINT *pcchActual) WCHAR *wzFriendlyName, UINT *pcchActual)
{ {
FIXME("(%p,%u,%p,%p): stub\n", iface, cchFriendlyName, wzFriendlyName, pcchActual); BitmapEncoderInfo *This = impl_from_IWICBitmapEncoderInfo(iface);
return E_NOTIMPL;
TRACE("(%p,%u,%p,%p)\n", iface, cchFriendlyName, wzFriendlyName, pcchActual);
return ComponentInfo_GetStringValue(This->classkey, friendlyname_valuename,
cchFriendlyName, wzFriendlyName, pcchActual);
} }
static HRESULT WINAPI BitmapEncoderInfo_GetContainerFormat(IWICBitmapEncoderInfo *iface, static HRESULT WINAPI BitmapEncoderInfo_GetContainerFormat(IWICBitmapEncoderInfo *iface,
...@@ -944,8 +953,12 @@ static HRESULT WINAPI FormatConverterInfo_GetSpecVersion(IWICFormatConverterInfo ...@@ -944,8 +953,12 @@ static HRESULT WINAPI FormatConverterInfo_GetSpecVersion(IWICFormatConverterInfo
static HRESULT WINAPI FormatConverterInfo_GetFriendlyName(IWICFormatConverterInfo *iface, UINT cchFriendlyName, static HRESULT WINAPI FormatConverterInfo_GetFriendlyName(IWICFormatConverterInfo *iface, UINT cchFriendlyName,
WCHAR *wzFriendlyName, UINT *pcchActual) WCHAR *wzFriendlyName, UINT *pcchActual)
{ {
FIXME("(%p,%u,%p,%p): stub\n", iface, cchFriendlyName, wzFriendlyName, pcchActual); FormatConverterInfo *This = impl_from_IWICFormatConverterInfo(iface);
return E_NOTIMPL;
TRACE("(%p,%u,%p,%p)\n", iface, cchFriendlyName, wzFriendlyName, pcchActual);
return ComponentInfo_GetStringValue(This->classkey, friendlyname_valuename,
cchFriendlyName, wzFriendlyName, pcchActual);
} }
static HRESULT WINAPI FormatConverterInfo_GetPixelFormats(IWICFormatConverterInfo *iface, static HRESULT WINAPI FormatConverterInfo_GetPixelFormats(IWICFormatConverterInfo *iface,
...@@ -1147,8 +1160,12 @@ static HRESULT WINAPI PixelFormatInfo_GetSpecVersion(IWICPixelFormatInfo2 *iface ...@@ -1147,8 +1160,12 @@ static HRESULT WINAPI PixelFormatInfo_GetSpecVersion(IWICPixelFormatInfo2 *iface
static HRESULT WINAPI PixelFormatInfo_GetFriendlyName(IWICPixelFormatInfo2 *iface, UINT cchFriendlyName, static HRESULT WINAPI PixelFormatInfo_GetFriendlyName(IWICPixelFormatInfo2 *iface, UINT cchFriendlyName,
WCHAR *wzFriendlyName, UINT *pcchActual) WCHAR *wzFriendlyName, UINT *pcchActual)
{ {
FIXME("(%p,%u,%p,%p): stub\n", iface, cchFriendlyName, wzFriendlyName, pcchActual); PixelFormatInfo *This = impl_from_IWICPixelFormatInfo2(iface);
return E_NOTIMPL;
TRACE("(%p,%u,%p,%p)\n", iface, cchFriendlyName, wzFriendlyName, pcchActual);
return ComponentInfo_GetStringValue(This->classkey, friendlyname_valuename,
cchFriendlyName, wzFriendlyName, pcchActual);
} }
static HRESULT WINAPI PixelFormatInfo_GetFormatGUID(IWICPixelFormatInfo2 *iface, static HRESULT WINAPI PixelFormatInfo_GetFormatGUID(IWICPixelFormatInfo2 *iface,
......
...@@ -189,13 +189,13 @@ static void test_pixelformat_info(void) ...@@ -189,13 +189,13 @@ static void test_pixelformat_info(void)
ok(hr == S_OK, "GetComponentType failed, hr=%x\n", hr); ok(hr == S_OK, "GetComponentType failed, hr=%x\n", hr);
ok(componenttype == WICPixelFormat, "unexpected component type 0x%x\n", componenttype); ok(componenttype == WICPixelFormat, "unexpected component type 0x%x\n", componenttype);
todo_wine
{
len = 0xdeadbeef; len = 0xdeadbeef;
hr = IWICComponentInfo_GetFriendlyName(info, 0, NULL, &len); hr = IWICComponentInfo_GetFriendlyName(info, 0, NULL, &len);
ok(hr == S_OK, "GetFriendlyName failed, hr=%x\n", hr); ok(hr == S_OK, "GetFriendlyName failed, hr=%x\n", hr);
ok(len < 255 && len > 0, "invalid length 0x%x\n", len); ok(len < 255 && len > 0, "invalid length 0x%x\n", len);
todo_wine
{
hr = IWICComponentInfo_GetSigningStatus(info, NULL); hr = IWICComponentInfo_GetSigningStatus(info, NULL);
ok(hr == E_INVALIDARG, "GetSigningStatus failed, hr=%x\n", hr); ok(hr == E_INVALIDARG, "GetSigningStatus failed, hr=%x\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment