26#define NONAMELESSUNION
30#include "wine/winternl.h"
64 for (
i=0;
i<
This->item_count;
i++)
87 (
IsEqualIID(&IID_IWICMetadataWriter, iid) &&
This->vtable->is_writer))
89 *
ppv = &
This->IWICMetadataWriter_iface;
95 *
ppv = &
This->IWICPersistStream_iface;
112 TRACE(
"(%p) refcount=%u\n", iface,
ref);
122 TRACE(
"(%p) refcount=%u\n", iface,
ref);
127 This->lock.DebugInfo->Spare[0] = 0;
142 TRACE(
"%p,%p\n", iface, ppIHandler);
147 hr = IWICComponentInfo_QueryInterface(component_info, &IID_IWICMetadataHandlerInfo,
148 (
void **)ppIHandler);
150 IWICComponentInfo_Release(component_info);
155 GUID *pguidMetadataFormat)
160 TRACE(
"%p,%p\n", iface, pguidMetadataFormat);
167 hr = IWICMetadataHandlerInfo_GetMetadataFormat(metadata_info, pguidMetadataFormat);
168 IWICMetadataHandlerInfo_Release(metadata_info);
178 TRACE(
"%p,%p\n", iface, pcCount);
182 *pcCount =
This->item_count;
216 const PROPVARIANT *
schema,
const PROPVARIANT *
id, PROPVARIANT *
value)
228 for (
i = 0;
i <
This->item_count;
i++)
249 TRACE(
"(%p,%p)\n", iface, ppIEnumMetadata);
254 const PROPVARIANT *pvarSchema,
const PROPVARIANT *pvarId,
const PROPVARIANT *pvarValue)
256 FIXME(
"(%p,%p,%p,%p): stub\n", iface, pvarSchema, pvarId, pvarValue);
261 UINT nIndex,
const PROPVARIANT *pvarSchema,
const PROPVARIANT *pvarId,
const PROPVARIANT *pvarValue)
263 FIXME(
"(%p,%u,%p,%p,%p): stub\n", iface, nIndex, pvarSchema, pvarId, pvarValue);
268 const PROPVARIANT *pvarSchema,
const PROPVARIANT *pvarId)
270 FIXME(
"(%p,%p,%p): stub\n", iface, pvarSchema, pvarId);
277 FIXME(
"(%p,%u): stub\n", iface, nIndex);
301 return IWICMetadataWriter_QueryInterface(&
This->IWICMetadataWriter_iface, iid,
ppv);
307 return IWICMetadataWriter_AddRef(&
This->IWICMetadataWriter_iface);
313 return IWICMetadataWriter_Release(&
This->IWICMetadataWriter_iface);
319 FIXME(
"(%p,%p): stub\n", iface, pClassID);
325 FIXME(
"(%p): stub\n", iface);
333 TRACE(
"(%p,%p)\n", iface, pStm);
340 FIXME(
"(%p,%p,%i): stub\n", iface, pStm, fClearDirty);
347 FIXME(
"(%p,%p): stub\n", iface, pcbSize);
352 IStream *pIStream,
const GUID *pguidPreferredVendor,
DWORD dwPersistOptions)
359 TRACE(
"(%p,%p,%s,%x)\n", iface, pIStream,
debugstr_guid(pguidPreferredVendor), dwPersistOptions);
363 hr =
This->vtable->fnLoad(pIStream, pguidPreferredVendor, dwPersistOptions,
364 &new_items, &item_count);
369 This->items = new_items;
370 This->item_count = item_count;
381 FIXME(
"(%p,%p,%x,%i): stub\n", iface, pIStream, dwPersistOptions, fClearDirty);
415 This->item_count = 0;
418 This->lock.DebugInfo->Spare[0] = (
DWORD_PTR)(__FILE__
": MetadataHandler.lock");
420 hr = IWICMetadataWriter_QueryInterface(&
This->IWICMetadataWriter_iface, iid,
ppv);
422 IWICMetadataWriter_Release(&
This->IWICMetadataWriter_iface);
450 *
ppv = &
This->IWICEnumMetadataItem_iface;
467 TRACE(
"(%p) refcount=%u\n", iface,
ref);
477 TRACE(
"(%p) refcount=%u\n", iface,
ref);
481 IWICMetadataWriter_Release(&
This->parent->IWICMetadataWriter_iface);
489 ULONG celt, PROPVARIANT *rgeltSchema, PROPVARIANT *rgeltId,
490 PROPVARIANT *rgeltValue,
ULONG *pceltFetched)
497 TRACE(
"(%p,%i)\n", iface, celt);
501 if (
This->index >=
This->parent->item_count)
508 new_index =
min(
This->parent->item_count,
This->index + celt);
509 *pceltFetched = new_index -
This->index;
528 This->index = new_index;
595 *ppIEnumMetadataItem =
NULL;
600 IWICMetadataWriter_AddRef(&
parent->IWICMetadataWriter_iface);
607 *ppIEnumMetadataItem = &
This->IWICEnumMetadataItem_iface;
646 PropVariantInit(&
result[0].
id);
650 result[0].value.u.blob.cbSize = bytesread;
661 &CLSID_WICUnknownMetadataReader,
670#define SWAP_USHORT(x) do { if (!native_byte_order) (x) = RtlUshortByteSwap(x); } while(0)
671#define SWAP_ULONG(x) do { if (!native_byte_order) (x) = RtlUlongByteSwap(x); } while(0)
672#define SWAP_ULONGLONG(x) do { if (!native_byte_order) (x) = RtlUlonglongByteSwap(x); } while(0)
686#define IFD_RATIONAL 5
688#define IFD_UNDEFINED 7
691#define IFD_SRATIONAL 10
698 static const int tag2vt[] =
863 FIXME(
"IFD field type %d, count 0\n",
type);
879 item->value.u.uhVal.QuadPart = ull;
928 const char *
data = (
const char *)&
entry->value;
952 FIXME(
"IFD field type %d, count 0\n",
type);
964 const char *
data = (
const char *)&
entry->value;
984 FIXME(
"loading field of type %d, count %u is not implemented\n",
type,
count);
1002#ifdef WORDS_BIGENDIAN
1007 native_byte_order =
FALSE;
1027 for (
i = 0;
i < 4096;
i++)
1029 ULONG next_ifd_offset;
1033 hr = IStream_Read(
input, &next_ifd_offset,
sizeof(next_ifd_offset), &bytesread);
1034 if (bytesread !=
sizeof(next_ifd_offset))
hr =
E_FAIL;
1038 if (!next_ifd_offset)
break;
1040 pos.QuadPart = next_ifd_offset;
1044 hr = IStream_Read(
input, &next_ifd_count,
sizeof(next_ifd_count), &bytesread);
1045 if (bytesread !=
sizeof(next_ifd_count))
hr =
E_FAIL;
1050 pos.QuadPart = next_ifd_count *
sizeof(*entry);
1082 *item_count =
count;
1089 &CLSID_WICIfdMetadataReader,
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
INT WINAPI PropVariantCompareEx(REFPROPVARIANT propvar1, REFPROPVARIANT propvar2, PROPVAR_COMPARE_UNIT unit, PROPVAR_COMPARE_FLAGS flags)
HRESULT CreateComponentInfo(REFCLSID clsid, IWICComponentInfo **ppIInfo)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
const GUID IID_IPersistStream
#define IsEqualIID(riid1, riid2)
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define CONTAINING_RECORD(address, type, field)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
@ WICPersistOptionBigEndian
@ WICPersistOptionDefault
@ WICPersistOptionLittleEndian
#define WINCODEC_ERR_BADMETADATAHEADER
#define WINCODEC_ERR_PROPERTYNOTFOUND