Commit d4b1db71 authored by Ludger Sprenker's avatar Ludger Sprenker Committed by Alexandre Julliard

windowscodecs: Implement ComponentFactory::CreateEncoderPropertyBag.

parent d195bbeb
......@@ -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));
......
......@@ -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;
......
......@@ -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 = {
......
......@@ -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);
......
......@@ -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);
......
/*
* 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;
......
......@@ -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;
......
......@@ -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))
......
......@@ -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;
......
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