windowscodecs: Implement global property functions for DdsDecoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com> Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f74797d3da
commit
f634aa2836
|
@ -208,15 +208,17 @@ static HRESULT WINAPI DdsDecoder_GetDecoderInfo(IWICBitmapDecoder *iface,
|
|||
static HRESULT WINAPI DdsDecoder_CopyPalette(IWICBitmapDecoder *iface,
|
||||
IWICPalette *pIPalette)
|
||||
{
|
||||
FIXME("(%p,%p): stub.\n", iface, pIPalette);
|
||||
TRACE("(%p,%p)\n", iface, pIPalette);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return WINCODEC_ERR_PALETTEUNAVAILABLE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DdsDecoder_GetMetadataQueryReader(IWICBitmapDecoder *iface,
|
||||
IWICMetadataQueryReader **ppIMetadataQueryReader)
|
||||
{
|
||||
FIXME("(%p,%p): stub.\n", iface, ppIMetadataQueryReader);
|
||||
if (!ppIMetadataQueryReader) return E_INVALIDARG;
|
||||
|
||||
FIXME("(%p,%p)\n", iface, ppIMetadataQueryReader);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -224,25 +226,25 @@ static HRESULT WINAPI DdsDecoder_GetMetadataQueryReader(IWICBitmapDecoder *iface
|
|||
static HRESULT WINAPI DdsDecoder_GetPreview(IWICBitmapDecoder *iface,
|
||||
IWICBitmapSource **ppIBitmapSource)
|
||||
{
|
||||
FIXME("(%p,%p): stub.\n", iface, ppIBitmapSource);
|
||||
TRACE("(%p,%p)\n", iface, ppIBitmapSource);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return WINCODEC_ERR_UNSUPPORTEDOPERATION;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DdsDecoder_GetColorContexts(IWICBitmapDecoder *iface,
|
||||
UINT cCount, IWICColorContext **ppDdslorContexts, UINT *pcActualCount)
|
||||
{
|
||||
FIXME("(%p,%u,%p,%p): stub.\n", iface, cCount, ppDdslorContexts, pcActualCount);
|
||||
TRACE("(%p,%u,%p,%p)\n", iface, cCount, ppDdslorContexts, pcActualCount);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return WINCODEC_ERR_UNSUPPORTEDOPERATION;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DdsDecoder_GetThumbnail(IWICBitmapDecoder *iface,
|
||||
IWICBitmapSource **ppIThumbnail)
|
||||
{
|
||||
FIXME("(%p,%p): stub.\n", iface, ppIThumbnail);
|
||||
TRACE("(%p,%p)\n", iface, ppIThumbnail);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return WINCODEC_ERR_CODECNOTHUMBNAIL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DdsDecoder_GetFrameCount(IWICBitmapDecoder *iface,
|
||||
|
|
|
@ -154,17 +154,14 @@ static void test_dds_decoder_global_properties(IWICBitmapDecoder *decoder)
|
|||
hr = IWICImagingFactory_CreatePalette(factory, &pallette);
|
||||
ok (hr == S_OK, "CreatePalette failed, hr=%x\n", hr);
|
||||
if (hr == S_OK) {
|
||||
todo_wine {
|
||||
hr = IWICBitmapDecoder_CopyPalette(decoder, pallette);
|
||||
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Expected hr=WINCODEC_ERR_PALETTEUNAVAILABLE, got %x\n", hr);
|
||||
hr = IWICBitmapDecoder_CopyPalette(decoder, NULL);
|
||||
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Expected hr=WINCODEC_ERR_PALETTEUNAVAILABLE, got %x\n", hr);
|
||||
};
|
||||
}
|
||||
|
||||
todo_wine {
|
||||
hr = IWICBitmapDecoder_GetMetadataQueryReader(decoder, &metadata_reader);
|
||||
ok (hr == S_OK, "Expected hr=S_OK, got %x\n", hr);
|
||||
todo_wine ok (hr == S_OK, "Expected hr=S_OK, got %x\n", hr);
|
||||
hr = IWICBitmapDecoder_GetMetadataQueryReader(decoder, NULL);
|
||||
ok (hr == E_INVALIDARG, "Expected hr=E_INVALIDARG, got %x\n", hr);
|
||||
|
||||
|
@ -182,7 +179,6 @@ static void test_dds_decoder_global_properties(IWICBitmapDecoder *decoder)
|
|||
ok (hr == WINCODEC_ERR_CODECNOTHUMBNAIL, "Expected hr=WINCODEC_ERR_CODECNOTHUMBNAIL, got %x\n", hr);
|
||||
hr = IWICBitmapDecoder_GetThumbnail(decoder, NULL);
|
||||
ok (hr == WINCODEC_ERR_CODECNOTHUMBNAIL, "Expected hr=WINCODEC_ERR_CODECNOTHUMBNAIL, got %x\n", hr);
|
||||
};
|
||||
|
||||
if (pallette) IWICPalette_Release(pallette);
|
||||
if (metadata_reader) IWICMetadataQueryReader_Release(metadata_reader);
|
||||
|
|
Loading…
Reference in New Issue