Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
219b8c64
Commit
219b8c64
authored
Aug 04, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement IWICImagingFactory::CreateDecoderFromStream.
parent
9dd3c209
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
2 deletions
+68
-2
imgfactory.c
dlls/windowscodecs/imgfactory.c
+68
-2
No files found.
dlls/windowscodecs/imgfactory.c
View file @
219b8c64
...
...
@@ -98,9 +98,75 @@ static HRESULT WINAPI ImagingFactory_CreateDecoderFromStream(
IWICImagingFactory
*
iface
,
IStream
*
pIStream
,
const
GUID
*
pguidVendor
,
WICDecodeOptions
metadataOptions
,
IWICBitmapDecoder
**
ppIDecoder
)
{
FIXME
(
"(%p,%p,%s,%u,%p): stub
\n
"
,
iface
,
pIStream
,
debugstr_guid
(
pguidVendor
),
static
int
fixme
=
0
;
IEnumUnknown
*
enumdecoders
;
IUnknown
*
unkdecoderinfo
;
IWICBitmapDecoderInfo
*
decoderinfo
;
IWICBitmapDecoder
*
decoder
=
NULL
;
HRESULT
res
=
S_OK
;
ULONG
num_fetched
;
BOOL
matches
;
TRACE
(
"(%p,%p,%s,%u,%p)
\n
"
,
iface
,
pIStream
,
debugstr_guid
(
pguidVendor
),
metadataOptions
,
ppIDecoder
);
return
E_NOTIMPL
;
if
(
pguidVendor
&&
!
fixme
++
)
FIXME
(
"ignoring vendor GUID
\n
"
);
res
=
CreateComponentEnumerator
(
WICDecoder
,
WICComponentEnumerateDefault
,
&
enumdecoders
);
if
(
FAILED
(
res
))
return
res
;
while
(
!
decoder
)
{
res
=
IEnumUnknown_Next
(
enumdecoders
,
1
,
&
unkdecoderinfo
,
&
num_fetched
);
if
(
res
==
S_OK
)
{
res
=
IUnknown_QueryInterface
(
unkdecoderinfo
,
&
IID_IWICBitmapDecoderInfo
,
(
void
**
)
&
decoderinfo
);
if
(
SUCCEEDED
(
res
))
{
res
=
IWICBitmapDecoderInfo_MatchesPattern
(
decoderinfo
,
pIStream
,
&
matches
);
if
(
SUCCEEDED
(
res
)
&&
matches
)
{
res
=
IWICBitmapDecoderInfo_CreateInstance
(
decoderinfo
,
&
decoder
);
/* FIXME: should use QueryCapability to choose a decoder */
if
(
SUCCEEDED
(
res
))
{
res
=
IWICBitmapDecoder_Initialize
(
decoder
,
pIStream
,
metadataOptions
);
if
(
FAILED
(
res
))
{
IWICBitmapDecoder_Release
(
decoder
);
decoder
=
NULL
;
}
}
}
IWICBitmapDecoderInfo_Release
(
decoderinfo
);
}
IUnknown_Release
(
unkdecoderinfo
);
}
else
break
;
}
IEnumUnknown_Release
(
enumdecoders
);
if
(
decoder
)
{
*
ppIDecoder
=
decoder
;
return
S_OK
;
}
else
{
*
ppIDecoder
=
NULL
;
return
WINCODEC_ERR_COMPONENTNOTFOUND
;
}
}
static
HRESULT
WINAPI
ImagingFactory_CreateDecoderFromFileHandle
(
...
...
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