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
98e94b25
Commit
98e94b25
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 IReferenceClock interfaces in IWMReader.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
163aac16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+6
-0
wmvcore_main.c
dlls/wmvcore/wmvcore_main.c
+71
-0
No files found.
dlls/wmvcore/tests/wmvcore.c
View file @
98e94b25
...
...
@@ -83,6 +83,7 @@ static void test_wmreader_interfaces(void)
IWMDRMReader3
*
drmreader3
;
IWMReaderPlaylistBurn
*
playlist
;
IWMLanguageList
*
langlist
;
IReferenceClock
*
refclock
;
hr
=
WMCreateReader
(
NULL
,
0
,
&
reader
);
ok
(
hr
==
S_OK
,
"WMCreateReader failed 0x%08x
\n
"
,
hr
);
...
...
@@ -155,6 +156,9 @@ static void test_wmreader_interfaces(void)
hr
=
IWMReader_QueryInterface
(
reader
,
&
IID_IWMLanguageList
,
(
void
**
)
&
langlist
);
ok
(
hr
==
S_OK
,
"Failed 0x%08x
\n
"
,
hr
);
hr
=
IWMReader_QueryInterface
(
reader
,
&
IID_IReferenceClock
,
(
void
**
)
&
refclock
);
ok
(
hr
==
S_OK
,
"Failed 0x%08x
\n
"
,
hr
);
if
(
packet
)
IWMPacketSize_Release
(
packet
);
if
(
packet2
)
...
...
@@ -191,6 +195,8 @@ static void test_wmreader_interfaces(void)
IWMReaderPlaylistBurn_Release
(
playlist
);
if
(
langlist
)
IWMLanguageList_Release
(
langlist
);
if
(
refclock
)
IReferenceClock_Release
(
refclock
);
IWMReader_Release
(
reader
);
}
...
...
dlls/wmvcore/wmvcore_main.c
View file @
98e94b25
...
...
@@ -74,6 +74,7 @@ typedef struct {
IWMReaderPlaylistBurn
IWMReaderPlaylistBurn_iface
;
IWMHeaderInfo3
IWMHeaderInfo3_iface
;
IWMLanguageList
IWMLanguageList_iface
;
IReferenceClock
IReferenceClock_iface
;
LONG
ref
;
}
WMReader
;
...
...
@@ -143,6 +144,9 @@ static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, voi
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IWMLanguageList
))
{
TRACE
(
"(%p)->(IWMLanguageList %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IWMLanguageList_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IReferenceClock
))
{
TRACE
(
"(%p)->(IWMLanguageList %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IReferenceClock_iface
;
}
else
{
*
ppv
=
NULL
;
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
...
...
@@ -1641,6 +1645,72 @@ static const IWMLanguageListVtbl WMLanguageListVtbl =
langlist_AddLanguageByRFC1766String
};
static
inline
WMReader
*
impl_from_IReferenceClock
(
IReferenceClock
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
WMReader
,
IReferenceClock_iface
);
}
static
HRESULT
WINAPI
refclock_QueryInterface
(
IReferenceClock
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
WMReader
*
This
=
impl_from_IReferenceClock
(
iface
);
return
IWMReader_QueryInterface
(
&
This
->
IWMReader_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
refclock_AddRef
(
IReferenceClock
*
iface
)
{
WMReader
*
This
=
impl_from_IReferenceClock
(
iface
);
return
IWMReader_AddRef
(
&
This
->
IWMReader_iface
);
}
static
ULONG
WINAPI
refclock_Release
(
IReferenceClock
*
iface
)
{
WMReader
*
This
=
impl_from_IReferenceClock
(
iface
);
return
IWMReader_Release
(
&
This
->
IWMReader_iface
);
}
static
HRESULT
WINAPI
refclock_GetTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
*
time
)
{
WMReader
*
This
=
impl_from_IReferenceClock
(
iface
);
FIXME
(
"%p, %p
\n
"
,
This
,
time
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
refclock_AdviseTime
(
IReferenceClock
*
iface
,
REFERENCE_TIME
basetime
,
REFERENCE_TIME
streamtime
,
HEVENT
event
,
DWORD_PTR
*
cookie
)
{
WMReader
*
This
=
impl_from_IReferenceClock
(
iface
);
FIXME
(
"%p, %s, %s, %lu, %p
\n
"
,
This
,
wine_dbgstr_longlong
(
basetime
),
wine_dbgstr_longlong
(
streamtime
),
event
,
cookie
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
refclock_AdvisePeriodic
(
IReferenceClock
*
iface
,
REFERENCE_TIME
starttime
,
REFERENCE_TIME
period
,
HSEMAPHORE
semaphore
,
DWORD_PTR
*
cookie
)
{
WMReader
*
This
=
impl_from_IReferenceClock
(
iface
);
FIXME
(
"%p, %s, %s, %lu, %p
\n
"
,
This
,
wine_dbgstr_longlong
(
starttime
),
wine_dbgstr_longlong
(
period
),
semaphore
,
cookie
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
refclock_Unadvise
(
IReferenceClock
*
iface
,
DWORD_PTR
cookie
)
{
WMReader
*
This
=
impl_from_IReferenceClock
(
iface
);
FIXME
(
"%p, %lu
\n
"
,
This
,
cookie
);
return
E_NOTIMPL
;
}
static
const
IReferenceClockVtbl
ReferenceClockVtbl
=
{
refclock_QueryInterface
,
refclock_AddRef
,
refclock_Release
,
refclock_GetTime
,
refclock_AdviseTime
,
refclock_AdvisePeriodic
,
refclock_Unadvise
};
HRESULT
WINAPI
WMCreateReader
(
IUnknown
*
reserved
,
DWORD
rights
,
IWMReader
**
ret_reader
)
{
WMReader
*
reader
;
...
...
@@ -1661,6 +1731,7 @@ HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_
reader
->
IWMReaderPlaylistBurn_iface
.
lpVtbl
=
&
WMReaderPlaylistBurnVtbl
;
reader
->
IWMHeaderInfo3_iface
.
lpVtbl
=
&
WMHeaderInfo3Vtbl
;
reader
->
IWMLanguageList_iface
.
lpVtbl
=
&
WMLanguageListVtbl
;
reader
->
IReferenceClock_iface
.
lpVtbl
=
&
ReferenceClockVtbl
;
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