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
19826fd6
Commit
19826fd6
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/vmr9: Wait in Receive() while paused.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6014c0a9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
10 deletions
+25
-10
vmr7.c
dlls/quartz/tests/vmr7.c
+5
-5
vmr9.c
dlls/quartz/tests/vmr9.c
+5
-5
vmr9.c
dlls/quartz/vmr9.c
+15
-0
No files found.
dlls/quartz/tests/vmr7.c
View file @
19826fd6
...
...
@@ -1106,7 +1106,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
);
...
...
@@ -1139,7 +1139,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
);
...
...
@@ -1165,7 +1165,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
);
...
...
@@ -1240,7 +1240,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
);
...
...
@@ -1264,7 +1264,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/tests/vmr9.c
View file @
19826fd6
...
...
@@ -1110,7 +1110,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
);
...
...
@@ -1143,7 +1143,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
);
...
...
@@ -1169,7 +1169,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
);
...
...
@@ -1244,7 +1244,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
);
...
...
@@ -1268,7 +1268,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/vmr9.c
View file @
19826fd6
...
...
@@ -86,6 +86,8 @@ struct quartz_vmr
RECT
target_rect
;
LONG
VideoWidth
;
LONG
VideoHeight
;
HANDLE
run_event
;
};
static
inline
struct
quartz_vmr
*
impl_from_BaseWindow
(
BaseWindow
*
wnd
)
...
...
@@ -259,6 +261,7 @@ static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo *
static
HRESULT
WINAPI
VMR9_DoRenderSample
(
struct
strmbase_renderer
*
iface
,
IMediaSample
*
pSample
)
{
struct
quartz_vmr
*
This
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
const
HANDLE
events
[
2
]
=
{
This
->
run_event
,
This
->
renderer
.
flush_event
};
LPBYTE
pbSrcStream
=
NULL
;
long
cbSrcStream
=
0
;
REFERENCE_TIME
tStart
,
tStop
;
...
...
@@ -318,6 +321,13 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
VMR9_SendSampleData
(
This
,
&
info
,
pbSrcStream
,
cbSrcStream
);
IDirect3DSurface9_Release
(
info
.
lpSurf
);
if
(
This
->
renderer
.
filter
.
state
==
State_Paused
)
{
LeaveCriticalSection
(
&
This
->
renderer
.
csRenderLock
);
WaitForMultipleObjects
(
2
,
events
,
FALSE
,
INFINITE
);
EnterCriticalSection
(
&
This
->
renderer
.
csRenderLock
);
}
return
hr
;
}
...
...
@@ -428,6 +438,7 @@ static void vmr_start_stream(struct strmbase_renderer *iface)
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_DEFERERASE
);
ShowWindow
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
SW_SHOW
);
GetClientRect
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
&
This
->
target_rect
);
SetEvent
(
This
->
run_event
);
}
static
void
vmr_stop_stream
(
struct
strmbase_renderer
*
iface
)
...
...
@@ -438,6 +449,7 @@ static void vmr_stop_stream(struct strmbase_renderer *iface)
if
(
This
->
renderer
.
filter
.
state
==
State_Running
)
IVMRImagePresenter9_StopPresenting
(
This
->
presenter
,
This
->
cookie
);
ResetEvent
(
This
->
run_event
);
}
static
HRESULT
WINAPI
VMR9_ShouldDrawSampleNow
(
struct
strmbase_renderer
*
iface
,
...
...
@@ -502,6 +514,7 @@ static void vmr_destroy(struct strmbase_renderer *iface)
filter
->
allocator_d3d9_dev
=
NULL
;
}
CloseHandle
(
filter
->
run_event
);
FreeLibrary
(
filter
->
hD3d9
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
CoTaskMemFree
(
filter
);
...
...
@@ -2243,6 +2256,8 @@ static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid)
if
(
FAILED
(
hr
))
goto
fail
;
pVMR
->
run_event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
*
out
=
&
pVMR
->
renderer
.
filter
.
IUnknown_inner
;
ZeroMemory
(
&
pVMR
->
source_rect
,
sizeof
(
RECT
));
ZeroMemory
(
&
pVMR
->
target_rect
,
sizeof
(
RECT
));
...
...
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