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
51a0cdf5
Commit
51a0cdf5
authored
Apr 26, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Add slowest/fastest rate support methods.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
71f8e0d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
4 deletions
+59
-4
evr.c
dlls/mf/evr.c
+13
-4
mf.c
dlls/mf/tests/mf.c
+46
-0
No files found.
dlls/mf/evr.c
View file @
51a0cdf5
...
...
@@ -2677,17 +2677,26 @@ static ULONG WINAPI video_renderer_rate_support_Release(IMFRateSupport *iface)
static
HRESULT
WINAPI
video_renderer_rate_support_GetSlowestRate
(
IMFRateSupport
*
iface
,
MFRATE_DIRECTION
direction
,
BOOL
thin
,
float
*
rate
)
{
FIXME
(
"%p, %d, %d, %p.
\n
"
,
iface
,
direction
,
thin
,
rat
e
);
struct
video_renderer
*
renderer
=
impl_from_IMFRateSupport
(
ifac
e
);
return
E_NOTIMPL
;
TRACE
(
"%p, %d, %d, %p.
\n
"
,
iface
,
direction
,
thin
,
rate
);
if
(
renderer
->
flags
&
EVR_SHUT_DOWN
)
return
MF_E_SHUTDOWN
;
*
rate
=
0
.
0
f
;
return
S_OK
;
}
static
HRESULT
WINAPI
video_renderer_rate_support_GetFastestRate
(
IMFRateSupport
*
iface
,
MFRATE_DIRECTION
direction
,
BOOL
thin
,
float
*
rate
)
{
FIXME
(
"%p, %d, %d, %p.
\n
"
,
iface
,
direction
,
thin
,
rat
e
);
struct
video_renderer
*
renderer
=
impl_from_IMFRateSupport
(
ifac
e
);
return
E_NOTIMPL
;
TRACE
(
"%p, %d, %d, %p.
\n
"
,
iface
,
direction
,
thin
,
rate
);
return
renderer
->
flags
&
EVR_SHUT_DOWN
?
MF_E_SHUTDOWN
:
MF_E_INVALIDREQUEST
;
}
static
HRESULT
WINAPI
video_renderer_rate_support_IsRateSupported
(
IMFRateSupport
*
iface
,
BOOL
thin
,
float
rate
,
...
...
dlls/mf/tests/mf.c
View file @
51a0cdf5
...
...
@@ -4224,10 +4224,12 @@ static void test_evr(void)
DWORD
flags
,
count
,
value
;
IMFActivate
*
activate
;
HWND
window
,
window2
;
IMFRateSupport
*
rs
;
LONG
sample_count
;
IMFSample
*
sample
;
IUnknown
*
unk
;
UINT64
window3
;
float
rate
;
HRESULT
hr
;
GUID
guid
;
...
...
@@ -4510,6 +4512,50 @@ todo_wine
hr
=
IMFMediaSink_SetPresentationClock
(
sink
,
clock
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaSink_QueryInterface
(
sink
,
&
IID_IMFRateSupport
,
(
void
**
)
&
rs
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
rate
=
1
.
0
f
;
hr
=
IMFRateSupport_GetSlowestRate
(
rs
,
MFRATE_FORWARD
,
FALSE
,
&
rate
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
rate
==
0
.
0
f
,
"Unexpected rate %f.
\n
"
,
rate
);
rate
=
1
.
0
f
;
hr
=
IMFRateSupport_GetSlowestRate
(
rs
,
MFRATE_REVERSE
,
FALSE
,
&
rate
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
rate
==
0
.
0
f
,
"Unexpected rate %f.
\n
"
,
rate
);
rate
=
1
.
0
f
;
hr
=
IMFRateSupport_GetSlowestRate
(
rs
,
MFRATE_FORWARD
,
TRUE
,
&
rate
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
rate
==
0
.
0
f
,
"Unexpected rate %f.
\n
"
,
rate
);
rate
=
1
.
0
f
;
hr
=
IMFRateSupport_GetSlowestRate
(
rs
,
MFRATE_REVERSE
,
TRUE
,
&
rate
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
rate
==
0
.
0
f
,
"Unexpected rate %f.
\n
"
,
rate
);
hr
=
IMFRateSupport_GetFastestRate
(
rs
,
MFRATE_FORWARD
,
FALSE
,
&
rate
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFRateSupport_GetFastestRate
(
rs
,
MFRATE_REVERSE
,
FALSE
,
&
rate
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFRateSupport_GetFastestRate
(
rs
,
MFRATE_FORWARD
,
TRUE
,
&
rate
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFRateSupport_GetFastestRate
(
rs
,
MFRATE_REVERSE
,
TRUE
,
&
rate
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaSink_Shutdown
(
sink
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFRateSupport_GetSlowestRate
(
rs
,
MFRATE_FORWARD
,
FALSE
,
&
rate
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFRateSupport_GetFastestRate
(
rs
,
MFRATE_FORWARD
,
FALSE
,
&
rate
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFPresentationClock_Release
(
clock
);
IMFActivate_Release
(
activate
);
...
...
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