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
f4ae2e3b
Commit
f4ae2e3b
authored
Feb 20, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qasf/dmowrapper: Flush the DMO on IPin::EndFlush().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
86202ed6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
1 deletion
+69
-1
dmowrapper.c
dlls/qasf/dmowrapper.c
+23
-0
dmowrapper.c
dlls/qasf/tests/dmowrapper.c
+46
-1
No files found.
dlls/qasf/dmowrapper.c
View file @
f4ae2e3b
...
...
@@ -361,6 +361,28 @@ static HRESULT dmo_wrapper_sink_eos(struct strmbase_sink *iface)
return
hr
;
}
static
HRESULT
dmo_wrapper_end_flush
(
struct
strmbase_sink
*
iface
)
{
struct
dmo_wrapper
*
filter
=
impl_from_strmbase_filter
(
iface
->
pin
.
filter
);
IMediaObject
*
dmo
;
HRESULT
hr
;
DWORD
i
;
IUnknown_QueryInterface
(
filter
->
dmo
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
if
(
FAILED
(
hr
=
IMediaObject_Flush
(
dmo
)))
ERR
(
"Flush() failed, hr %#x.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
filter
->
source_count
;
++
i
)
{
if
(
filter
->
sources
[
i
].
pin
.
pin
.
peer
)
IPin_EndFlush
(
filter
->
sources
[
i
].
pin
.
pin
.
peer
);
}
IMediaObject_Release
(
dmo
);
return
hr
;
}
static
const
struct
strmbase_sink_ops
sink_ops
=
{
.
base
.
pin_query_interface
=
dmo_wrapper_sink_query_interface
,
...
...
@@ -369,6 +391,7 @@ static const struct strmbase_sink_ops sink_ops =
.
sink_connect
=
dmo_wrapper_sink_connect
,
.
sink_disconnect
=
dmo_wrapper_sink_disconnect
,
.
sink_eos
=
dmo_wrapper_sink_eos
,
.
sink_end_flush
=
dmo_wrapper_end_flush
,
.
pfnReceive
=
dmo_wrapper_sink_Receive
,
};
...
...
dlls/qasf/tests/dmowrapper.c
View file @
f4ae2e3b
...
...
@@ -1121,7 +1121,7 @@ struct testfilter
struct
strmbase_source
source
;
struct
strmbase_sink
sink
;
const
AM_MEDIA_TYPE
*
sink_mt
;
unsigned
int
got_new_segment
,
got_eos
;
unsigned
int
got_new_segment
,
got_eos
,
got_begin_flush
,
got_end_flush
;
};
static
inline
struct
testfilter
*
impl_from_strmbase_filter
(
struct
strmbase_filter
*
iface
)
...
...
@@ -1285,6 +1285,20 @@ static HRESULT testsink_eos(struct strmbase_sink *iface)
return
0xdeadbeef
;
}
static
HRESULT
testsink_begin_flush
(
struct
strmbase_sink
*
iface
)
{
struct
testfilter
*
filter
=
impl_from_strmbase_filter
(
iface
->
pin
.
filter
);
++
filter
->
got_begin_flush
;
return
0xdeadbeef
;
}
static
HRESULT
testsink_end_flush
(
struct
strmbase_sink
*
iface
)
{
struct
testfilter
*
filter
=
impl_from_strmbase_filter
(
iface
->
pin
.
filter
);
++
filter
->
got_end_flush
;
return
0xdeadbeef
;
}
static
const
struct
strmbase_sink_ops
testsink_ops
=
{
.
base
.
pin_query_interface
=
testsink_query_interface
,
...
...
@@ -1293,6 +1307,8 @@ static const struct strmbase_sink_ops testsink_ops =
.
pfnReceive
=
testsink_Receive
,
.
sink_new_segment
=
testsink_new_segment
,
.
sink_eos
=
testsink_eos
,
.
sink_begin_flush
=
testsink_begin_flush
,
.
sink_end_flush
=
testsink_end_flush
,
};
static
void
testfilter_init
(
struct
testfilter
*
filter
)
...
...
@@ -1693,6 +1709,35 @@ static void test_streaming_events(IMediaControl *control, IPin *sink, IMemInputP
hr
=
IMemInputPin_Receive
(
input
,
sample
);
todo_wine
ok
(
hr
==
VFW_E_SAMPLE_REJECTED_EOS
,
"Got hr %#x.
\n
"
,
hr
);
got_Flush
=
0
;
ok
(
!
testsink
->
got_begin_flush
,
"Got %u calls to IPin::BeginFlush().
\n
"
,
testsink
->
got_begin_flush
);
ok
(
!
testsink2
->
got_begin_flush
,
"Got %u calls to IPin::BeginFlush().
\n
"
,
testsink2
->
got_begin_flush
);
hr
=
IPin_BeginFlush
(
sink
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
testsink
->
got_begin_flush
==
1
,
"Got %u calls to IPin::BeginFlush().
\n
"
,
testsink
->
got_begin_flush
);
ok
(
testsink2
->
got_begin_flush
==
1
,
"Got %u calls to IPin::BeginFlush().
\n
"
,
testsink2
->
got_begin_flush
);
hr
=
IMemInputPin_Receive
(
input
,
sample
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_EndOfStream
(
sink
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
testsink
->
got_end_flush
,
"Got %u calls to IPin::EndFlush().
\n
"
,
testsink
->
got_end_flush
);
ok
(
!
testsink2
->
got_end_flush
,
"Got %u calls to IPin::EndFlush().
\n
"
,
testsink2
->
got_end_flush
);
hr
=
IPin_EndFlush
(
sink
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
testsink
->
got_end_flush
==
1
,
"Got %u calls to IPin::EndFlush().
\n
"
,
testsink
->
got_end_flush
);
ok
(
testsink2
->
got_end_flush
==
1
,
"Got %u calls to IPin::EndFlush().
\n
"
,
testsink2
->
got_end_flush
);
ok
(
got_Flush
,
"Expected IMediaObject::Flush().
\n
"
);
hr
=
IMemInputPin_Receive
(
input
,
sample
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
got_ProcessInput
==
1
,
"Got %u calls to ProcessInput().
\n
"
,
got_ProcessInput
);
todo_wine
ok
(
got_ProcessOutput
==
1
,
"Got %u calls to ProcessOutput().
\n
"
,
got_ProcessOutput
);
todo_wine
ok
(
got_Receive
==
2
,
"Got %u calls to Receive().
\n
"
,
got_Receive
);
got_ProcessInput
=
got_ProcessOutput
=
got_Receive
=
0
;
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IMediaSample_Release
(
sample
);
...
...
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