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
e1f00bfc
Commit
e1f00bfc
authored
Sep 26, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/smartteefilter: Use strmbase filter state change methods.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4f29ddf7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
53 deletions
+11
-53
smartteefilter.c
dlls/qcap/smartteefilter.c
+3
-45
smartteefilter.c
dlls/qcap/tests/smartteefilter.c
+8
-8
No files found.
dlls/qcap/smartteefilter.c
View file @
e1f00bfc
...
...
@@ -46,61 +46,19 @@ static inline SmartTeeFilter *impl_from_strmbase_filter(struct strmbase_filter *
return
CONTAINING_RECORD
(
filter
,
SmartTeeFilter
,
filter
);
}
static
inline
SmartTeeFilter
*
impl_from_IBaseFilter
(
IBaseFilter
*
iface
)
{
struct
strmbase_filter
*
filter
=
CONTAINING_RECORD
(
iface
,
struct
strmbase_filter
,
IBaseFilter_iface
);
return
impl_from_strmbase_filter
(
filter
);
}
static
inline
SmartTeeFilter
*
impl_from_strmbase_pin
(
struct
strmbase_pin
*
pin
)
{
return
impl_from_strmbase_filter
(
pin
->
filter
);
}
static
HRESULT
WINAPI
SmartTeeFilter_Stop
(
IBaseFilter
*
iface
)
{
SmartTeeFilter
*
This
=
impl_from_IBaseFilter
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
EnterCriticalSection
(
&
This
->
filter
.
csFilter
);
This
->
filter
.
state
=
State_Stopped
;
LeaveCriticalSection
(
&
This
->
filter
.
csFilter
);
return
S_OK
;
}
static
HRESULT
WINAPI
SmartTeeFilter_Pause
(
IBaseFilter
*
iface
)
{
SmartTeeFilter
*
This
=
impl_from_IBaseFilter
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
SmartTeeFilter_Run
(
IBaseFilter
*
iface
,
REFERENCE_TIME
tStart
)
{
SmartTeeFilter
*
This
=
impl_from_IBaseFilter
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p, %s)
\n
"
,
This
,
wine_dbgstr_longlong
(
tStart
));
EnterCriticalSection
(
&
This
->
filter
.
csFilter
);
if
(
This
->
filter
.
state
!=
State_Running
)
{
/* We share an allocator among all pins, an allocator can only get committed
* once, state transitions occur in upstream order, and only output pins
* commit allocators, so let the filter attached to the input pin worry about it. */
if
(
This
->
sink
.
pin
.
pConnectedTo
)
This
->
filter
.
state
=
State_Running
;
else
hr
=
VFW_E_NOT_CONNECTED
;
}
LeaveCriticalSection
(
&
This
->
filter
.
csFilter
);
return
hr
;
}
static
const
IBaseFilterVtbl
SmartTeeFilterVtbl
=
{
BaseFilterImpl_QueryInterface
,
BaseFilterImpl_AddRef
,
BaseFilterImpl_Release
,
BaseFilterImpl_GetClassID
,
SmartTeeFilter
_Stop
,
SmartTeeFilter
_Pause
,
SmartTeeFilter
_Run
,
BaseFilterImpl
_Stop
,
BaseFilterImpl
_Pause
,
BaseFilterImpl
_Run
,
BaseFilterImpl_GetState
,
BaseFilterImpl_SetSyncSource
,
BaseFilterImpl_GetSyncSource
,
...
...
dlls/qcap/tests/smartteefilter.c
View file @
e1f00bfc
...
...
@@ -2166,25 +2166,25 @@ static void test_unconnected_filter_state(void)
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_CANT_CUE
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_CANT_CUE
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -2194,11 +2194,11 @@ static void test_unconnected_filter_state(void)
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
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