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
292b54f3
Commit
292b54f3
authored
Nov 09, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/mixer: Reuse full set of type attributes for output types.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8c9988d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
5 deletions
+32
-5
mixer.c
dlls/evr/mixer.c
+12
-4
evr.c
dlls/evr/tests/evr.c
+20
-1
No files found.
dlls/evr/mixer.c
View file @
292b54f3
...
@@ -653,7 +653,8 @@ static int rt_formats_sort_compare(const void *left, const void *right)
...
@@ -653,7 +653,8 @@ static int rt_formats_sort_compare(const void *left, const void *right)
}
}
static
HRESULT
video_mixer_collect_output_types
(
struct
video_mixer
*
mixer
,
const
DXVA2_VideoDesc
*
video_desc
,
static
HRESULT
video_mixer_collect_output_types
(
struct
video_mixer
*
mixer
,
const
DXVA2_VideoDesc
*
video_desc
,
IDirectXVideoProcessorService
*
service
,
unsigned
int
device_count
,
const
GUID
*
devices
,
unsigned
int
flags
)
IMFMediaType
*
media_type
,
IDirectXVideoProcessorService
*
service
,
unsigned
int
device_count
,
const
GUID
*
devices
,
unsigned
int
flags
)
{
{
unsigned
int
i
,
j
,
format_count
,
count
;
unsigned
int
i
,
j
,
format_count
,
count
;
struct
rt_format
*
rt_formats
=
NULL
,
*
ptr
;
struct
rt_format
*
rt_formats
=
NULL
,
*
ptr
;
...
@@ -706,9 +707,16 @@ static HRESULT video_mixer_collect_output_types(struct video_mixer *mixer, const
...
@@ -706,9 +707,16 @@ static HRESULT video_mixer_collect_output_types(struct video_mixer *mixer, const
{
{
for
(
i
=
0
;
i
<
count
;
++
i
)
for
(
i
=
0
;
i
<
count
;
++
i
)
{
{
IMFMediaType
*
rt_media_type
;
subtype
.
Data1
=
rt_formats
[
i
].
format
;
subtype
.
Data1
=
rt_formats
[
i
].
format
;
mixer
->
output
.
rt_formats
[
i
]
=
rt_formats
[
i
];
mixer
->
output
.
rt_formats
[
i
]
=
rt_formats
[
i
];
MFCreateVideoMediaTypeFromSubtype
(
&
subtype
,
(
IMFVideoMediaType
**
)
&
mixer
->
output
.
rt_formats
[
i
].
media_type
);
MFCreateMediaType
(
&
rt_media_type
);
IMFMediaType_CopyAllItems
(
media_type
,
(
IMFAttributes
*
)
rt_media_type
);
IMFMediaType_SetGUID
(
rt_media_type
,
&
MF_MT_SUBTYPE
,
&
subtype
);
mixer
->
output
.
rt_formats
[
i
].
media_type
=
rt_media_type
;
}
}
mixer
->
output
.
rt_formats_count
=
count
;
mixer
->
output
.
rt_formats_count
=
count
;
}
}
...
@@ -785,8 +793,8 @@ static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DW
...
@@ -785,8 +793,8 @@ static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DW
if
(
SUCCEEDED
(
hr
=
IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids
(
service
,
&
video_desc
,
if
(
SUCCEEDED
(
hr
=
IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids
(
service
,
&
video_desc
,
&
count
,
&
guids
)))
&
count
,
&
guids
)))
{
{
if
(
SUCCEEDED
(
hr
=
video_mixer_collect_output_types
(
mixer
,
&
video_desc
,
service
,
count
,
if
(
SUCCEEDED
(
hr
=
video_mixer_collect_output_types
(
mixer
,
&
video_desc
,
media_type
,
guids
,
flags
))
&&
!
(
flags
&
MFT_SET_TYPE_TEST_ONLY
))
service
,
count
,
guids
,
flags
))
&&
!
(
flags
&
MFT_SET_TYPE_TEST_ONLY
))
{
{
if
(
mixer
->
inputs
[
0
].
media_type
)
if
(
mixer
->
inputs
[
0
].
media_type
)
IMFMediaType_Release
(
mixer
->
inputs
[
0
].
media_type
);
IMFMediaType_Release
(
mixer
->
inputs
[
0
].
media_type
);
...
...
dlls/evr/tests/evr.c
View file @
292b54f3
...
@@ -915,11 +915,11 @@ static void test_default_mixer_type_negotiation(void)
...
@@ -915,11 +915,11 @@ static void test_default_mixer_type_negotiation(void)
IDirect3DDevice9
*
device
;
IDirect3DDevice9
*
device
;
IMFMediaType
*
video_type
;
IMFMediaType
*
video_type
;
IMFTransform
*
transform
;
IMFTransform
*
transform
;
DWORD
index
,
count
;
GUID
guid
,
*
guids
;
GUID
guid
,
*
guids
;
IDirect3D9
*
d3d
;
IDirect3D9
*
d3d
;
IUnknown
*
unk
;
IUnknown
*
unk
;
HWND
window
;
HWND
window
;
DWORD
count
;
HRESULT
hr
;
HRESULT
hr
;
UINT
token
;
UINT
token
;
...
@@ -1013,6 +1013,25 @@ static void test_default_mixer_type_negotiation(void)
...
@@ -1013,6 +1013,25 @@ static void test_default_mixer_type_negotiation(void)
IMFMediaType_Release
(
media_type
);
IMFMediaType_Release
(
media_type
);
IMFMediaType_Release
(
media_type2
);
IMFMediaType_Release
(
media_type2
);
/* Check attributes on available output types. */
index
=
0
;
while
(
SUCCEEDED
(
IMFTransform_GetOutputAvailableType
(
transform
,
0
,
index
++
,
&
media_type
)))
{
UINT64
frame_size
;
GUID
subtype
;
UINT32
value
;
hr
=
IMFMediaType_GetGUID
(
media_type
,
&
MF_MT_SUBTYPE
,
&
subtype
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_GetUINT64
(
media_type
,
&
MF_MT_FRAME_SIZE
,
&
frame_size
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_GetUINT32
(
media_type
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
&
value
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFMediaType_Release
(
media_type
);
}
ok
(
index
>
1
,
"Unexpected number of available types.
\n
"
);
hr
=
IMFTransform_QueryInterface
(
transform
,
&
IID_IMFVideoProcessor
,
(
void
**
)
&
processor
);
hr
=
IMFTransform_QueryInterface
(
transform
,
&
IID_IMFVideoProcessor
,
(
void
**
)
&
processor
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"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