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
163aac16
Commit
163aac16
authored
Jul 23, 2017
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jul 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmvcore: Support IWMLanguageList interfaces in IWMReader.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b1702c41
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+6
-0
wmvcore_main.c
dlls/wmvcore/wmvcore_main.c
+62
-0
No files found.
dlls/wmvcore/tests/wmvcore.c
View file @
163aac16
...
...
@@ -82,6 +82,7 @@ static void test_wmreader_interfaces(void)
IWMDRMReader2
*
drmreader2
;
IWMDRMReader3
*
drmreader3
;
IWMReaderPlaylistBurn
*
playlist
;
IWMLanguageList
*
langlist
;
hr
=
WMCreateReader
(
NULL
,
0
,
&
reader
);
ok
(
hr
==
S_OK
,
"WMCreateReader failed 0x%08x
\n
"
,
hr
);
...
...
@@ -151,6 +152,9 @@ static void test_wmreader_interfaces(void)
hr
=
IWMReader_QueryInterface
(
reader
,
&
IID_IWMReaderPlaylistBurn
,
(
void
**
)
&
playlist
);
ok
(
hr
==
S_OK
,
"Failed 0x%08x
\n
"
,
hr
);
hr
=
IWMReader_QueryInterface
(
reader
,
&
IID_IWMLanguageList
,
(
void
**
)
&
langlist
);
ok
(
hr
==
S_OK
,
"Failed 0x%08x
\n
"
,
hr
);
if
(
packet
)
IWMPacketSize_Release
(
packet
);
if
(
packet2
)
...
...
@@ -185,6 +189,8 @@ static void test_wmreader_interfaces(void)
IWMReaderTypeNegotiation_Release
(
negotiation
);
if
(
playlist
)
IWMReaderPlaylistBurn_Release
(
playlist
);
if
(
langlist
)
IWMLanguageList_Release
(
langlist
);
IWMReader_Release
(
reader
);
}
...
...
dlls/wmvcore/wmvcore_main.c
View file @
163aac16
...
...
@@ -73,6 +73,7 @@ typedef struct {
IWMReaderTimecode
IWMReaderTimecode_iface
;
IWMReaderPlaylistBurn
IWMReaderPlaylistBurn_iface
;
IWMHeaderInfo3
IWMHeaderInfo3_iface
;
IWMLanguageList
IWMLanguageList_iface
;
LONG
ref
;
}
WMReader
;
...
...
@@ -139,6 +140,9 @@ static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, voi
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IWMHeaderInfo3
))
{
TRACE
(
"(%p)->(IWMHeaderInfo3 %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IWMHeaderInfo3_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IWMLanguageList
))
{
TRACE
(
"(%p)->(IWMLanguageList %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IWMLanguageList_iface
;
}
else
{
*
ppv
=
NULL
;
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
...
...
@@ -1580,6 +1584,63 @@ static const IWMHeaderInfo3Vtbl WMHeaderInfo3Vtbl =
headerinfo_AddCodecInfo
};
static
inline
WMReader
*
impl_from_IWMLanguageList
(
IWMLanguageList
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
WMReader
,
IWMLanguageList_iface
);
}
static
HRESULT
WINAPI
langlist_QueryInterface
(
IWMLanguageList
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
WMReader
*
This
=
impl_from_IWMLanguageList
(
iface
);
return
IWMReader_QueryInterface
(
&
This
->
IWMReader_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
langlist_AddRef
(
IWMLanguageList
*
iface
)
{
WMReader
*
This
=
impl_from_IWMLanguageList
(
iface
);
return
IWMReader_AddRef
(
&
This
->
IWMReader_iface
);
}
static
ULONG
WINAPI
langlist_Release
(
IWMLanguageList
*
iface
)
{
WMReader
*
This
=
impl_from_IWMLanguageList
(
iface
);
return
IWMReader_Release
(
&
This
->
IWMReader_iface
);
}
static
HRESULT
WINAPI
langlist_GetLanguageCount
(
IWMLanguageList
*
iface
,
WORD
*
count
)
{
WMReader
*
This
=
impl_from_IWMLanguageList
(
iface
);
FIXME
(
"%p, %p
\n
"
,
This
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
langlist_GetLanguageDetails
(
IWMLanguageList
*
iface
,
WORD
index
,
WCHAR
*
language
,
WORD
*
length
)
{
WMReader
*
This
=
impl_from_IWMLanguageList
(
iface
);
FIXME
(
"%p, %d, %p, %p
\n
"
,
This
,
index
,
language
,
length
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
langlist_AddLanguageByRFC1766String
(
IWMLanguageList
*
iface
,
LPCWSTR_WMSDK_TYPE_SAFE
language
,
WORD
*
index
)
{
WMReader
*
This
=
impl_from_IWMLanguageList
(
iface
);
FIXME
(
"%p, %p, %p
\n
"
,
This
,
language
,
index
);
return
E_NOTIMPL
;
}
static
const
IWMLanguageListVtbl
WMLanguageListVtbl
=
{
langlist_QueryInterface
,
langlist_AddRef
,
langlist_Release
,
langlist_GetLanguageCount
,
langlist_GetLanguageDetails
,
langlist_AddLanguageByRFC1766String
};
HRESULT
WINAPI
WMCreateReader
(
IUnknown
*
reserved
,
DWORD
rights
,
IWMReader
**
ret_reader
)
{
WMReader
*
reader
;
...
...
@@ -1599,6 +1660,7 @@ HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_
reader
->
IWMReaderTimecode_iface
.
lpVtbl
=
&
WMReaderTimecodeVtbl
;
reader
->
IWMReaderPlaylistBurn_iface
.
lpVtbl
=
&
WMReaderPlaylistBurnVtbl
;
reader
->
IWMHeaderInfo3_iface
.
lpVtbl
=
&
WMHeaderInfo3Vtbl
;
reader
->
IWMLanguageList_iface
.
lpVtbl
=
&
WMLanguageListVtbl
;
reader
->
ref
=
1
;
*
ret_reader
=
&
reader
->
IWMReader_iface
;
...
...
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