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
84b66e15
Commit
84b66e15
authored
Jan 27, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Return full presentation range in GetBuffered().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db549a68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
main.c
dlls/mfmediaengine/main.c
+14
-3
mfmediaengine.c
dlls/mfmediaengine/tests/mfmediaengine.c
+14
-0
No files found.
dlls/mfmediaengine/main.c
View file @
84b66e15
...
...
@@ -1152,11 +1152,22 @@ static HRESULT WINAPI media_engine_SetPreload(IMFMediaEngine *iface, MF_MEDIA_EN
return
S_OK
;
}
static
HRESULT
WINAPI
media_engine_GetBuffered
(
IMFMediaEngine
*
iface
,
IMFMediaTimeRange
**
buffered
)
static
HRESULT
WINAPI
media_engine_GetBuffered
(
IMFMediaEngine
*
iface
,
IMFMediaTimeRange
**
range
)
{
FIXME
(
"(%p, %p): stub.
\n
"
,
iface
,
buffered
);
struct
media_engine
*
engine
=
impl_from_IMFMediaEngine
(
iface
);
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
range
);
if
(
FAILED
(
hr
=
create_time_range
(
range
)))
return
hr
;
EnterCriticalSection
(
&
engine
->
cs
);
if
(
!
isnan
(
engine
->
duration
))
hr
=
IMFMediaTimeRange_AddRange
(
*
range
,
0
.
0
,
engine
->
duration
);
LeaveCriticalSection
(
&
engine
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
media_engine_Load
(
IMFMediaEngine
*
iface
)
...
...
dlls/mfmediaengine/tests/mfmediaengine.c
View file @
84b66e15
...
...
@@ -391,13 +391,27 @@ static void test_Play(void)
{
struct
media_engine_notify
notify_impl
=
{{
&
media_engine_notify_vtbl
},
1
};
IMFMediaEngineNotify
*
callback
=
&
notify_impl
.
IMFMediaEngineNotify_iface
;
IMFMediaTimeRange
*
range
,
*
range1
;
IMFMediaEngine
*
media_engine
;
LONGLONG
pts
;
DWORD
count
;
HRESULT
hr
;
BOOL
ret
;
media_engine
=
create_media_engine
(
callback
);
hr
=
IMFMediaEngine_GetBuffered
(
media_engine
,
&
range
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaEngine_GetBuffered
(
media_engine
,
&
range1
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
range
!=
range1
,
"Unexpected pointer.
\n
"
);
count
=
IMFMediaTimeRange_GetLength
(
range
);
ok
(
!
count
,
"Unexpected count %u.
\n
"
,
count
);
IMFMediaTimeRange_Release
(
range
);
IMFMediaTimeRange_Release
(
range1
);
ret
=
IMFMediaEngine_IsPaused
(
media_engine
);
ok
(
ret
,
"Unexpected state %d.
\n
"
,
ret
);
...
...
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