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
d2910bb7
Commit
d2910bb7
authored
Jun 19, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Simplify the file handling in filtergraph.c.
parent
ee9ca54e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
filtergraph.c
dlls/quartz/tests/filtergraph.c
+9
-19
No files found.
dlls/quartz/tests/filtergraph.c
View file @
d2910bb7
...
...
@@ -41,9 +41,8 @@ typedef struct TestFilterImpl
UINT
nPins
;
}
TestFilterImpl
;
#define FILE_LEN 9
static
const
char
avifileA
[
FILE_LEN
]
=
"test.avi"
;
static
const
char
mpegfileA
[
FILE_LEN
]
=
"test.mpg"
;
static
const
WCHAR
avifile
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'.'
,
'a'
,
'v'
,
'i'
,
0
};
static
const
WCHAR
mpegfile
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'.'
,
'm'
,
'p'
,
'g'
,
0
};
static
IGraphBuilder
*
pgraph
;
...
...
@@ -53,17 +52,6 @@ static int createfiltergraph(void)
&
CLSID_FilterGraph
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IGraphBuilder
,
(
LPVOID
*
)
&
pgraph
);
}
static
void
renderfile
(
const
char
*
fileA
)
{
HRESULT
hr
;
WCHAR
fileW
[
FILE_LEN
];
MultiByteToWideChar
(
CP_ACP
,
0
,
fileA
,
-
1
,
fileW
,
FILE_LEN
);
hr
=
IGraphBuilder_RenderFile
(
pgraph
,
fileW
,
NULL
);
ok
(
hr
==
S_OK
,
"RenderFile returned: %x
\n
"
,
hr
);
}
static
void
rungraph
(
void
)
{
HRESULT
hr
;
...
...
@@ -155,17 +143,19 @@ static void releasefiltergraph(void)
ok
(
hr
==
0
,
"Releasing filtergraph returned: %x
\n
"
,
hr
);
}
static
void
test_render_run
(
const
char
*
fileA
)
static
void
test_render_run
(
const
WCHAR
*
file
)
{
HANDLE
h
;
HRESULT
hr
;
if
(
!
createfiltergraph
())
return
;
h
=
CreateFile
A
(
fileA
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
h
=
CreateFile
W
(
file
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
if
(
h
!=
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
h
);
renderfile
(
fileA
);
hr
=
IGraphBuilder_RenderFile
(
pgraph
,
file
,
NULL
);
ok
(
hr
==
S_OK
,
"RenderFile returned: %x
\n
"
,
hr
);
rungraph
();
}
...
...
@@ -1883,8 +1873,8 @@ static void test_render_filter_priority(void)
START_TEST
(
filtergraph
)
{
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
test_render_run
(
avifile
A
);
test_render_run
(
mpegfile
A
);
test_render_run
(
avifile
);
test_render_run
(
mpegfile
);
test_graph_builder
();
test_graph_builder_addfilter
();
test_mediacontrol
();
...
...
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