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
6c0954d6
Commit
6c0954d6
authored
Feb 27, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Add a test for IGraphBuilder_Connect().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e5db13a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
filtergraph.c
dlls/quartz/tests/filtergraph.c
+45
-0
No files found.
dlls/quartz/tests/filtergraph.c
View file @
6c0954d6
...
...
@@ -431,6 +431,49 @@ static void rungraph(IFilterGraph2 *graph)
ok
(
hr
==
1
,
"Releasing mediacontrol returned: %x
\n
"
,
hr
);
}
static
void
test_graph_builder_connect
(
WCHAR
*
filename
)
{
static
const
WCHAR
outputW
[]
=
{
'O'
,
'u'
,
't'
,
'p'
,
'u'
,
't'
,
0
};
static
const
WCHAR
inW
[]
=
{
'I'
,
'n'
,
0
};
IBaseFilter
*
source_filter
,
*
video_filter
;
IPin
*
pin_in
,
*
pin_out
;
IFilterGraph2
*
graph
;
IVideoWindow
*
window
;
HRESULT
hr
;
graph
=
create_graph
();
hr
=
CoCreateInstance
(
&
CLSID_VideoRenderer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IVideoWindow
,
(
void
**
)
&
window
);
ok
(
hr
==
S_OK
,
"Failed to create VideoRenderer: %#x
\n
"
,
hr
);
hr
=
IFilterGraph2_AddSourceFilter
(
graph
,
filename
,
NULL
,
&
source_filter
);
ok
(
hr
==
S_OK
,
"AddSourceFilter failed: %#x
\n
"
,
hr
);
hr
=
IVideoWindow_QueryInterface
(
window
,
&
IID_IBaseFilter
,
(
void
**
)
&
video_filter
);
ok
(
hr
==
S_OK
,
"QueryInterface(IBaseFilter) failed: %#x
\n
"
,
hr
);
hr
=
IFilterGraph2_AddFilter
(
graph
,
video_filter
,
NULL
);
ok
(
hr
==
S_OK
,
"AddFilter failed: %#x
\n
"
,
hr
);
hr
=
IBaseFilter_FindPin
(
source_filter
,
outputW
,
&
pin_out
);
ok
(
hr
==
S_OK
,
"FindPin failed: %#x
\n
"
,
hr
);
hr
=
IBaseFilter_FindPin
(
video_filter
,
inW
,
&
pin_in
);
ok
(
hr
==
S_OK
,
"FindPin failed: %#x
\n
"
,
hr
);
hr
=
IFilterGraph2_Connect
(
graph
,
pin_out
,
pin_in
);
if
(
hr
!=
VFW_E_NO_ACCEPTABLE_TYPES
)
{
ok
(
SUCCEEDED
(
hr
),
"Connect failed: %#x
\n
"
,
hr
);
rungraph
(
graph
);
}
IPin_Release
(
pin_in
);
IPin_Release
(
pin_out
);
IBaseFilter_Release
(
source_filter
);
IBaseFilter_Release
(
video_filter
);
IVideoWindow_Release
(
window
);
IFilterGraph2_Release
(
graph
);
}
static
void
test_render_run
(
const
WCHAR
*
file
)
{
IFilterGraph2
*
graph
;
...
...
@@ -463,6 +506,8 @@ static void test_render_run(const WCHAR *file)
refs
=
IFilterGraph2_Release
(
graph
);
ok
(
!
refs
,
"Graph has %u references
\n
"
,
refs
);
test_graph_builder_connect
(
filename
);
/* check reference leaks */
h
=
CreateFileW
(
filename
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
h
!=
INVALID_HANDLE_VALUE
,
"CreateFile failed: err=%d
\n
"
,
GetLastError
());
...
...
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