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
6ae872e8
Commit
6ae872e8
authored
Nov 16, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/mixer: Fix output filling behaviour regarding sample properties.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
35d7dc90
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
mixer.c
dlls/evr/mixer.c
+24
-4
evr.c
dlls/evr/tests/evr.c
+0
-2
No files found.
dlls/evr/mixer.c
View file @
6ae872e8
...
...
@@ -1222,10 +1222,25 @@ static void video_mixer_render(struct video_mixer *mixer, IDirect3DSurface9 *rt)
IDirect3DSurface9_Release
(
surface
);
}
static
HRESULT
video_mixer_get_sample_desired_time
(
IMFSample
*
sample
,
LONGLONG
*
timestamp
,
LONGLONG
*
duration
)
{
IMFDesiredSample
*
desired
;
HRESULT
hr
;
if
(
SUCCEEDED
(
hr
=
IMFSample_QueryInterface
(
sample
,
&
IID_IMFDesiredSample
,
(
void
**
)
&
desired
)))
{
hr
=
IMFDesiredSample_GetDesiredSampleTimeAndDuration
(
desired
,
timestamp
,
duration
);
IMFDesiredSample_Release
(
desired
);
}
return
hr
;
}
static
HRESULT
WINAPI
video_mixer_transform_ProcessOutput
(
IMFTransform
*
iface
,
DWORD
flags
,
DWORD
count
,
MFT_OUTPUT_DATA_BUFFER
*
buffers
,
DWORD
*
status
)
{
struct
video_mixer
*
mixer
=
impl_from_IMFTransform
(
iface
);
LONGLONG
timestamp
,
duration
;
IDirect3DSurface9
*
surface
;
IDirect3DDevice9
*
device
;
unsigned
int
i
;
...
...
@@ -1272,12 +1287,17 @@ static HRESULT WINAPI video_mixer_transform_ProcessOutput(IMFTransform *iface, D
}
else
{
if
(
SUCCEEDED
(
hr
=
video_mixer_get_d3d_device
(
mixer
,
&
device
)))
if
(
SUCCEEDED
(
video_mixer_get_sample_desired_time
(
buffers
->
pSample
,
&
timestamp
,
&
duration
)))
{
IDirect3DDevice9_ColorFill
(
device
,
surface
,
NULL
,
0
);
IDirect3DDeviceManager9_UnlockDevice
(
mixer
->
device_manager
,
mixer
->
device_handle
,
FALSE
);
IDirect3DDevice9_Release
(
device
);
if
(
SUCCEEDED
(
hr
=
video_mixer_get_d3d_device
(
mixer
,
&
device
)))
{
IDirect3DDevice9_ColorFill
(
device
,
surface
,
NULL
,
0
);
IDirect3DDeviceManager9_UnlockDevice
(
mixer
->
device_manager
,
mixer
->
device_handle
,
FALSE
);
IDirect3DDevice9_Release
(
device
);
}
}
else
hr
=
MF_E_TRANSFORM_NEED_MORE_INPUT
;
}
IDirect3DSurface9_Release
(
surface
);
}
...
...
dlls/evr/tests/evr.c
View file @
6ae872e8
...
...
@@ -2324,11 +2324,9 @@ static void test_mixer_samples(void)
buffers
[
0
].
pSample
=
sample
;
hr
=
IMFTransform_ProcessOutput
(
mixer
,
0
,
1
,
buffers
,
&
status
);
todo_wine
ok
(
hr
==
MF_E_TRANSFORM_NEED_MORE_INPUT
,
"Unexpected hr %#x.
\n
"
,
hr
);
color
=
get_surface_color
(
surface
,
0
,
0
);
todo_wine
ok
(
color
==
D3DCOLOR_ARGB
(
0x10
,
0xff
,
0x00
,
0x00
),
"Unexpected color %#x.
\n
"
,
color
);
/* Streaming is not started yet. Output is colored black, but only if desired timestamps were set. */
...
...
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