windowscodecs: Implement DdsFrameEncode_Initialize.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ziqing Hui 2021-05-29 08:26:55 +08:00 committed by Alexandre Julliard
parent 738c594bf6
commit 984d9de828
1 changed files with 21 additions and 2 deletions

View File

@ -1573,8 +1573,27 @@ static ULONG WINAPI DdsFrameEncode_Release(IWICBitmapFrameEncode *iface)
static HRESULT WINAPI DdsFrameEncode_Initialize(IWICBitmapFrameEncode *iface,
IPropertyBag2 *encoderOptions)
{
FIXME("(%p,%p): stub\n", iface, encoderOptions);
return E_NOTIMPL;
DdsFrameEncode *This = impl_from_IWICBitmapFrameEncode(iface);
HRESULT hr;
TRACE("(%p,%p)\n", iface, encoderOptions);
if (encoderOptions) FIXME("encoder options are not supported for DDS.\n");
EnterCriticalSection(&This->parent->lock);
if (This->initialized)
{
hr = WINCODEC_ERR_WRONGSTATE;
}
else
{
This->initialized = TRUE;
hr = S_OK;
}
LeaveCriticalSection(&This->parent->lock);
return hr;
}
static HRESULT WINAPI DdsFrameEncode_SetSize(IWICBitmapFrameEncode *iface,