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
5496b889
Commit
5496b889
authored
Oct 22, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/mixer: Implement GetInputStatus().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
081f5ae2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
3 deletions
+54
-3
mixer.c
dlls/evr/mixer.c
+21
-3
evr.c
dlls/evr/tests/evr.c
+33
-0
No files found.
dlls/evr/mixer.c
View file @
5496b889
...
...
@@ -909,11 +909,29 @@ static HRESULT WINAPI video_mixer_transform_GetOutputCurrentType(IMFTransform *i
return
hr
;
}
static
HRESULT
WINAPI
video_mixer_transform_GetInputStatus
(
IMFTransform
*
iface
,
DWORD
id
,
DWORD
*
flag
s
)
static
HRESULT
WINAPI
video_mixer_transform_GetInputStatus
(
IMFTransform
*
iface
,
DWORD
id
,
DWORD
*
statu
s
)
{
FIXME
(
"%p, %u, %p.
\n
"
,
iface
,
id
,
flags
);
struct
video_mixer
*
mixer
=
impl_from_IMFTransform
(
iface
);
struct
input_stream
*
stream
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"%p, %u, %p.
\n
"
,
iface
,
id
,
status
);
if
(
!
status
)
return
E_POINTER
;
EnterCriticalSection
(
&
mixer
->
cs
);
if
(
!
mixer
->
output
.
media_type
)
hr
=
MF_E_TRANSFORM_TYPE_NOT_SET
;
else
if
(
SUCCEEDED
(
hr
=
video_mixer_get_input
(
mixer
,
id
,
&
stream
)))
{
*
status
=
stream
->
sample
?
0
:
MFT_INPUT_STATUS_ACCEPT_DATA
;
}
LeaveCriticalSection
(
&
mixer
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
video_mixer_transform_GetOutputStatus
(
IMFTransform
*
iface
,
DWORD
*
flags
)
...
...
dlls/evr/tests/evr.c
View file @
5496b889
...
...
@@ -2086,6 +2086,18 @@ static void test_mixer_samples(void)
hr
=
MFCreateVideoMixer
(
NULL
,
&
IID_IDirect3DDevice9
,
&
IID_IMFTransform
,
(
void
**
)
&
mixer
);
ok
(
hr
==
S_OK
,
"Failed to create a mixer, hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetInputStatus
(
mixer
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetInputStatus
(
mixer
,
1
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetInputStatus
(
mixer
,
0
,
&
status
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetInputStatus
(
mixer
,
1
,
&
status
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Configure device and media types. */
hr
=
DXVA2CreateDirect3DDeviceManager9
(
&
token
,
&
manager
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -2106,9 +2118,20 @@ static void test_mixer_samples(void)
hr
=
IMFTransform_SetInputType
(
mixer
,
0
,
video_type
,
0
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetInputStatus
(
mixer
,
0
,
&
status
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetOutputType
(
mixer
,
0
,
video_type
,
0
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
status
=
0
;
hr
=
IMFTransform_GetInputStatus
(
mixer
,
0
,
&
status
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
status
==
MFT_INPUT_STATUS_ACCEPT_DATA
,
"Unexpected status %#x.
\n
"
,
status
);
hr
=
IMFTransform_GetInputStatus
(
mixer
,
1
,
&
status
);
ok
(
hr
==
MF_E_INVALIDSTREAMNUMBER
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFMediaType_Release
(
video_type
);
memset
(
&
buffer
,
0
,
sizeof
(
buffer
));
...
...
@@ -2162,9 +2185,19 @@ todo_wine
hr
=
IMFTransform_ProcessInput
(
mixer
,
5
,
NULL
,
0
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
status
=
0
;
hr
=
IMFTransform_GetInputStatus
(
mixer
,
0
,
&
status
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
status
==
MFT_INPUT_STATUS_ACCEPT_DATA
,
"Unexpected status %#x.
\n
"
,
status
);
hr
=
IMFTransform_ProcessInput
(
mixer
,
0
,
sample
,
0
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
status
=
~
0u
;
hr
=
IMFTransform_GetInputStatus
(
mixer
,
0
,
&
status
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
status
,
"Unexpected status %#x.
\n
"
,
status
);
hr
=
IMFTransform_ProcessInput
(
mixer
,
0
,
sample
,
0
);
ok
(
hr
==
MF_E_NOTACCEPTING
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
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