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
94822bae
Commit
94822bae
authored
Dec 05, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/vmr9: Create the rendering window when the filter is created.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54da011d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
36 deletions
+18
-36
vmr7.c
dlls/quartz/tests/vmr7.c
+1
-1
vmr9.c
dlls/quartz/tests/vmr9.c
+1
-1
vmr9.c
dlls/quartz/vmr9.c
+16
-34
No files found.
dlls/quartz/tests/vmr7.c
View file @
94822bae
...
...
@@ -1453,7 +1453,7 @@ static void test_overlay(void)
hwnd
=
(
HWND
)
0xdeadbeef
;
hr
=
IOverlay_GetWindowHandle
(
overlay
,
&
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
hwnd
&&
hwnd
!=
(
HWND
)
0xdeadbeef
,
"Got invalid window %p.
\n
"
,
hwnd
);
ok
(
hwnd
&&
hwnd
!=
(
HWND
)
0xdeadbeef
,
"Got invalid window %p.
\n
"
,
hwnd
);
IOverlay_Release
(
overlay
);
IPin_Release
(
pin
);
...
...
dlls/quartz/tests/vmr9.c
View file @
94822bae
...
...
@@ -1453,7 +1453,7 @@ static void test_overlay(void)
hwnd
=
(
HWND
)
0xdeadbeef
;
hr
=
IOverlay_GetWindowHandle
(
overlay
,
&
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
hwnd
&&
hwnd
!=
(
HWND
)
0xdeadbeef
,
"Got invalid window %p.
\n
"
,
hwnd
);
ok
(
hwnd
&&
hwnd
!=
(
HWND
)
0xdeadbeef
,
"Got invalid window %p.
\n
"
,
hwnd
);
IOverlay_Release
(
overlay
);
IPin_Release
(
pin
);
...
...
dlls/quartz/vmr9.c
View file @
94822bae
...
...
@@ -294,7 +294,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
info
.
dwFlags
|=
VMR9Sample_SyncPoint
;
/* If we render ourselves, and this is a preroll sample, discard it */
if
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
&&
(
info
.
dwFlags
&
VMR9Sample_Preroll
)
)
if
(
info
.
dwFlags
&
VMR9Sample_Preroll
)
{
return
S_OK
;
}
...
...
@@ -374,7 +374,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force)
HRESULT
hr
;
TRACE
(
"my mode: %u, my window: %p, my last window: %p
\n
"
,
This
->
mode
,
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
This
->
hWndClippingWindow
);
if
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
||
!
This
->
renderer
.
sink
.
pin
.
peer
)
if
(
This
->
num_surfaces
||
!
This
->
renderer
.
sink
.
pin
.
peer
)
return
S_OK
;
if
(
This
->
mode
==
VMR9Mode_Windowless
&&
!
This
->
hWndClippingWindow
)
...
...
@@ -516,6 +516,7 @@ static void vmr_destroy(struct strmbase_renderer *iface)
CloseHandle
(
filter
->
run_event
);
FreeLibrary
(
filter
->
hD3d9
);
BaseControlWindow_Destroy
(
&
filter
->
baseControlWindow
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
CoTaskMemFree
(
filter
);
}
...
...
@@ -1510,13 +1511,10 @@ static HRESULT WINAPI VMR7WindowlessControl_SetVideoPosition(IVMRWindowlessContr
if
(
dest
)
{
This
->
target_rect
=
*
dest
;
if
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
)
{
FIXME
(
"Output rectangle: %s
\n
"
,
wine_dbgstr_rect
(
dest
));
SetWindowPos
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
NULL
,
dest
->
left
,
dest
->
top
,
dest
->
right
-
dest
->
left
,
dest
->
bottom
-
dest
->
top
,
SWP_NOACTIVATE
|
SWP_NOCOPYBITS
|
SWP_NOOWNERZORDER
|
SWP_NOREDRAW
);
}
FIXME
(
"Output rectangle: %s.
\n
"
,
wine_dbgstr_rect
(
dest
));
SetWindowPos
(
This
->
baseControlWindow
.
baseWindow
.
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
);
...
...
@@ -1714,12 +1712,10 @@ static HRESULT WINAPI VMR9WindowlessControl_SetVideoPosition(IVMRWindowlessContr
if
(
dest
)
{
This
->
target_rect
=
*
dest
;
if
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
)
{
FIXME
(
"Output rectangle: %s
\n
"
,
wine_dbgstr_rect
(
dest
));
SetWindowPos
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
NULL
,
dest
->
left
,
dest
->
top
,
dest
->
right
-
dest
->
left
,
dest
->
bottom
-
dest
->
top
,
SWP_NOACTIVATE
|
SWP_NOCOPYBITS
|
SWP_NOOWNERZORDER
|
SWP_NOREDRAW
);
}
FIXME
(
"Output rectangle: %s.
\n
"
,
wine_dbgstr_rect
(
dest
));
SetWindowPos
(
This
->
baseControlWindow
.
baseWindow
.
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
);
...
...
@@ -2251,6 +2247,9 @@ static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid)
if
(
FAILED
(
hr
))
goto
fail
;
if
(
FAILED
(
hr
=
BaseWindowImpl_PrepareWindow
(
&
pVMR
->
baseControlWindow
.
baseWindow
)))
goto
fail
;
hr
=
strmbase_video_init
(
&
pVMR
->
baseControlVideo
,
&
pVMR
->
renderer
.
filter
,
&
pVMR
->
renderer
.
sink
.
pin
,
&
renderer_BaseControlVideoFuncTable
);
if
(
FAILED
(
hr
))
...
...
@@ -2265,6 +2264,7 @@ static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid)
return
hr
;
fail:
BaseWindowImpl_DoneWithWindow
(
&
pVMR
->
baseControlWindow
.
baseWindow
);
strmbase_renderer_cleanup
(
&
pVMR
->
renderer
);
FreeLibrary
(
pVMR
->
hD3d9
);
CoTaskMemFree
(
pVMR
);
...
...
@@ -2594,9 +2594,6 @@ static BOOL CreateRenderingWindow(VMR9DefaultAllocatorPresenterImpl *This, VMR9A
TRACE
(
"(%p)->()
\n
"
,
This
);
if
(
FAILED
(
BaseWindowImpl_PrepareWindow
(
&
This
->
pVMR9
->
baseControlWindow
.
baseWindow
)))
return
FALSE
;
/* Obtain a monitor and d3d9 device */
d3d9_adapter
=
d3d9_adapter_from_hwnd
(
This
->
d3d9_ptr
,
This
->
pVMR9
->
baseControlWindow
.
baseWindow
.
hWnd
,
&
This
->
hMon
);
...
...
@@ -2612,7 +2609,6 @@ static BOOL CreateRenderingWindow(VMR9DefaultAllocatorPresenterImpl *This, VMR9A
if
(
FAILED
(
hr
))
{
ERR
(
"Could not create device: %08x
\n
"
,
hr
);
BaseWindowImpl_DoneWithWindow
(
&
This
->
pVMR9
->
baseControlWindow
.
baseWindow
);
return
FALSE
;
}
IVMRSurfaceAllocatorNotify9_SetD3DDevice
(
This
->
SurfaceAllocatorNotify
,
This
->
d3d9_dev
,
This
->
hMon
);
...
...
@@ -2634,7 +2630,6 @@ static BOOL CreateRenderingWindow(VMR9DefaultAllocatorPresenterImpl *This, VMR9A
if
(
FAILED
(
hr
))
{
IVMRSurfaceAllocatorEx9_TerminateDevice
(
This
->
pVMR9
->
allocator
,
This
->
pVMR9
->
cookie
);
BaseWindowImpl_DoneWithWindow
(
&
This
->
pVMR9
->
baseControlWindow
.
baseWindow
);
return
FALSE
;
}
...
...
@@ -2666,14 +2661,7 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_InitializeDevice(IVMRSurfaceAllocato
static
HRESULT
WINAPI
VMR9_SurfaceAllocator_TerminateDevice
(
IVMRSurfaceAllocatorEx9
*
iface
,
DWORD_PTR
id
)
{
VMR9DefaultAllocatorPresenterImpl
*
This
=
impl_from_IVMRSurfaceAllocatorEx9
(
iface
);
if
(
!
This
->
pVMR9
->
baseControlWindow
.
baseWindow
.
hWnd
)
{
return
S_OK
;
}
BaseWindowImpl_DoneWithWindow
(
&
This
->
pVMR9
->
baseControlWindow
.
baseWindow
);
TRACE
(
"iface %p, id %#lx.
\n
"
,
iface
,
id
);
return
S_OK
;
}
...
...
@@ -2688,12 +2676,6 @@ static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPrese
D3DPRESENT_PARAMETERS
d3dpp
;
HRESULT
hr
;
if
(
!
This
->
pVMR9
->
baseControlWindow
.
baseWindow
.
hWnd
)
{
ERR
(
"No window
\n
"
);
return
E_FAIL
;
}
if
(
!
This
->
d3d9_surfaces
||
!
This
->
reset
)
return
S_OK
;
...
...
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