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
6014c0a9
Commit
6014c0a9
authored
Nov 21, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/videorenderer: Wait in Receive() while paused.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b78dcbf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
videorenderer.c
dlls/quartz/tests/videorenderer.c
+5
-5
videorenderer.c
dlls/quartz/videorenderer.c
+24
-1
No files found.
dlls/quartz/tests/videorenderer.c
View file @
6014c0a9
...
...
@@ -744,7 +744,7 @@ static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph)
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -777,7 +777,7 @@ static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph)
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
hr
=
IMediaControl_Run
(
control
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -803,7 +803,7 @@ static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph)
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
hr
=
IMediaControl_Run
(
control
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -868,7 +868,7 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph)
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
thread
=
send_frame
(
input
);
todo_wine
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -892,7 +892,7 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph)
todo_wine
ok
(
hr
==
VFW_S_STATE_INTERMEDIATE
,
"Got hr %#x.
\n
"
,
hr
);
thread
=
send_frame
(
input
);
todo_wine
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
ok
(
WaitForSingleObject
(
thread
,
100
)
==
WAIT_TIMEOUT
,
"Thread should block in Receive().
\n
"
);
hr
=
IMediaControl_Run
(
control
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
dlls/quartz/videorenderer.c
View file @
6014c0a9
...
...
@@ -54,6 +54,8 @@ typedef struct VideoRendererImpl
LONG
FullScreenMode
;
DWORD
saved_style
;
HANDLE
run_event
;
}
VideoRendererImpl
;
static
inline
VideoRendererImpl
*
impl_from_BaseWindow
(
BaseWindow
*
iface
)
...
...
@@ -176,6 +178,15 @@ static HRESULT WINAPI VideoRenderer_DoRenderSample(struct strmbase_renderer *ifa
pbSrcStream
,
(
BITMAPINFO
*
)
bih
,
DIB_RGB_COLORS
,
SRCCOPY
);
ReleaseDC
(
filter
->
baseControlWindow
.
baseWindow
.
hWnd
,
dc
);
if
(
filter
->
renderer
.
filter
.
state
==
State_Paused
)
{
const
HANDLE
events
[
2
]
=
{
filter
->
run_event
,
filter
->
renderer
.
flush_event
};
LeaveCriticalSection
(
&
filter
->
renderer
.
csRenderLock
);
WaitForMultipleObjects
(
2
,
events
,
FALSE
,
INFINITE
);
EnterCriticalSection
(
&
filter
->
renderer
.
csRenderLock
);
}
return
S_OK
;
}
...
...
@@ -234,7 +245,7 @@ static void video_renderer_destroy(struct strmbase_renderer *iface)
BaseControlWindow_Destroy
(
&
filter
->
baseControlWindow
);
BaseControlVideo_Destroy
(
&
filter
->
baseControlVideo
);
CloseHandle
(
filter
->
run_event
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
CoTaskMemFree
(
filter
);
}
...
...
@@ -267,6 +278,13 @@ static HRESULT video_renderer_pin_query_interface(struct strmbase_renderer *ifac
return
S_OK
;
}
static
void
video_renderer_start_stream
(
struct
strmbase_renderer
*
iface
)
{
VideoRendererImpl
*
filter
=
impl_from_strmbase_renderer
(
iface
);
SetEvent
(
filter
->
run_event
);
}
static
void
video_renderer_stop_stream
(
struct
strmbase_renderer
*
iface
)
{
VideoRendererImpl
*
This
=
impl_from_strmbase_renderer
(
iface
);
...
...
@@ -276,6 +294,8 @@ static void video_renderer_stop_stream(struct strmbase_renderer *iface)
if
(
This
->
baseControlWindow
.
AutoShow
)
/* Black it out */
RedrawWindow
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
NULL
,
NULL
,
RDW_INVALIDATE
|
RDW_ERASE
);
ResetEvent
(
This
->
run_event
);
}
static
void
video_renderer_init_stream
(
struct
strmbase_renderer
*
iface
)
...
...
@@ -315,6 +335,7 @@ static const struct strmbase_renderer_ops renderer_ops =
.
pfnCheckMediaType
=
VideoRenderer_CheckMediaType
,
.
pfnDoRenderSample
=
VideoRenderer_DoRenderSample
,
.
renderer_init_stream
=
video_renderer_init_stream
,
.
renderer_start_stream
=
video_renderer_start_stream
,
.
renderer_stop_stream
=
video_renderer_stop_stream
,
.
pfnShouldDrawSampleNow
=
VideoRenderer_ShouldDrawSampleNow
,
.
renderer_destroy
=
video_renderer_destroy
,
...
...
@@ -722,6 +743,8 @@ HRESULT VideoRenderer_create(IUnknown *outer, void **out)
if
(
FAILED
(
hr
=
BaseWindowImpl_PrepareWindow
(
&
pVideoRenderer
->
baseControlWindow
.
baseWindow
)))
goto
fail
;
pVideoRenderer
->
run_event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
*
out
=
&
pVideoRenderer
->
renderer
.
filter
.
IUnknown_inner
;
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