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
58f46803
Commit
58f46803
authored
May 29, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Send "pause" event on Pause().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
41af1d1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
main.c
dlls/mfmediaengine/main.c
+19
-2
mfmediaengine.c
dlls/mfmediaengine/tests/mfmediaengine.c
+17
-0
No files found.
dlls/mfmediaengine/main.c
View file @
58f46803
...
...
@@ -476,9 +476,26 @@ static HRESULT WINAPI media_engine_Play(IMFMediaEngine *iface)
static
HRESULT
WINAPI
media_engine_Pause
(
IMFMediaEngine
*
iface
)
{
FIXME
(
"(%p): stub.
\n
"
,
iface
);
struct
media_engine
*
engine
=
impl_from_IMFMediaEngine
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p.
\n
"
,
iface
);
EnterCriticalSection
(
&
engine
->
cs
);
if
(
!
(
engine
->
flags
&
FLAGS_ENGINE_PAUSED
))
{
engine
->
flags
&=
~
FLAGS_ENGINE_WAITING
;
engine
->
flags
|=
FLAGS_ENGINE_PAUSED
;
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_TIMEUPDATE
,
0
,
0
);
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_PAUSE
,
0
,
0
);
}
IMFMediaEngineNotify_EventNotify
(
engine
->
callback
,
MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS
,
0
,
0
);
LeaveCriticalSection
(
&
engine
->
cs
);
return
S_OK
;
}
static
BOOL
WINAPI
media_engine_GetMuted
(
IMFMediaEngine
*
iface
)
...
...
dlls/mfmediaengine/tests/mfmediaengine.c
View file @
58f46803
...
...
@@ -421,6 +421,23 @@ static void test_Play(void)
ok
(
!
ret
,
"Unexpected state %d.
\n
"
,
ret
);
IMFMediaEngine_Release
(
media_engine
);
/* Play -> Pause */
media_engine
=
create_media_engine
(
callback
);
hr
=
IMFMediaEngine_Play
(
media_engine
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ret
=
IMFMediaEngine_IsPaused
(
media_engine
);
ok
(
!
ret
,
"Unexpected state %d.
\n
"
,
ret
);
hr
=
IMFMediaEngine_Pause
(
media_engine
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ret
=
IMFMediaEngine_IsPaused
(
media_engine
);
ok
(
!!
ret
,
"Unexpected state %d.
\n
"
,
ret
);
IMFMediaEngine_Release
(
media_engine
);
}
START_TEST
(
mfmediaengine
)
...
...
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