windowscodecs: Implement ComponentFactory::CreateEncoderPropertyBag.

This commit is contained in:
Ludger Sprenker 2013-01-29 19:50:36 +01:00 committed by Alexandre Julliard
parent d195bbeb69
commit d4b1db7141
9 changed files with 12 additions and 11 deletions

View File

@ -538,7 +538,7 @@ static HRESULT WINAPI BmpEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
if (!This->stream) return WINCODEC_ERR_NOTINITIALIZED;
hr = CreatePropertyBag2(ppIEncoderOptions);
hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions);
if (FAILED(hr)) return hr;
encode = HeapAlloc(GetProcessHeap(), 0, sizeof(BmpFrameEncode));

View File

@ -663,7 +663,7 @@ static HRESULT WINAPI IcnsEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
goto end;
}
hr = CreatePropertyBag2(ppIEncoderOptions);
hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions);
if (FAILED(hr))
goto end;

View File

@ -821,8 +821,8 @@ static HRESULT WINAPI ComponentFactory_CreateQueryWriterFromBlockWriter(IWICComp
static HRESULT WINAPI ComponentFactory_CreateEncoderPropertyBag(IWICComponentFactory *iface,
PROPBAG2 *options, UINT count, IPropertyBag2 **property)
{
FIXME("%p,%p,%u,%p: stub\n", iface, options, count, property);
return E_NOTIMPL;
TRACE("(%p,%p,%u,%p)\n", iface, options, count, property);
return CreatePropertyBag2(options, count, property);
}
static const IWICComponentFactoryVtbl ComponentFactory_Vtbl = {

View File

@ -1389,7 +1389,7 @@ static HRESULT WINAPI JpegEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
return WINCODEC_ERR_NOTINITIALIZED;
}
hr = CreatePropertyBag2(ppIEncoderOptions);
hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions);
if (FAILED(hr))
{
LeaveCriticalSection(&This->lock);

View File

@ -1615,7 +1615,7 @@ static HRESULT WINAPI PngEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
return WINCODEC_ERR_NOTINITIALIZED;
}
hr = CreatePropertyBag2(ppIEncoderOptions);
hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions);
if (FAILED(hr))
{
LeaveCriticalSection(&This->lock);

View File

@ -1,5 +1,6 @@
/*
* Copyright 2009 Vincent Povirk for CodeWeavers
* Copyright 2013 Ludger Sprenker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -136,7 +137,8 @@ static const IPropertyBag2Vtbl PropertyBag_Vtbl = {
PropertyBag_LoadObject
};
HRESULT CreatePropertyBag2(IPropertyBag2 **ppPropertyBag2)
HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count,
IPropertyBag2 **ppPropertyBag2)
{
PropertyBag *This;

View File

@ -234,7 +234,6 @@ static void test_empty_propertybag(void)
hr = IWICComponentFactory_CreateEncoderPropertyBag(factory, NULL, 0, &property);
todo_wine
ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%x\n", hr);
if (FAILED(hr)) return;
@ -265,7 +264,6 @@ static void test_filled_propertybag(void)
hr = IWICComponentFactory_CreateEncoderPropertyBag(factory, opts, 2, &property);
todo_wine
ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%x\n", hr);
if (FAILED(hr)) return;

View File

@ -1883,7 +1883,7 @@ static HRESULT WINAPI TiffEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
if (SUCCEEDED(hr))
{
hr = CreatePropertyBag2(ppIEncoderOptions);
hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions);
}
if (SUCCEEDED(hr))

View File

@ -62,7 +62,8 @@ extern void reverse_bgr8(UINT bytesperpixel, LPBYTE bits, UINT width, UINT heigh
extern HRESULT get_pixelformat_bpp(const GUID *pixelformat, UINT *bpp) DECLSPEC_HIDDEN;
extern HRESULT CreatePropertyBag2(IPropertyBag2 **ppPropertyBag2) DECLSPEC_HIDDEN;
extern HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count,
IPropertyBag2 **property) DECLSPEC_HIDDEN;
extern HRESULT CreateComponentInfo(REFCLSID clsid, IWICComponentInfo **ppIInfo) DECLSPEC_HIDDEN;
extern HRESULT CreateComponentEnumerator(DWORD componentTypes, DWORD options, IEnumUnknown **ppIEnumUnknown) DECLSPEC_HIDDEN;