Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f9490876
Commit
f9490876
authored
Sep 04, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr: Create and initialize mixer transform attributes.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5ec9505a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
5 deletions
+47
-5
mixer.c
dlls/evr/mixer.c
+23
-5
evr.c
dlls/evr/tests/evr.c
+24
-0
No files found.
dlls/evr/mixer.c
View file @
f9490876
...
...
@@ -70,11 +70,9 @@ struct video_mixer
struct
output_stream
output
;
COLORREF
bkgnd_color
;
IDirect3DDeviceManager9
*
device_manager
;
IMediaEventSink
*
event_sink
;
IMFAttributes
*
attributes
;
CRITICAL_SECTION
cs
;
};
...
...
@@ -246,6 +244,8 @@ static ULONG WINAPI video_mixer_inner_Release(IUnknown *iface)
video_mixer_clear_types
(
mixer
);
if
(
mixer
->
device_manager
)
IDirect3DDeviceManager9_Release
(
mixer
->
device_manager
);
if
(
mixer
->
attributes
)
IMFAttributes_Release
(
mixer
->
attributes
);
DeleteCriticalSection
(
&
mixer
->
cs
);
free
(
mixer
);
}
...
...
@@ -360,9 +360,17 @@ static HRESULT WINAPI video_mixer_transform_GetOutputStreamInfo(IMFTransform *if
static
HRESULT
WINAPI
video_mixer_transform_GetAttributes
(
IMFTransform
*
iface
,
IMFAttributes
**
attributes
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
attributes
);
struct
video_mixer
*
mixer
=
impl_from_IMFTransform
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
attributes
);
if
(
!
attributes
)
return
E_POINTER
;
*
attributes
=
mixer
->
attributes
;
IMFAttributes_AddRef
(
*
attributes
);
return
S_OK
;
}
static
HRESULT
WINAPI
video_mixer_transform_GetInputStreamAttributes
(
IMFTransform
*
iface
,
DWORD
id
,
...
...
@@ -1317,6 +1325,8 @@ HRESULT WINAPI MFCreateVideoMixer(IUnknown *owner, REFIID riid_device, REFIID ri
HRESULT
evr_mixer_create
(
IUnknown
*
outer
,
void
**
out
)
{
struct
video_mixer
*
object
;
MFVideoNormalizedRect
rect
;
HRESULT
hr
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
...
...
@@ -1335,6 +1345,14 @@ HRESULT evr_mixer_create(IUnknown *outer, void **out)
object
->
input_count
=
1
;
video_mixer_init_input
(
&
object
->
inputs
[
0
]);
InitializeCriticalSection
(
&
object
->
cs
);
if
(
FAILED
(
hr
=
MFCreateAttributes
(
&
object
->
attributes
,
0
)))
{
IUnknown_Release
(
&
object
->
IUnknown_inner
);
return
hr
;
}
rect
.
left
=
rect
.
top
=
0
.
0
f
;
rect
.
right
=
rect
.
bottom
=
1
.
0
f
;
IMFAttributes_SetBlob
(
object
->
attributes
,
&
VIDEO_ZOOM_RECT
,
(
const
UINT8
*
)
&
rect
,
sizeof
(
rect
));
*
out
=
&
object
->
IUnknown_inner
;
...
...
dlls/evr/tests/evr.c
View file @
f9490876
...
...
@@ -419,6 +419,7 @@ static void test_default_mixer(void)
DWORD
input_count
,
output_count
;
IMFVideoProcessor
*
processor
;
IMFVideoDeviceID
*
deviceid
;
MFVideoNormalizedRect
rect
;
DWORD
input_id
,
output_id
;
IMFTransform
*
transform
;
DXVA2_ValueRange
range
;
...
...
@@ -508,6 +509,29 @@ todo_wine
hr
=
IMFTransform_QueryInterface
(
transform
,
&
IID_IMFVideoDeviceID
,
(
void
**
)
&
deviceid
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetAttributes
(
transform
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetAttributes
(
transform
,
&
attributes
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetAttributes
(
transform
,
&
attributes2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
attributes
==
attributes2
,
"Unexpected attributes instance.
\n
"
);
IMFAttributes_Release
(
attributes2
);
hr
=
IMFAttributes_GetCount
(
attributes
,
&
count
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
count
==
1
,
"Unexpected attribute count %u.
\n
"
,
count
);
memset
(
&
rect
,
0
,
sizeof
(
rect
));
hr
=
IMFAttributes_GetBlob
(
attributes
,
&
VIDEO_ZOOM_RECT
,
(
UINT8
*
)
&
rect
,
sizeof
(
rect
),
NULL
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
rect
.
left
==
0
.
0
f
&&
rect
.
top
==
0
.
0
f
&&
rect
.
right
==
1
.
0
f
&&
rect
.
bottom
==
1
.
0
f
,
"Unexpected zoom rect (%f, %f) - (%f, %f).
\n
"
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
IMFAttributes_Release
(
attributes
);
hr
=
IMFVideoDeviceID_GetDeviceID
(
deviceid
,
NULL
);
ok
(
hr
==
E_POINTER
,
"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