From 781113f4daa025b3e44ed3fe46b7a6507df83b16 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 8 Jun 2012 14:08:52 +0900 Subject: [PATCH] windowscodecs: Add WICIfdMetadataReader stub implementation. --- dlls/windowscodecs/clsfactory.c | 1 + dlls/windowscodecs/metadatahandler.c | 24 +++++++++++++++++++++++- dlls/windowscodecs/wincodecs_private.h | 3 +-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/dlls/windowscodecs/clsfactory.c b/dlls/windowscodecs/clsfactory.c index e55ce0c5ee2..40c8df38f1d 100644 --- a/dlls/windowscodecs/clsfactory.c +++ b/dlls/windowscodecs/clsfactory.c @@ -60,6 +60,7 @@ static classinfo wic_classes[] = { {&CLSID_WICDefaultFormatConverter, FormatConverter_CreateInstance}, {&CLSID_WineTgaDecoder, TgaDecoder_CreateInstance}, {&CLSID_WICUnknownMetadataReader, UnknownMetadataReader_CreateInstance}, + {&CLSID_WICIfdMetadataReader, IfdMetadataReader_CreateInstance}, {0}}; typedef struct { diff --git a/dlls/windowscodecs/metadatahandler.c b/dlls/windowscodecs/metadatahandler.c index da70b1c7d1f..a4dc1744159 100644 --- a/dlls/windowscodecs/metadatahandler.c +++ b/dlls/windowscodecs/metadatahandler.c @@ -325,7 +325,7 @@ static const IWICPersistStreamVtbl MetadataHandler_PersistStream_Vtbl = { MetadataHandler_SaveEx }; -HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv) +static HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv) { MetadataHandler *This; HRESULT hr; @@ -597,3 +597,25 @@ HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, vo { return MetadataReader_Create(&UnknownMetadataReader_Vtbl, pUnkOuter, iid, ppv); } + +static HRESULT LoadIfdMetadata(IStream *input, const GUID *preferred_vendor, + DWORD persist_options, MetadataItem **items, DWORD *item_count) +{ + FIXME("stub\n"); + + *items = NULL; + *item_count = 0; + + return S_OK; +} + +static const MetadataHandlerVtbl IfdMetadataReader_Vtbl = { + 0, + &CLSID_WICIfdMetadataReader, + LoadIfdMetadata +}; + +HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) +{ + return MetadataReader_Create(&IfdMetadataReader_Vtbl, pUnkOuter, iid, ppv); +} diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index 5c21afc0c4c..92fa7efe5b0 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -84,8 +84,7 @@ typedef struct _MetadataHandlerVtbl ULARGE_INTEGER *size); } MetadataHandlerVtbl; -extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; - extern HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; #endif /* WINCODECS_PRIVATE_H */