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
f623042f
Commit
f623042f
authored
Mar 05, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Make it possible to use MetadataReaders when COM was not initialized.
parent
ca5c0f6b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
19 deletions
+18
-19
clsfactory.c
dlls/windowscodecs/clsfactory.c
+1
-1
gifformat.c
dlls/windowscodecs/gifformat.c
+15
-16
tiffformat.c
dlls/windowscodecs/tiffformat.c
+1
-2
wincodecs_private.h
dlls/windowscodecs/wincodecs_private.h
+1
-0
No files found.
dlls/windowscodecs/clsfactory.c
View file @
f623042f
...
...
@@ -41,7 +41,7 @@ extern HRESULT WINAPI WIC_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC
typedef
struct
{
REFCLSID
classid
;
HRESULT
(
*
constructor
)(
REFIID
,
void
**
)
;
class_constructor
constructor
;
}
classinfo
;
static
const
classinfo
wic_classes
[]
=
{
...
...
dlls/windowscodecs/gifformat.c
View file @
f623042f
...
...
@@ -545,7 +545,8 @@ static IStream *create_stream(const void *data, int data_size)
}
static
HRESULT
create_metadata_reader
(
const
void
*
data
,
int
data_size
,
const
CLSID
*
clsid
,
IWICMetadataReader
**
reader
)
class_constructor
constructor
,
IWICMetadataReader
**
reader
)
{
HRESULT
hr
;
IWICMetadataReader
*
metadata_reader
;
...
...
@@ -554,8 +555,7 @@ static HRESULT create_metadata_reader(const void *data, int data_size,
/* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */
hr
=
CoCreateInstance
(
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICMetadataReader
,
(
void
**
)
&
metadata_reader
);
hr
=
constructor
(
&
IID_IWICMetadataReader
,
(
void
**
)
&
metadata_reader
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IWICMetadataReader_QueryInterface
(
metadata_reader
,
&
IID_IWICPersistStream
,
(
void
**
)
&
persist
);
...
...
@@ -900,8 +900,7 @@ static HRESULT create_IMD_metadata_reader(GifFrameDecode *This, IWICMetadataRead
/* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */
hr
=
CoCreateInstance
(
&
CLSID_WICIMDMetadataReader
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICMetadataReader
,
(
void
**
)
&
metadata_reader
);
hr
=
IMDReader_CreateInstance
(
&
IID_IWICMetadataReader
,
(
void
**
)
&
metadata_reader
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IWICMetadataReader_QueryInterface
(
metadata_reader
,
&
IID_IWICPersistStream
,
(
void
**
)
&
persist
);
...
...
@@ -957,7 +956,7 @@ static HRESULT WINAPI GifFrameDecode_Block_GetReaderByIndex(IWICMetadataBlockRea
for
(
i
=
0
;
i
<
This
->
frame
->
Extensions
.
ExtensionBlockCount
;
i
++
)
{
c
onst
CLSID
*
clsid
;
c
lass_constructor
constructor
;
const
void
*
data
;
int
data_size
;
...
...
@@ -971,24 +970,24 @@ static HRESULT WINAPI GifFrameDecode_Block_GetReaderByIndex(IWICMetadataBlockRea
}
else
if
(
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
Function
==
COMMENT_EXT_FUNC_CODE
)
{
c
lsid
=
&
CLSID_WICGifCommentMetadataReader
;
c
onstructor
=
GifCommentReader_CreateInstance
;
data
=
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
Bytes
;
data_size
=
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
ByteCount
;
}
else
{
c
lsid
=
&
CLSID_WICUnknownMetadataReader
;
c
onstructor
=
UnknownMetadataReader_CreateInstance
;
data
=
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
Bytes
;
data_size
=
This
->
frame
->
Extensions
.
ExtensionBlocks
[
i
].
ByteCount
;
}
return
create_metadata_reader
(
data
,
data_size
,
c
lsid
,
reader
);
return
create_metadata_reader
(
data
,
data_size
,
c
onstructor
,
reader
);
}
if
(
gce_index
==
-
1
)
return
E_INVALIDARG
;
return
create_metadata_reader
(
This
->
frame
->
Extensions
.
ExtensionBlocks
[
gce_index
].
Bytes
+
3
,
This
->
frame
->
Extensions
.
ExtensionBlocks
[
gce_index
].
ByteCount
-
4
,
&
CLSID_WICGCEMetadataReader
,
reader
);
GCEReader_CreateInstance
,
reader
);
}
static
HRESULT
WINAPI
GifFrameDecode_Block_GetEnumerator
(
IWICMetadataBlockReader
*
iface
,
...
...
@@ -1376,24 +1375,24 @@ static HRESULT WINAPI GifDecoder_Block_GetReaderByIndex(IWICMetadataBlockReader
if
(
index
==
0
)
return
create_metadata_reader
(
This
->
LSD_data
,
sizeof
(
This
->
LSD_data
),
&
CLSID_WICLSDMetadataReader
,
reader
);
LSDReader_CreateInstance
,
reader
);
for
(
i
=
0
;
i
<
This
->
gif
->
Extensions
.
ExtensionBlockCount
;
i
++
)
{
c
onst
CLSID
*
clsid
;
c
lass_constructor
constructor
;
if
(
index
!=
i
+
1
)
continue
;
if
(
This
->
gif
->
Extensions
.
ExtensionBlocks
[
i
].
Function
==
APPLICATION_EXT_FUNC_CODE
)
c
lsid
=
&
CLSID_WICAPEMetadataReader
;
c
onstructor
=
APEReader_CreateInstance
;
else
if
(
This
->
gif
->
Extensions
.
ExtensionBlocks
[
i
].
Function
==
COMMENT_EXT_FUNC_CODE
)
c
lsid
=
&
CLSID_WICGifCommentMetadataReader
;
c
onstructor
=
GifCommentReader_CreateInstance
;
else
c
lsid
=
&
CLSID_WICUnknownMetadataReader
;
c
onstructor
=
UnknownMetadataReader_CreateInstance
;
return
create_metadata_reader
(
This
->
gif
->
Extensions
.
ExtensionBlocks
[
i
].
Bytes
,
This
->
gif
->
Extensions
.
ExtensionBlocks
[
i
].
ByteCount
,
c
lsid
,
reader
);
c
onstructor
,
reader
);
}
return
E_INVALIDARG
;
...
...
dlls/windowscodecs/tiffformat.c
View file @
f623042f
...
...
@@ -1223,8 +1223,7 @@ static HRESULT create_metadata_reader(TiffFrameDecode *This, IWICMetadataReader
/* FIXME: Use IWICComponentFactory_CreateMetadataReader once it's implemented */
hr
=
CoCreateInstance
(
&
CLSID_WICIfdMetadataReader
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IWICMetadataReader
,
(
void
**
)
&
metadata_reader
);
hr
=
IfdMetadataReader_CreateInstance
(
&
IID_IWICMetadataReader
,
(
void
**
)
&
metadata_reader
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IWICMetadataReader_QueryInterface
(
metadata_reader
,
&
IID_IWICPersistStream
,
(
void
**
)
&
persist
);
...
...
dlls/windowscodecs/wincodecs_private.h
View file @
f623042f
...
...
@@ -67,6 +67,7 @@ DECLARE_INTERFACE_(IMILUnknown2,IUnknown)
};
#undef INTERFACE
typedef
HRESULT
(
*
class_constructor
)(
REFIID
,
void
**
);
extern
HRESULT
FormatConverter_CreateInstance
(
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
ComponentFactory_CreateInstance
(
REFIID
riid
,
void
**
ppv
)
DECLSPEC_HIDDEN
;
extern
HRESULT
BmpDecoder_CreateInstance
(
REFIID
riid
,
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