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
938d00cd
Commit
938d00cd
authored
Nov 29, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement GetContainerFormat() for encoders.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8d75d949
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
8 deletions
+50
-8
bmpencode.c
dlls/windowscodecs/bmpencode.c
+5
-0
jpegformat.c
dlls/windowscodecs/jpegformat.c
+8
-4
pngformat.c
dlls/windowscodecs/pngformat.c
+8
-4
converter.c
dlls/windowscodecs/tests/converter.c
+24
-0
tiffformat.c
dlls/windowscodecs/tiffformat.c
+5
-0
No files found.
dlls/windowscodecs/bmpencode.c
View file @
938d00cd
...
...
@@ -472,6 +472,11 @@ static HRESULT WINAPI BmpEncoder_Initialize(IWICBitmapEncoder *iface,
static
HRESULT
WINAPI
BmpEncoder_GetContainerFormat
(
IWICBitmapEncoder
*
iface
,
GUID
*
pguidContainerFormat
)
{
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pguidContainerFormat
);
if
(
!
pguidContainerFormat
)
return
E_INVALIDARG
;
memcpy
(
pguidContainerFormat
,
&
GUID_ContainerFormatBmp
,
sizeof
(
GUID
));
return
S_OK
;
}
...
...
dlls/windowscodecs/jpegformat.c
View file @
938d00cd
...
...
@@ -1381,11 +1381,15 @@ static HRESULT WINAPI JpegEncoder_Initialize(IWICBitmapEncoder *iface,
return
S_OK
;
}
static
HRESULT
WINAPI
JpegEncoder_GetContainerFormat
(
IWICBitmapEncoder
*
iface
,
GUID
*
pguidContainerFormat
)
static
HRESULT
WINAPI
JpegEncoder_GetContainerFormat
(
IWICBitmapEncoder
*
iface
,
GUID
*
format
)
{
FIXME
(
"(%p,%s): stub
\n
"
,
iface
,
debugstr_guid
(
pguidContainerFormat
));
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
format
);
if
(
!
format
)
return
E_INVALIDARG
;
memcpy
(
format
,
&
GUID_ContainerFormatJpeg
,
sizeof
(
*
format
));
return
S_OK
;
}
static
HRESULT
WINAPI
JpegEncoder_GetEncoderInfo
(
IWICBitmapEncoder
*
iface
,
...
...
dlls/windowscodecs/pngformat.c
View file @
938d00cd
...
...
@@ -1968,11 +1968,15 @@ static HRESULT WINAPI PngEncoder_Initialize(IWICBitmapEncoder *iface,
return
S_OK
;
}
static
HRESULT
WINAPI
PngEncoder_GetContainerFormat
(
IWICBitmapEncoder
*
iface
,
GUID
*
pguidContainerFormat
)
static
HRESULT
WINAPI
PngEncoder_GetContainerFormat
(
IWICBitmapEncoder
*
iface
,
GUID
*
format
)
{
FIXME
(
"(%p,%s): stub
\n
"
,
iface
,
debugstr_guid
(
pguidContainerFormat
));
return
E_NOTIMPL
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
format
);
if
(
!
format
)
return
E_INVALIDARG
;
memcpy
(
format
,
&
GUID_ContainerFormatPng
,
sizeof
(
*
format
));
return
S_OK
;
}
static
HRESULT
WINAPI
PngEncoder_GetEncoderInfo
(
IWICBitmapEncoder
*
iface
,
...
...
dlls/windowscodecs/tests/converter.c
View file @
938d00cd
...
...
@@ -849,6 +849,7 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
const
struct
bitmap_data
**
dsts
,
const
CLSID
*
clsid_decoder
,
WICRect
*
rc
,
const
struct
setting
*
settings
,
const
char
*
name
,
IWICPalette
*
palette
)
{
const
GUID
*
container_format
=
NULL
;
HRESULT
hr
;
IWICBitmapEncoder
*
encoder
;
BitmapTestSrc
*
src_obj
;
...
...
@@ -859,6 +860,7 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
IWICBitmapDecoder
*
decoder
;
IWICBitmapFrameDecode
*
framedecode
;
WICPixelFormatGUID
pixelformat
;
GUID
guid
;
int
i
;
hr
=
CoCreateInstance
(
clsid_encoder
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
@@ -868,6 +870,28 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
stream
);
ok
(
SUCCEEDED
(
hr
),
"CreateStreamOnHGlobal failed, hr=%x
\n
"
,
hr
);
hr
=
IWICBitmapEncoder_GetContainerFormat
(
encoder
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
if
(
IsEqualGUID
(
clsid_encoder
,
&
CLSID_WICPngEncoder
))
container_format
=
&
GUID_ContainerFormatPng
;
else
if
(
IsEqualGUID
(
clsid_encoder
,
&
CLSID_WICBmpEncoder
))
container_format
=
&
GUID_ContainerFormatBmp
;
else
if
(
IsEqualGUID
(
clsid_encoder
,
&
CLSID_WICTiffEncoder
))
container_format
=
&
GUID_ContainerFormatTiff
;
else
if
(
IsEqualGUID
(
clsid_encoder
,
&
CLSID_WICJpegEncoder
))
container_format
=
&
GUID_ContainerFormatJpeg
;
else
ok
(
0
,
"Unknown encoder %s.
\n
"
,
wine_dbgstr_guid
(
clsid_encoder
));
if
(
container_format
)
{
memset
(
&
guid
,
0
,
sizeof
(
guid
));
hr
=
IWICBitmapEncoder_GetContainerFormat
(
encoder
,
&
guid
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get container format, hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
container_format
,
&
guid
),
"Unexpected container format %s.
\n
"
,
wine_dbgstr_guid
(
&
guid
));
}
hr
=
IWICBitmapEncoder_Initialize
(
encoder
,
stream
,
WICBitmapEncoderNoCache
);
ok
(
SUCCEEDED
(
hr
),
"Initialize failed, hr=%x
\n
"
,
hr
);
...
...
dlls/windowscodecs/tiffformat.c
View file @
938d00cd
...
...
@@ -1884,6 +1884,11 @@ exit:
static
HRESULT
WINAPI
TiffEncoder_GetContainerFormat
(
IWICBitmapEncoder
*
iface
,
GUID
*
pguidContainerFormat
)
{
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pguidContainerFormat
);
if
(
!
pguidContainerFormat
)
return
E_INVALIDARG
;
memcpy
(
pguidContainerFormat
,
&
GUID_ContainerFormatTiff
,
sizeof
(
GUID
));
return
S_OK
;
}
...
...
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