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
3b5198c8
Commit
3b5198c8
authored
Oct 02, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/videorenderer: Create the window on the same thread as the filter.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
428c5b28
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
47 deletions
+2
-47
filtergraph.c
dlls/quartz/tests/filtergraph.c
+1
-1
videorenderer.c
dlls/quartz/videorenderer.c
+1
-46
No files found.
dlls/quartz/tests/filtergraph.c
View file @
3b5198c8
...
...
@@ -4095,7 +4095,7 @@ static void test_window_threading(void)
if
((
hwnd
=
get_renderer_hwnd
(
graph
)))
{
tid
=
GetWindowThreadProcessId
(
hwnd
,
NULL
);
todo_wine
ok
(
tid
==
GetCurrentThreadId
(),
"Window should be created on main thread.
\n
"
);
ok
(
tid
==
GetCurrentThreadId
(),
"Window should be created on main thread.
\n
"
);
}
else
skip
(
"Could not find renderer window.
\n
"
);
...
...
dlls/quartz/videorenderer.c
View file @
3b5198c8
...
...
@@ -45,11 +45,8 @@ typedef struct VideoRendererImpl
IOverlay
IOverlay_iface
;
BOOL
init
;
HANDLE
hThread
;
DWORD
ThreadID
;
HANDLE
hEvent
;
BOOL
ThreadResult
;
RECT
SourceRect
;
RECT
DestRect
;
RECT
WindowPos
;
...
...
@@ -83,54 +80,15 @@ static inline VideoRendererImpl *impl_from_BaseControlVideo(BaseControlVideo *if
return
CONTAINING_RECORD
(
iface
,
VideoRendererImpl
,
baseControlVideo
);
}
static
DWORD
WINAPI
MessageLoop
(
LPVOID
lpParameter
)
{
VideoRendererImpl
*
This
=
lpParameter
;
MSG
msg
;
BOOL
fGotMessage
;
TRACE
(
"Starting message loop
\n
"
);
if
(
FAILED
(
BaseWindowImpl_PrepareWindow
(
&
This
->
baseControlWindow
.
baseWindow
)))
{
This
->
ThreadResult
=
FALSE
;
SetEvent
(
This
->
hEvent
);
return
0
;
}
This
->
ThreadResult
=
TRUE
;
SetEvent
(
This
->
hEvent
);
while
((
fGotMessage
=
GetMessageW
(
&
msg
,
NULL
,
0
,
0
))
!=
0
&&
fGotMessage
!=
-
1
)
{
TranslateMessage
(
&
msg
);
DispatchMessageW
(
&
msg
);
}
TRACE
(
"End of message loop
\n
"
);
return
msg
.
wParam
;
}
static
BOOL
CreateRenderingSubsystem
(
VideoRendererImpl
*
This
)
{
This
->
hEvent
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
if
(
!
This
->
hEvent
)
return
FALSE
;
This
->
hThread
=
CreateThread
(
NULL
,
0
,
MessageLoop
,
This
,
0
,
&
This
->
ThreadID
);
if
(
!
This
->
hThread
)
{
CloseHandle
(
This
->
hEvent
);
return
FALSE
;
}
WaitForSingleObject
(
This
->
hEvent
,
INFINITE
);
if
(
!
This
->
ThreadResult
)
if
(
FAILED
(
BaseWindowImpl_PrepareWindow
(
&
This
->
baseControlWindow
.
baseWindow
)))
{
CloseHandle
(
This
->
hEvent
);
CloseHandle
(
This
->
hThread
);
return
FALSE
;
}
...
...
@@ -379,9 +337,6 @@ static void video_renderer_destroy(BaseRenderer *iface)
BaseControlWindow_Destroy
(
&
filter
->
baseControlWindow
);
BaseControlVideo_Destroy
(
&
filter
->
baseControlVideo
);
PostThreadMessageW
(
filter
->
ThreadID
,
WM_QUIT
,
0
,
0
);
WaitForSingleObject
(
filter
->
hThread
,
INFINITE
);
CloseHandle
(
filter
->
hThread
);
CloseHandle
(
filter
->
hEvent
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
...
...
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