Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
50d53928
Commit
50d53928
authored
May 28, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
May 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Extend IWICImagingFactory to IWICComponentFactory.
parent
fd31112a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
142 additions
and
80 deletions
+142
-80
clsfactory.c
dlls/windowscodecs/clsfactory.c
+1
-1
imgfactory.c
dlls/windowscodecs/imgfactory.c
+136
-75
proxy.c
dlls/windowscodecs/proxy.c
+1
-1
metadata.c
dlls/windowscodecs/tests/metadata.c
+3
-2
wincodecs_private.h
dlls/windowscodecs/wincodecs_private.h
+1
-1
No files found.
dlls/windowscodecs/clsfactory.c
View file @
50d53928
...
...
@@ -45,7 +45,7 @@ typedef struct {
}
classinfo
;
static
classinfo
wic_classes
[]
=
{
{
&
CLSID_WICImagingFactory
,
Imaging
Factory_CreateInstance
},
{
&
CLSID_WICImagingFactory
,
Component
Factory_CreateInstance
},
{
&
CLSID_WICBmpDecoder
,
BmpDecoder_CreateInstance
},
{
&
CLSID_WICPngDecoder
,
PngDecoder_CreateInstance
},
{
&
CLSID_WICPngEncoder
,
PngEncoder_CreateInstance
},
...
...
dlls/windowscodecs/imgfactory.c
View file @
50d53928
...
...
@@ -28,6 +28,7 @@
#include "objbase.h"
#include "shellapi.h"
#include "wincodec.h"
#include "wincodecsdk.h"
#include "wincodecs_private.h"
...
...
@@ -36,24 +37,26 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wincodecs
);
typedef
struct
{
IWIC
ImagingFactory
IWICImaging
Factory_iface
;
IWIC
ComponentFactory
IWICComponent
Factory_iface
;
LONG
ref
;
}
Imaging
Factory
;
}
Component
Factory
;
static
inline
ImagingFactory
*
impl_from_IWICImagingFactory
(
IWICImaging
Factory
*
iface
)
static
inline
ComponentFactory
*
impl_from_IWICComponentFactory
(
IWICComponent
Factory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ImagingFactory
,
IWICImaging
Factory_iface
);
return
CONTAINING_RECORD
(
iface
,
ComponentFactory
,
IWICComponent
Factory_iface
);
}
static
HRESULT
WINAPI
ImagingFactory_QueryInterface
(
IWICImaging
Factory
*
iface
,
REFIID
iid
,
static
HRESULT
WINAPI
ComponentFactory_QueryInterface
(
IWICComponent
Factory
*
iface
,
REFIID
iid
,
void
**
ppv
)
{
ImagingFactory
*
This
=
impl_from_IWICImaging
Factory
(
iface
);
ComponentFactory
*
This
=
impl_from_IWICComponent
Factory
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
iid
),
ppv
);
if
(
!
ppv
)
return
E_INVALIDARG
;
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICImagingFactory
,
iid
))
if
(
IsEqualIID
(
&
IID_IUnknown
,
iid
)
||
IsEqualIID
(
&
IID_IWICImagingFactory
,
iid
)
||
IsEqualIID
(
&
IID_IWICComponentFactory
,
iid
))
{
*
ppv
=
This
;
}
...
...
@@ -67,9 +70,9 @@ static HRESULT WINAPI ImagingFactory_QueryInterface(IWICImagingFactory *iface, R
return
S_OK
;
}
static
ULONG
WINAPI
ImagingFactory_AddRef
(
IWICImaging
Factory
*
iface
)
static
ULONG
WINAPI
ComponentFactory_AddRef
(
IWICComponent
Factory
*
iface
)
{
ImagingFactory
*
This
=
impl_from_IWICImaging
Factory
(
iface
);
ComponentFactory
*
This
=
impl_from_IWICComponent
Factory
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
...
...
@@ -77,9 +80,9 @@ static ULONG WINAPI ImagingFactory_AddRef(IWICImagingFactory *iface)
return
ref
;
}
static
ULONG
WINAPI
ImagingFactory_Release
(
IWICImaging
Factory
*
iface
)
static
ULONG
WINAPI
ComponentFactory_Release
(
IWICComponent
Factory
*
iface
)
{
ImagingFactory
*
This
=
impl_from_IWICImaging
Factory
(
iface
);
ComponentFactory
*
This
=
impl_from_IWICComponent
Factory
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
...
...
@@ -90,8 +93,8 @@ static ULONG WINAPI ImagingFactory_Release(IWICImagingFactory *iface)
return
ref
;
}
static
HRESULT
WINAPI
Imaging
Factory_CreateDecoderFromFilename
(
IWIC
Imaging
Factory
*
iface
,
LPCWSTR
wzFilename
,
const
GUID
*
pguidVendor
,
static
HRESULT
WINAPI
Component
Factory_CreateDecoderFromFilename
(
IWIC
Component
Factory
*
iface
,
LPCWSTR
wzFilename
,
const
GUID
*
pguidVendor
,
DWORD
dwDesiredAccess
,
WICDecodeOptions
metadataOptions
,
IWICBitmapDecoder
**
ppIDecoder
)
{
...
...
@@ -108,7 +111,7 @@ static HRESULT WINAPI ImagingFactory_CreateDecoderFromFilename(
if
(
SUCCEEDED
(
hr
))
{
hr
=
IWIC
Imaging
Factory_CreateDecoderFromStream
(
iface
,
(
IStream
*
)
stream
,
hr
=
IWIC
Component
Factory_CreateDecoderFromStream
(
iface
,
(
IStream
*
)
stream
,
pguidVendor
,
metadataOptions
,
ppIDecoder
);
}
...
...
@@ -118,8 +121,8 @@ static HRESULT WINAPI ImagingFactory_CreateDecoderFromFilename(
return
hr
;
}
static
HRESULT
WINAPI
Imaging
Factory_CreateDecoderFromStream
(
IWIC
Imaging
Factory
*
iface
,
IStream
*
pIStream
,
const
GUID
*
pguidVendor
,
static
HRESULT
WINAPI
Component
Factory_CreateDecoderFromStream
(
IWIC
Component
Factory
*
iface
,
IStream
*
pIStream
,
const
GUID
*
pguidVendor
,
WICDecodeOptions
metadataOptions
,
IWICBitmapDecoder
**
ppIDecoder
)
{
IEnumUnknown
*
enumdecoders
;
...
...
@@ -229,8 +232,8 @@ static HRESULT WINAPI ImagingFactory_CreateDecoderFromStream(
}
}
static
HRESULT
WINAPI
Imaging
Factory_CreateDecoderFromFileHandle
(
IWIC
Imaging
Factory
*
iface
,
ULONG_PTR
hFile
,
const
GUID
*
pguidVendor
,
static
HRESULT
WINAPI
Component
Factory_CreateDecoderFromFileHandle
(
IWIC
Component
Factory
*
iface
,
ULONG_PTR
hFile
,
const
GUID
*
pguidVendor
,
WICDecodeOptions
metadataOptions
,
IWICBitmapDecoder
**
ppIDecoder
)
{
FIXME
(
"(%p,%lx,%s,%u,%p): stub
\n
"
,
iface
,
hFile
,
debugstr_guid
(
pguidVendor
),
...
...
@@ -238,14 +241,14 @@ static HRESULT WINAPI ImagingFactory_CreateDecoderFromFileHandle(
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateComponentInfo
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateComponentInfo
(
IWICComponent
Factory
*
iface
,
REFCLSID
clsidComponent
,
IWICComponentInfo
**
ppIInfo
)
{
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
clsidComponent
),
ppIInfo
);
return
CreateComponentInfo
(
clsidComponent
,
ppIInfo
);
}
static
HRESULT
WINAPI
ImagingFactory_CreateDecoder
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateDecoder
(
IWICComponent
Factory
*
iface
,
REFGUID
guidContainerFormat
,
const
GUID
*
pguidVendor
,
IWICBitmapDecoder
**
ppIDecoder
)
{
...
...
@@ -254,7 +257,7 @@ static HRESULT WINAPI ImagingFactory_CreateDecoder(IWICImagingFactory *iface,
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateEncoder
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateEncoder
(
IWICComponent
Factory
*
iface
,
REFGUID
guidContainerFormat
,
const
GUID
*
pguidVendor
,
IWICBitmapEncoder
**
ppIEncoder
)
{
...
...
@@ -263,62 +266,62 @@ static HRESULT WINAPI ImagingFactory_CreateEncoder(IWICImagingFactory *iface,
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreatePalette
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreatePalette
(
IWICComponent
Factory
*
iface
,
IWICPalette
**
ppIPalette
)
{
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIPalette
);
return
PaletteImpl_Create
(
ppIPalette
);
}
static
HRESULT
WINAPI
ImagingFactory_CreateFormatConverter
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateFormatConverter
(
IWICComponent
Factory
*
iface
,
IWICFormatConverter
**
ppIFormatConverter
)
{
return
FormatConverter_CreateInstance
(
NULL
,
&
IID_IWICFormatConverter
,
(
void
**
)
ppIFormatConverter
);
}
static
HRESULT
WINAPI
ImagingFactory_CreateBitmapScaler
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapScaler
(
IWICComponent
Factory
*
iface
,
IWICBitmapScaler
**
ppIBitmapScaler
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIBitmapScaler
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateBitmapClipper
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapClipper
(
IWICComponent
Factory
*
iface
,
IWICBitmapClipper
**
ppIBitmapClipper
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIBitmapClipper
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateBitmapFlipRotator
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapFlipRotator
(
IWICComponent
Factory
*
iface
,
IWICBitmapFlipRotator
**
ppIBitmapFlipRotator
)
{
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIBitmapFlipRotator
);
return
FlipRotator_Create
(
ppIBitmapFlipRotator
);
}
static
HRESULT
WINAPI
ImagingFactory_CreateStream
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateStream
(
IWICComponent
Factory
*
iface
,
IWICStream
**
ppIWICStream
)
{
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppIWICStream
);
return
StreamImpl_Create
(
ppIWICStream
);
}
static
HRESULT
WINAPI
ImagingFactory_CreateColorContext
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateColorContext
(
IWICComponent
Factory
*
iface
,
IWICColorContext
**
ppIColorContext
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIColorContext
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateColorTransformer
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateColorTransformer
(
IWICComponent
Factory
*
iface
,
IWICColorTransform
**
ppIColorTransform
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
ppIColorTransform
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateBitmap
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateBitmap
(
IWICComponent
Factory
*
iface
,
UINT
uiWidth
,
UINT
uiHeight
,
REFWICPixelFormatGUID
pixelFormat
,
WICBitmapCreateCacheOption
option
,
IWICBitmap
**
ppIBitmap
)
{
...
...
@@ -327,7 +330,7 @@ static HRESULT WINAPI ImagingFactory_CreateBitmap(IWICImagingFactory *iface,
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateBitmapFromSource
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapFromSource
(
IWICComponent
Factory
*
iface
,
IWICBitmapSource
*
piBitmapSource
,
WICBitmapCreateCacheOption
option
,
IWICBitmap
**
ppIBitmap
)
{
...
...
@@ -335,7 +338,7 @@ static HRESULT WINAPI ImagingFactory_CreateBitmapFromSource(IWICImagingFactory *
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateBitmapFromSourceRect
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapFromSourceRect
(
IWICComponent
Factory
*
iface
,
IWICBitmapSource
*
piBitmapSource
,
UINT
x
,
UINT
y
,
UINT
width
,
UINT
height
,
IWICBitmap
**
ppIBitmap
)
{
...
...
@@ -344,7 +347,7 @@ static HRESULT WINAPI ImagingFactory_CreateBitmapFromSourceRect(IWICImagingFacto
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateBitmapFromMemory
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapFromMemory
(
IWICComponent
Factory
*
iface
,
UINT
uiWidth
,
UINT
uiHeight
,
REFWICPixelFormatGUID
pixelFormat
,
UINT
cbStride
,
UINT
cbBufferSize
,
BYTE
*
pbBuffer
,
IWICBitmap
**
ppIBitmap
)
{
...
...
@@ -353,7 +356,7 @@ static HRESULT WINAPI ImagingFactory_CreateBitmapFromMemory(IWICImagingFactory *
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateBitmapFromHBITMAP
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapFromHBITMAP
(
IWICComponent
Factory
*
iface
,
HBITMAP
hBitmap
,
HPALETTE
hPalette
,
WICBitmapAlphaChannelOption
options
,
IWICBitmap
**
ppIBitmap
)
{
...
...
@@ -361,37 +364,37 @@ static HRESULT WINAPI ImagingFactory_CreateBitmapFromHBITMAP(IWICImagingFactory
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateBitmapFromHICON
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateBitmapFromHICON
(
IWICComponent
Factory
*
iface
,
HICON
hIcon
,
IWICBitmap
**
ppIBitmap
)
{
FIXME
(
"(%p,%p,%p): stub
\n
"
,
iface
,
hIcon
,
ppIBitmap
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateComponentEnumerator
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateComponentEnumerator
(
IWICComponent
Factory
*
iface
,
DWORD
componentTypes
,
DWORD
options
,
IEnumUnknown
**
ppIEnumUnknown
)
{
TRACE
(
"(%p,%u,%u,%p)
\n
"
,
iface
,
componentTypes
,
options
,
ppIEnumUnknown
);
return
CreateComponentEnumerator
(
componentTypes
,
options
,
ppIEnumUnknown
);
}
static
HRESULT
WINAPI
Imaging
Factory_CreateFastMetadataEncoderFromDecoder
(
IWIC
Imaging
Factory
*
iface
,
IWICBitmapDecoder
*
pIDecoder
,
static
HRESULT
WINAPI
Component
Factory_CreateFastMetadataEncoderFromDecoder
(
IWIC
Component
Factory
*
iface
,
IWICBitmapDecoder
*
pIDecoder
,
IWICFastMetadataEncoder
**
ppIFastEncoder
)
{
FIXME
(
"(%p,%p,%p): stub
\n
"
,
iface
,
pIDecoder
,
ppIFastEncoder
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Imaging
Factory_CreateFastMetadataEncoderFromFrameDecode
(
IWIC
Imaging
Factory
*
iface
,
IWICBitmapFrameDecode
*
pIFrameDecoder
,
static
HRESULT
WINAPI
Component
Factory_CreateFastMetadataEncoderFromFrameDecode
(
IWIC
Component
Factory
*
iface
,
IWICBitmapFrameDecode
*
pIFrameDecoder
,
IWICFastMetadataEncoder
**
ppIFastEncoder
)
{
FIXME
(
"(%p,%p,%p): stub
\n
"
,
iface
,
pIFrameDecoder
,
ppIFastEncoder
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateQueryWriter
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateQueryWriter
(
IWICComponent
Factory
*
iface
,
REFGUID
guidMetadataFormat
,
const
GUID
*
pguidVendor
,
IWICMetadataQueryWriter
**
ppIQueryWriter
)
{
...
...
@@ -400,7 +403,7 @@ static HRESULT WINAPI ImagingFactory_CreateQueryWriter(IWICImagingFactory *iface
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ImagingFactory_CreateQueryWriterFromReader
(
IWICImaging
Factory
*
iface
,
static
HRESULT
WINAPI
ComponentFactory_CreateQueryWriterFromReader
(
IWICComponent
Factory
*
iface
,
IWICMetadataQueryReader
*
pIQueryReader
,
const
GUID
*
pguidVendor
,
IWICMetadataQueryWriter
**
ppIQueryWriter
)
{
...
...
@@ -409,40 +412,98 @@ static HRESULT WINAPI ImagingFactory_CreateQueryWriterFromReader(IWICImagingFact
return
E_NOTIMPL
;
}
static
const
IWICImagingFactoryVtbl
ImagingFactory_Vtbl
=
{
ImagingFactory_QueryInterface
,
ImagingFactory_AddRef
,
ImagingFactory_Release
,
ImagingFactory_CreateDecoderFromFilename
,
ImagingFactory_CreateDecoderFromStream
,
ImagingFactory_CreateDecoderFromFileHandle
,
ImagingFactory_CreateComponentInfo
,
ImagingFactory_CreateDecoder
,
ImagingFactory_CreateEncoder
,
ImagingFactory_CreatePalette
,
ImagingFactory_CreateFormatConverter
,
ImagingFactory_CreateBitmapScaler
,
ImagingFactory_CreateBitmapClipper
,
ImagingFactory_CreateBitmapFlipRotator
,
ImagingFactory_CreateStream
,
ImagingFactory_CreateColorContext
,
ImagingFactory_CreateColorTransformer
,
ImagingFactory_CreateBitmap
,
ImagingFactory_CreateBitmapFromSource
,
ImagingFactory_CreateBitmapFromSourceRect
,
ImagingFactory_CreateBitmapFromMemory
,
ImagingFactory_CreateBitmapFromHBITMAP
,
ImagingFactory_CreateBitmapFromHICON
,
ImagingFactory_CreateComponentEnumerator
,
ImagingFactory_CreateFastMetadataEncoderFromDecoder
,
ImagingFactory_CreateFastMetadataEncoderFromFrameDecode
,
ImagingFactory_CreateQueryWriter
,
ImagingFactory_CreateQueryWriterFromReader
static
HRESULT
WINAPI
ComponentFactory_CreateMetadataReader
(
IWICComponentFactory
*
iface
,
REFGUID
format
,
const
GUID
*
vendor
,
DWORD
options
,
IStream
*
stream
,
IWICMetadataReader
**
reader
)
{
FIXME
(
"%p,%s,%s,%x,%p,%p: stub
\n
"
,
iface
,
debugstr_guid
(
format
),
debugstr_guid
(
vendor
),
options
,
stream
,
reader
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ComponentFactory_CreateMetadataReaderFromContainer
(
IWICComponentFactory
*
iface
,
REFGUID
format
,
const
GUID
*
vendor
,
DWORD
options
,
IStream
*
stream
,
IWICMetadataReader
**
reader
)
{
FIXME
(
"%p,%s,%s,%x,%p,%p: stub
\n
"
,
iface
,
debugstr_guid
(
format
),
debugstr_guid
(
vendor
),
options
,
stream
,
reader
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ComponentFactory_CreateMetadataWriter
(
IWICComponentFactory
*
iface
,
REFGUID
format
,
const
GUID
*
vendor
,
DWORD
options
,
IWICMetadataWriter
**
writer
)
{
FIXME
(
"%p,%s,%s,%x,%p: stub
\n
"
,
iface
,
debugstr_guid
(
format
),
debugstr_guid
(
vendor
),
options
,
writer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ComponentFactory_CreateMetadataWriterFromReader
(
IWICComponentFactory
*
iface
,
IWICMetadataReader
*
reader
,
const
GUID
*
vendor
,
IWICMetadataWriter
**
writer
)
{
FIXME
(
"%p,%p,%s,%p: stub
\n
"
,
iface
,
reader
,
debugstr_guid
(
vendor
),
writer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ComponentFactory_CreateQueryReaderFromBlockReader
(
IWICComponentFactory
*
iface
,
IWICMetadataBlockReader
*
block_reader
,
IWICMetadataQueryReader
**
query_reader
)
{
FIXME
(
"%p,%p,%p: stub
\n
"
,
iface
,
block_reader
,
query_reader
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ComponentFactory_CreateQueryWriterFromBlockWriter
(
IWICComponentFactory
*
iface
,
IWICMetadataBlockWriter
*
block_writer
,
IWICMetadataQueryWriter
**
query_writer
)
{
FIXME
(
"%p,%p,%p: stub
\n
"
,
iface
,
block_writer
,
query_writer
);
return
E_NOTIMPL
;
}
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
;
}
static
const
IWICComponentFactoryVtbl
ComponentFactory_Vtbl
=
{
ComponentFactory_QueryInterface
,
ComponentFactory_AddRef
,
ComponentFactory_Release
,
ComponentFactory_CreateDecoderFromFilename
,
ComponentFactory_CreateDecoderFromStream
,
ComponentFactory_CreateDecoderFromFileHandle
,
ComponentFactory_CreateComponentInfo
,
ComponentFactory_CreateDecoder
,
ComponentFactory_CreateEncoder
,
ComponentFactory_CreatePalette
,
ComponentFactory_CreateFormatConverter
,
ComponentFactory_CreateBitmapScaler
,
ComponentFactory_CreateBitmapClipper
,
ComponentFactory_CreateBitmapFlipRotator
,
ComponentFactory_CreateStream
,
ComponentFactory_CreateColorContext
,
ComponentFactory_CreateColorTransformer
,
ComponentFactory_CreateBitmap
,
ComponentFactory_CreateBitmapFromSource
,
ComponentFactory_CreateBitmapFromSourceRect
,
ComponentFactory_CreateBitmapFromMemory
,
ComponentFactory_CreateBitmapFromHBITMAP
,
ComponentFactory_CreateBitmapFromHICON
,
ComponentFactory_CreateComponentEnumerator
,
ComponentFactory_CreateFastMetadataEncoderFromDecoder
,
ComponentFactory_CreateFastMetadataEncoderFromFrameDecode
,
ComponentFactory_CreateQueryWriter
,
ComponentFactory_CreateQueryWriterFromReader
,
ComponentFactory_CreateMetadataReader
,
ComponentFactory_CreateMetadataReaderFromContainer
,
ComponentFactory_CreateMetadataWriter
,
ComponentFactory_CreateMetadataWriterFromReader
,
ComponentFactory_CreateQueryReaderFromBlockReader
,
ComponentFactory_CreateQueryWriterFromBlockWriter
,
ComponentFactory_CreateEncoderPropertyBag
};
HRESULT
Imaging
Factory_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
HRESULT
Component
Factory_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
{
Imaging
Factory
*
This
;
Component
Factory
*
This
;
HRESULT
ret
;
TRACE
(
"(%p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppv
);
...
...
@@ -451,10 +512,10 @@ HRESULT ImagingFactory_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** pp
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
Imaging
Factory
));
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
Component
Factory
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IWIC
ImagingFactory_iface
.
lpVtbl
=
&
Imaging
Factory_Vtbl
;
This
->
IWIC
ComponentFactory_iface
.
lpVtbl
=
&
Component
Factory_Vtbl
;
This
->
ref
=
1
;
ret
=
IUnknown_QueryInterface
((
IUnknown
*
)
This
,
iid
,
ppv
);
...
...
dlls/windowscodecs/proxy.c
View file @
50d53928
...
...
@@ -624,5 +624,5 @@ HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT SDKVersion, IWICImagingFactory
{
TRACE
(
"%x, %p
\n
"
,
SDKVersion
,
ppIImagingFactory
);
return
Imaging
Factory_CreateInstance
(
NULL
,
&
IID_IWICImagingFactory
,
(
void
**
)
ppIImagingFactory
);
return
Component
Factory_CreateInstance
(
NULL
,
&
IID_IWICImagingFactory
,
(
void
**
)
ppIImagingFactory
);
}
dlls/windowscodecs/tests/metadata.c
View file @
50d53928
...
...
@@ -441,15 +441,16 @@ static void test_create_reader(void)
hr
=
CoCreateInstance
(
&
CLSID_WICImagingFactory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICComponentFactory
,
(
void
**
)
&
factory
);
todo_wine
ok
(
hr
==
S_OK
,
"CoCreateInstance failed, hr=%x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
return
;
ok
(
hr
==
S_OK
,
"CoCreateInstance failed, hr=%x
\n
"
,
hr
);
stream
=
create_stream
(
metadata_tEXt
,
sizeof
(
metadata_tEXt
));
hr
=
IWICComponentFactory_CreateMetadataReaderFromContainer
(
factory
,
&
GUID_ContainerFormatPng
,
NULL
,
WICPersistOptionsDefault
,
stream
,
&
reader
);
todo_wine
ok
(
hr
==
S_OK
,
"CreateMetadataReaderFromContainer failed, hr=%x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
return
;
if
(
SUCCEEDED
(
hr
))
{
...
...
dlls/windowscodecs/wincodecs_private.h
View file @
50d53928
...
...
@@ -28,7 +28,7 @@ DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47
DEFINE_GUID
(
GUID_VendorWine
,
0xddf46da1
,
0x7dc1
,
0x404e
,
0x98
,
0xf2
,
0xef
,
0xa4
,
0x8d
,
0xfc
,
0x95
,
0x0a
);
extern
HRESULT
FormatConverter_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
Imaging
Factory_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
Component
Factory_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
BmpDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
PngDecoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
PngEncoder_CreateInstance
(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment