Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
31add29f
Commit
31add29f
authored
Aug 18, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qasf/tests: Test ASF Reader filter initial state and pins.
parent
d22275a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
0 deletions
+94
-0
asfreader.c
dlls/qasf/tests/asfreader.c
+94
-0
No files found.
dlls/qasf/tests/asfreader.c
View file @
31add29f
...
...
@@ -513,6 +513,99 @@ static void test_filesourcefilter(void)
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
}
static
void
test_filter_state
(
void
)
{
const
WCHAR
*
filename
=
load_resource
(
L"test.wmv"
);
IBaseFilter
*
filter
=
create_asf_reader
();
IFileSourceFilter
*
file_source
;
IReferenceClock
*
clock
;
IEnumPins
*
enum_pins
;
IFilterGraph
*
graph
;
FILTER_STATE
state
;
IPin
*
pins
[
4
];
HRESULT
hr
;
ULONG
ref
;
hr
=
IBaseFilter_QueryInterface
(
filter
,
&
IID_IFileSourceFilter
,
(
void
**
)
&
file_source
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IFileSourceFilter_Load
(
file_source
,
filename
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
IFileSourceFilter_Release
(
file_source
);
hr
=
IBaseFilter_EnumPins
(
filter
,
&
enum_pins
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum_pins
,
1
,
pins
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IPin_Release
(
pins
[
0
]);
IEnumPins_Release
(
enum_pins
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %#x.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
GetTickCount
()
*
10000
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Stopped
,
"Got state %#x.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Stopped
,
"Got state %#x.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %#x.
\n
"
,
state
);
hr
=
CoCreateInstance
(
&
CLSID_FilterGraph
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFilterGraph
,
(
void
**
)
&
graph
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IFilterGraph_AddFilter
(
graph
,
filter
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ref
=
IFilterGraph_Release
(
graph
);
ok
(
!
ref
,
"Got ref %ld.
\n
"
,
ref
);
hr
=
IBaseFilter_EnumPins
(
filter
,
&
enum_pins
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum_pins
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
IPin_Release
(
pins
[
0
]);
hr
=
IEnumPins_Next
(
enum_pins
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
IPin_Release
(
pins
[
0
]);
hr
=
IEnumPins_Next
(
enum_pins
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
IEnumPins_Release
(
enum_pins
);
hr
=
IBaseFilter_GetSyncSource
(
filter
,
&
clock
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
!
clock
,
"Got clock %p.
\n
"
,
clock
);
hr
=
IBaseFilter_Run
(
filter
,
GetTickCount
()
*
10000
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
state
==
State_Running
,
"Got state %#x.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %#x.
\n
"
,
state
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got ref %ld.
\n
"
,
ref
);
}
START_TEST
(
asfreader
)
{
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
...
...
@@ -520,6 +613,7 @@ START_TEST(asfreader)
test_interfaces
();
test_aggregation
();
test_filesourcefilter
();
test_filter_state
();
CoUninitialize
();
}
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