Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
49b98b11
Commit
49b98b11
authored
13 years ago
by
Esme Povirk
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
windowscodecs: Implement IWICBitmapCodecInfo::GetContainerFormat.
parent
8933d91c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/windowscodecs/info.c
+35
-4
35 additions, 4 deletions
dlls/windowscodecs/info.c
dlls/windowscodecs/regsvr.c
+29
-0
29 additions, 0 deletions
dlls/windowscodecs/regsvr.c
with
64 additions
and
4 deletions
dlls/windowscodecs/info.c
+
35
−
4
View file @
49b98b11
...
...
@@ -38,6 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
static
const
WCHAR
mimetypes_valuename
[]
=
{
'M'
,
'i'
,
'm'
,
'e'
,
'T'
,
'y'
,
'p'
,
'e'
,
's'
,
0
};
static
const
WCHAR
pixelformats_keyname
[]
=
{
'P'
,
'i'
,
'x'
,
'e'
,
'l'
,
'F'
,
'o'
,
'r'
,
'm'
,
'a'
,
't'
,
's'
,
0
};
static
const
WCHAR
containerformat_valuename
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'a'
,
'i'
,
'n'
,
'e'
,
'r'
,
'F'
,
'o'
,
'r'
,
'm'
,
'a'
,
't'
,
0
};
static
HRESULT
ComponentInfo_GetStringValue
(
HKEY
classkey
,
LPCWSTR
value
,
UINT
buffer_size
,
WCHAR
*
buffer
,
UINT
*
actual_size
)
...
...
@@ -64,6 +65,34 @@ static HRESULT ComponentInfo_GetStringValue(HKEY classkey, LPCWSTR value,
return
HRESULT_FROM_WIN32
(
ret
);
}
static
HRESULT
ComponentInfo_GetGUIDValue
(
HKEY
classkey
,
LPCWSTR
value
,
GUID
*
result
)
{
LONG
ret
;
WCHAR
guid_string
[
39
];
DWORD
cbdata
=
sizeof
(
guid_string
);
HRESULT
hr
;
if
(
!
result
)
return
E_INVALIDARG
;
ret
=
RegGetValueW
(
classkey
,
NULL
,
value
,
RRF_RT_REG_SZ
|
RRF_NOEXPAND
,
NULL
,
guid_string
,
&
cbdata
);
if
(
ret
!=
ERROR_SUCCESS
)
return
HRESULT_FROM_WIN32
(
ret
);
if
(
cbdata
<
sizeof
(
guid_string
))
{
ERR
(
"incomplete GUID value
\n
"
);
return
E_FAIL
;
}
hr
=
CLSIDFromString
(
guid_string
,
result
);
return
hr
;
}
typedef
struct
{
IWICBitmapDecoderInfo
IWICBitmapDecoderInfo_iface
;
LONG
ref
;
...
...
@@ -191,8 +220,9 @@ static HRESULT WINAPI BitmapDecoderInfo_GetFriendlyName(IWICBitmapDecoderInfo *i
static
HRESULT
WINAPI
BitmapDecoderInfo_GetContainerFormat
(
IWICBitmapDecoderInfo
*
iface
,
GUID
*
pguidContainerFormat
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
pguidContainerFormat
);
return
E_NOTIMPL
;
BitmapDecoderInfo
*
This
=
impl_from_IWICBitmapDecoderInfo
(
iface
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pguidContainerFormat
);
return
ComponentInfo_GetGUIDValue
(
This
->
classkey
,
containerformat_valuename
,
pguidContainerFormat
);
}
static
HRESULT
WINAPI
BitmapDecoderInfo_GetPixelFormats
(
IWICBitmapDecoderInfo
*
iface
,
...
...
@@ -635,8 +665,9 @@ static HRESULT WINAPI BitmapEncoderInfo_GetFriendlyName(IWICBitmapEncoderInfo *i
static
HRESULT
WINAPI
BitmapEncoderInfo_GetContainerFormat
(
IWICBitmapEncoderInfo
*
iface
,
GUID
*
pguidContainerFormat
)
{
FIXME
(
"(%p,%p): stub
\n
"
,
iface
,
pguidContainerFormat
);
return
E_NOTIMPL
;
BitmapEncoderInfo
*
This
=
impl_from_IWICBitmapEncoderInfo
(
iface
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pguidContainerFormat
);
return
ComponentInfo_GetGUIDValue
(
This
->
classkey
,
containerformat_valuename
,
pguidContainerFormat
);
}
static
HRESULT
WINAPI
BitmapEncoderInfo_GetPixelFormats
(
IWICBitmapEncoderInfo
*
iface
,
...
...
This diff is collapsed.
Click to expand it.
dlls/windowscodecs/regsvr.c
+
29
−
0
View file @
49b98b11
...
...
@@ -59,6 +59,7 @@ struct regsvr_decoder
LPCSTR
friendlyname
;
LPCSTR
version
;
GUID
const
*
vendor
;
GUID
const
*
container_format
;
LPCSTR
mimetypes
;
LPCSTR
extensions
;
GUID
const
*
const
*
formats
;
...
...
@@ -75,6 +76,7 @@ struct regsvr_encoder
LPCSTR
friendlyname
;
LPCSTR
version
;
GUID
const
*
vendor
;
GUID
const
*
container_format
;
LPCSTR
mimetypes
;
LPCSTR
extensions
;
GUID
const
*
const
*
formats
;
...
...
@@ -119,6 +121,7 @@ static const char tmodel_valuename[] = "ThreadingModel";
static
const
char
author_valuename
[]
=
"Author"
;
static
const
char
friendlyname_valuename
[]
=
"FriendlyName"
;
static
const
WCHAR
vendor_valuename
[]
=
{
'V'
,
'e'
,
'n'
,
'd'
,
'o'
,
'r'
,
0
};
static
const
WCHAR
containerformat_valuename
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'a'
,
'i'
,
'n'
,
'e'
,
'r'
,
'F'
,
'o'
,
'r'
,
'm'
,
'a'
,
't'
,
0
};
static
const
char
version_valuename
[]
=
"Version"
;
static
const
char
mimetypes_valuename
[]
=
"MimeTypes"
;
static
const
char
extensions_valuename
[]
=
"FileExtensions"
;
...
...
@@ -201,6 +204,13 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
container_format
)
{
StringFromGUID2
(
list
->
container_format
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
containerformat_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
),
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
version
)
{
res
=
RegSetValueExA
(
clsid_key
,
version_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
version
),
...
...
@@ -409,6 +419,13 @@ static HRESULT register_encoders(struct regsvr_encoder const *list)
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
container_format
)
{
StringFromGUID2
(
list
->
container_format
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
containerformat_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
),
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
version
)
{
res
=
RegSetValueExA
(
clsid_key
,
version_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
version
),
...
...
@@ -819,6 +836,7 @@ static struct regsvr_decoder const decoder_list[] = {
"BMP Decoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatBmp
,
"image/bmp"
,
".bmp,.dib,.rle"
,
bmp_formats
,
...
...
@@ -829,6 +847,7 @@ static struct regsvr_decoder const decoder_list[] = {
"GIF Decoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatGif
,
"image/gif"
,
".gif"
,
gif_formats
,
...
...
@@ -839,6 +858,7 @@ static struct regsvr_decoder const decoder_list[] = {
"ICO Decoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatIco
,
"image/vnd.microsoft.icon"
,
".ico"
,
ico_formats
,
...
...
@@ -849,6 +869,7 @@ static struct regsvr_decoder const decoder_list[] = {
"JPEG Decoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatJpeg
,
"image/jpeg"
,
".jpg;.jpeg;.jfif"
,
jpeg_formats
,
...
...
@@ -859,6 +880,7 @@ static struct regsvr_decoder const decoder_list[] = {
"PNG Decoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatPng
,
"image/png"
,
".png"
,
png_formats
,
...
...
@@ -869,6 +891,7 @@ static struct regsvr_decoder const decoder_list[] = {
"TIFF Decoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatTiff
,
"image/tiff"
,
".tif;.tiff"
,
tiff_decode_formats
,
...
...
@@ -879,6 +902,7 @@ static struct regsvr_decoder const decoder_list[] = {
"TGA Decoder"
,
"1.0.0.0"
,
&
GUID_VendorWine
,
&
GUID_WineContainerFormatTga
,
"image/x-targa"
,
".tga;.tpic"
,
tga_formats
,
...
...
@@ -933,6 +957,7 @@ static struct regsvr_encoder const encoder_list[] = {
"BMP Encoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatBmp
,
"image/bmp"
,
".bmp,.dib,.rle"
,
bmp_encode_formats
...
...
@@ -942,6 +967,7 @@ static struct regsvr_encoder const encoder_list[] = {
"JPEG Encoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatJpeg
,
"image/jpeg"
,
".jpg;.jpeg;.jfif"
,
jpeg_formats
...
...
@@ -951,6 +977,7 @@ static struct regsvr_encoder const encoder_list[] = {
"PNG Encoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatPng
,
"image/png"
,
".png"
,
png_encode_formats
...
...
@@ -960,6 +987,7 @@ static struct regsvr_encoder const encoder_list[] = {
"TIFF Encoder"
,
"1.0.0.0"
,
&
GUID_VendorMicrosoft
,
&
GUID_ContainerFormatTiff
,
"image/tiff"
,
".tif;.tiff"
,
tiff_encode_formats
...
...
@@ -969,6 +997,7 @@ static struct regsvr_encoder const encoder_list[] = {
"ICNS Encoder"
,
"1.0.0.0"
,
&
GUID_VendorWine
,
NULL
,
/* no container format guid */
"image/icns"
,
".icns"
,
icns_encode_formats
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment