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
fa32c8e3
Commit
fa32c8e3
authored
May 12, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
May 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/vmr9: Destroy the window when set to windowless or renderless mode.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3c0b0cc8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
27 deletions
+17
-27
vmr9.c
dlls/quartz/tests/vmr9.c
+5
-5
vmr9.c
dlls/quartz/vmr9.c
+12
-22
No files found.
dlls/quartz/tests/vmr9.c
View file @
fa32c8e3
...
...
@@ -1734,8 +1734,8 @@ static void test_overlay(void)
hwnd
=
(
HWND
)
0xdeadbeef
;
hr
=
IOverlay_GetWindowHandle
(
overlay
,
&
hwnd
);
todo_wine
ok
(
hr
==
VFW_E_WRONG_STATE
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
hwnd
==
(
HWND
)
0xdeadbeef
,
"Got invalid
window %p.
\n
"
,
hwnd
);
ok
(
hr
==
VFW_E_WRONG_STATE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hwnd
==
(
HWND
)
0xdeadbeef
,
"Got
window %p.
\n
"
,
hwnd
);
IOverlay_Release
(
overlay
);
IPin_Release
(
pin
);
...
...
@@ -1750,8 +1750,8 @@ static void test_overlay(void)
hwnd
=
(
HWND
)
0xdeadbeef
;
hr
=
IOverlay_GetWindowHandle
(
overlay
,
&
hwnd
);
todo_wine
ok
(
hr
==
VFW_E_WRONG_STATE
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
hwnd
==
(
HWND
)
0xdeadbeef
,
"Got invalid
window %p.
\n
"
,
hwnd
);
ok
(
hr
==
VFW_E_WRONG_STATE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hwnd
==
(
HWND
)
0xdeadbeef
,
"Got
window %p.
\n
"
,
hwnd
);
IOverlay_Release
(
overlay
);
IPin_Release
(
pin
);
...
...
@@ -3854,7 +3854,7 @@ static void test_windowless_size(void)
SetRect
(
&
expect
,
4
,
6
,
16
,
12
);
ok
(
EqualRect
(
&
src
,
&
expect
),
"Got source rect %s.
\n
"
,
wine_dbgstr_rect
(
&
src
));
SetRect
(
&
expect
,
40
,
60
,
120
,
160
);
todo_wine
ok
(
EqualRect
(
&
dst
,
&
expect
),
"Got dest rect %s.
\n
"
,
wine_dbgstr_rect
(
&
dst
));
ok
(
EqualRect
(
&
dst
,
&
expect
),
"Got dest rect %s.
\n
"
,
wine_dbgstr_rect
(
&
dst
));
GetWindowRect
(
window
,
&
src
);
SetRect
(
&
expect
,
0
,
0
,
640
,
480
);
...
...
dlls/quartz/vmr9.c
View file @
fa32c8e3
...
...
@@ -458,13 +458,12 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
static
void
vmr_start_stream
(
struct
strmbase_renderer
*
iface
)
{
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
TRACE
(
"(%p)
\n
"
,
This
);
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
IVMRImagePresenter9_StartPresenting
(
This
->
presenter
,
This
->
cookie
);
ShowWindow
(
This
->
window
.
hwnd
,
SW_SHOW
);
SetEvent
(
This
->
run_event
);
IVMRImagePresenter9_StartPresenting
(
filter
->
presenter
,
filter
->
cookie
);
if
(
filter
->
window
.
hwnd
)
ShowWindow
(
filter
->
window
.
hwnd
,
SW_SHOW
);
SetEvent
(
filter
->
run_event
);
}
static
void
vmr_stop_stream
(
struct
strmbase_renderer
*
iface
)
...
...
@@ -1354,6 +1353,9 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface
return
E_INVALIDARG
;
}
if
(
mode
!=
VMR9Mode_Windowed
)
video_window_cleanup
(
&
This
->
window
);
This
->
mode
=
mode
;
LeaveCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
return
hr
;
...
...
@@ -1459,13 +1461,7 @@ static HRESULT WINAPI VMR7WindowlessControl_SetVideoPosition(IVMRWindowlessContr
if
(
source
)
This
->
window
.
src
=
*
source
;
if
(
dest
)
{
This
->
window
.
dst
=
*
dest
;
FIXME
(
"Output rectangle: %s.
\n
"
,
wine_dbgstr_rect
(
dest
));
SetWindowPos
(
This
->
window
.
hwnd
,
NULL
,
dest
->
left
,
dest
->
top
,
dest
->
right
-
dest
->
left
,
dest
->
bottom
-
dest
->
top
,
SWP_NOACTIVATE
|
SWP_NOCOPYBITS
|
SWP_NOOWNERZORDER
|
SWP_NOREDRAW
);
}
LeaveCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
...
...
@@ -1662,13 +1658,7 @@ static HRESULT WINAPI VMR9WindowlessControl_SetVideoPosition(IVMRWindowlessContr
if
(
source
)
This
->
window
.
src
=
*
source
;
if
(
dest
)
{
This
->
window
.
dst
=
*
dest
;
FIXME
(
"Output rectangle: %s.
\n
"
,
wine_dbgstr_rect
(
dest
));
SetWindowPos
(
This
->
window
.
hwnd
,
NULL
,
dest
->
left
,
dest
->
top
,
dest
->
right
-
dest
->
left
,
dest
->
bottom
-
dest
->
top
,
SWP_NOACTIVATE
|
SWP_NOCOPYBITS
|
SWP_NOOWNERZORDER
|
SWP_NOREDRAW
);
}
LeaveCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
...
...
@@ -1740,7 +1730,7 @@ static HRESULT WINAPI VMR9WindowlessControl_RepaintVideo(IVMRWindowlessControl9
FIXME
(
"(%p/%p)->(...) semi-stub
\n
"
,
iface
,
This
);
EnterCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
if
(
hwnd
!=
This
->
clipping_window
&&
hwnd
!=
This
->
window
.
hwnd
)
if
(
hwnd
!=
This
->
clipping_window
)
{
ERR
(
"Not handling changing windows yet!!!
\n
"
);
LeaveCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
...
...
@@ -2214,6 +2204,9 @@ static HRESULT WINAPI overlay_GetWindowHandle(IOverlay *iface, HWND *window)
TRACE
(
"filter %p, window %p.
\n
"
,
filter
,
window
);
if
(
!
filter
->
window
.
hwnd
)
return
VFW_E_WRONG_STATE
;
*
window
=
filter
->
window
.
hwnd
;
return
S_OK
;
}
...
...
@@ -2424,12 +2417,9 @@ static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *ifac
{
struct
default_presenter
*
This
=
impl_from_IVMRImagePresenter9
(
iface
);
HRESULT
hr
;
RECT
output
;
BOOL
render
=
FALSE
;
TRACE
(
"(%p/%p/%p)->(...) stub
\n
"
,
iface
,
This
,
This
->
pVMR9
);
GetWindowRect
(
This
->
pVMR9
->
window
.
hwnd
,
&
output
);
TRACE
(
"Output rectangle: %s
\n
"
,
wine_dbgstr_rect
(
&
output
));
/* This might happen if we don't have active focus (eg on a different virtual desktop) */
if
(
!
This
->
d3d9_dev
)
...
...
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