Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4c610279
Commit
4c610279
authored
Jan 28, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Handle shutdown state in a few stubs.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a4890ac7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
10 deletions
+55
-10
main.c
dlls/mfmediaengine/main.c
+55
-5
mfmediaengine.c
dlls/mfmediaengine/tests/mfmediaengine.c
+0
-5
No files found.
dlls/mfmediaengine/main.c
View file @
4c610279
...
...
@@ -1538,16 +1538,36 @@ static HRESULT WINAPI media_engine_GetBuffered(IMFMediaEngineEx *iface, IMFMedia
static
HRESULT
WINAPI
media_engine_Load
(
IMFMediaEngineEx
*
iface
)
{
struct
media_engine
*
engine
=
impl_from_IMFMediaEngineEx
(
iface
);
HRESULT
hr
=
E_NOTIMPL
;
FIXME
(
"(%p): stub.
\n
"
,
iface
);
return
E_NOTIMPL
;
EnterCriticalSection
(
&
engine
->
cs
);
if
(
engine
->
flags
&
FLAGS_ENGINE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
LeaveCriticalSection
(
&
engine
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
media_engine_CanPlayType
(
IMFMediaEngineEx
*
iface
,
BSTR
type
,
MF_MEDIA_ENGINE_CANPLAY
*
answer
)
{
struct
media_engine
*
engine
=
impl_from_IMFMediaEngineEx
(
iface
);
HRESULT
hr
=
E_NOTIMPL
;
FIXME
(
"(%p, %s, %p): stub.
\n
"
,
iface
,
debugstr_w
(
type
),
answer
);
return
E_NOTIMPL
;
EnterCriticalSection
(
&
engine
->
cs
);
if
(
engine
->
flags
&
FLAGS_ENGINE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
LeaveCriticalSection
(
&
engine
->
cs
);
return
hr
;
}
static
USHORT
WINAPI
media_engine_GetReadyState
(
IMFMediaEngineEx
*
iface
)
...
...
@@ -1595,9 +1615,19 @@ static double WINAPI media_engine_GetCurrentTime(IMFMediaEngineEx *iface)
static
HRESULT
WINAPI
media_engine_SetCurrentTime
(
IMFMediaEngineEx
*
iface
,
double
time
)
{
struct
media_engine
*
engine
=
impl_from_IMFMediaEngineEx
(
iface
);
HRESULT
hr
=
E_NOTIMPL
;
FIXME
(
"(%p, %f): stub.
\n
"
,
iface
,
time
);
return
E_NOTIMPL
;
EnterCriticalSection
(
&
engine
->
cs
);
if
(
engine
->
flags
&
FLAGS_ENGINE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
LeaveCriticalSection
(
&
engine
->
cs
);
return
hr
;
}
static
double
WINAPI
media_engine_GetStartTime
(
IMFMediaEngineEx
*
iface
)
...
...
@@ -1705,16 +1735,36 @@ static HRESULT WINAPI media_engine_SetPlaybackRate(IMFMediaEngineEx *iface, doub
static
HRESULT
WINAPI
media_engine_GetPlayed
(
IMFMediaEngineEx
*
iface
,
IMFMediaTimeRange
**
played
)
{
struct
media_engine
*
engine
=
impl_from_IMFMediaEngineEx
(
iface
);
HRESULT
hr
=
E_NOTIMPL
;
FIXME
(
"(%p, %p): stub.
\n
"
,
iface
,
played
);
return
E_NOTIMPL
;
EnterCriticalSection
(
&
engine
->
cs
);
if
(
engine
->
flags
&
FLAGS_ENGINE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
LeaveCriticalSection
(
&
engine
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
media_engine_GetSeekable
(
IMFMediaEngineEx
*
iface
,
IMFMediaTimeRange
**
seekable
)
{
struct
media_engine
*
engine
=
impl_from_IMFMediaEngineEx
(
iface
);
HRESULT
hr
=
E_NOTIMPL
;
FIXME
(
"(%p, %p): stub.
\n
"
,
iface
,
seekable
);
return
E_NOTIMPL
;
EnterCriticalSection
(
&
engine
->
cs
);
if
(
engine
->
flags
&
FLAGS_ENGINE_SHUT_DOWN
)
hr
=
MF_E_SHUTDOWN
;
LeaveCriticalSection
(
&
engine
->
cs
);
return
hr
;
}
static
BOOL
WINAPI
media_engine_IsEnded
(
IMFMediaEngineEx
*
iface
)
...
...
dlls/mfmediaengine/tests/mfmediaengine.c
View file @
4c610279
...
...
@@ -344,12 +344,10 @@ static void test_Shutdown(void)
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaEngine_Load
(
media_engine
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
str
=
SysAllocString
(
L"video/mp4"
);
hr
=
IMFMediaEngine_CanPlayType
(
media_engine
,
str
,
&
state
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
SysFreeString
(
str
);
...
...
@@ -363,7 +361,6 @@ todo_wine
ok
(
val
==
0
.
0
,
"Unexpected time %f.
\n
"
,
val
);
hr
=
IMFMediaEngine_SetCurrentTime
(
media_engine
,
1
.
0
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
val
=
IMFMediaEngine_GetStartTime
(
media_engine
);
...
...
@@ -382,11 +379,9 @@ todo_wine
ok
(
val
==
1
.
0
,
"Unexpected rate %f.
\n
"
,
val
);
hr
=
IMFMediaEngine_GetPlayed
(
media_engine
,
&
time_range
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaEngine_GetSeekable
(
media_engine
,
&
time_range
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
state
=
IMFMediaEngine_IsEnded
(
media_engine
);
...
...
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