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
42ba38c1
Commit
42ba38c1
authored
May 14, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Create presentation clock on session creation.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8e6fa7e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
14 deletions
+37
-14
session.c
dlls/mf/session.c
+37
-9
mf.c
dlls/mf/tests/mf.c
+0
-5
No files found.
dlls/mf/session.c
View file @
42ba38c1
...
...
@@ -60,6 +60,7 @@ struct media_session
IMFAsyncCallback
commands_callback
;
LONG
refcount
;
IMFMediaEventQueue
*
event_queue
;
IMFPresentationClock
*
clock
;
struct
list
topologies
;
CRITICAL_SECTION
cs
;
};
...
...
@@ -292,6 +293,8 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface)
session_clear_topologies
(
session
);
if
(
session
->
event_queue
)
IMFMediaEventQueue_Release
(
session
->
event_queue
);
if
(
session
->
clock
)
IMFPresentationClock_Release
(
session
->
clock
);
DeleteCriticalSection
(
&
session
->
cs
);
heap_free
(
session
);
}
...
...
@@ -419,9 +422,14 @@ static HRESULT WINAPI mfsession_Shutdown(IMFMediaSession *iface)
static
HRESULT
WINAPI
mfsession_GetClock
(
IMFMediaSession
*
iface
,
IMFClock
**
clock
)
{
FIXME
(
"(%p)->(%p)
\n
"
,
iface
,
clock
);
struct
media_session
*
session
=
impl_from_IMFMediaSession
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
clock
);
*
clock
=
(
IMFClock
*
)
session
->
clock
;
IMFClock_AddRef
(
*
clock
);
return
S_OK
;
}
static
HRESULT
WINAPI
mfsession_GetSessionCapabilities
(
IMFMediaSession
*
iface
,
DWORD
*
caps
)
...
...
@@ -694,17 +702,22 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses
object
->
IMFRateControl_iface
.
lpVtbl
=
&
session_rate_control_vtbl
;
object
->
commands_callback
.
lpVtbl
=
&
session_commands_callback_vtbl
;
object
->
refcount
=
1
;
if
(
FAILED
(
hr
=
MFCreateEventQueue
(
&
object
->
event_queue
)))
{
IMFMediaSession_Release
(
&
object
->
IMFMediaSession_iface
);
return
hr
;
}
list_init
(
&
object
->
topologies
);
InitializeCriticalSection
(
&
object
->
cs
);
if
(
FAILED
(
hr
=
MFCreateEventQueue
(
&
object
->
event_queue
)))
goto
failed
;
if
(
FAILED
(
hr
=
MFCreatePresentationClock
(
&
object
->
clock
)))
goto
failed
;
*
session
=
&
object
->
IMFMediaSession_iface
;
return
S_OK
;
failed:
IMFMediaSession_Release
(
&
object
->
IMFMediaSession_iface
);
return
hr
;
}
static
HRESULT
WINAPI
present_clock_QueryInterface
(
IMFPresentationClock
*
iface
,
REFIID
riid
,
void
**
out
)
...
...
@@ -818,9 +831,24 @@ static HRESULT WINAPI present_clock_GetState(IMFPresentationClock *iface, DWORD
static
HRESULT
WINAPI
present_clock_GetProperties
(
IMFPresentationClock
*
iface
,
MFCLOCK_PROPERTIES
*
props
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
props
);
struct
presentation_clock
*
clock
=
impl_from_IMFPresentationClock
(
iface
);
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
props
);
EnterCriticalSection
(
&
clock
->
cs
);
if
(
clock
->
time_source
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
props
);
hr
=
E_NOTIMPL
;
}
else
hr
=
MF_E_CLOCK_NO_TIME_SOURCE
;
LeaveCriticalSection
(
&
clock
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
present_clock_SetTimeSource
(
IMFPresentationClock
*
iface
,
...
...
dlls/mf/tests/mf.c
View file @
42ba38c1
...
...
@@ -976,11 +976,8 @@ static void test_media_session(void)
IUnknown_Release
(
unk
);
hr
=
IMFMediaSession_GetClock
(
session
,
&
clock
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get clock, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMFClock_QueryInterface
(
clock
,
&
IID_IMFRateControl
,
(
void
**
)
&
rc2
);
ok
(
hr
==
S_OK
,
"Failed to get rate control, hr %#x.
\n
"
,
hr
);
IMFRateControl_Release
(
rc2
);
...
...
@@ -988,7 +985,6 @@ if (SUCCEEDED(hr))
hr
=
IMFClock_GetProperties
(
clock
,
&
clock_props
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
}
IMFRateControl_Release
(
rc
);
IMFRateSupport_Release
(
rs
);
...
...
@@ -1204,7 +1200,6 @@ todo_wine
ok
(
value
==
0
,
"Unexpected value %u.
\n
"
,
value
);
hr
=
IMFPresentationClock_GetProperties
(
clock
,
&
props
);
todo_wine
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_GetState
(
clock
,
0
,
&
state
);
...
...
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