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
84c2fda6
Commit
84c2fda6
authored
Jun 21, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream/tests: Get rid of global stream pointer that we don't really need.
parent
5b248546
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
amstream.c
dlls/amstream/tests/amstream.c
+16
-17
No files found.
dlls/amstream/tests/amstream.c
View file @
84c2fda6
...
...
@@ -28,19 +28,15 @@
static
const
WCHAR
filenameW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'.'
,
'a'
,
'v'
,
'i'
,
0
};
static
IAMMultiMediaStream
*
pams
;
static
IDirectDraw7
*
pdd7
;
static
IDirectDrawSurface7
*
pdds7
;
static
int
create_ammultimediastream
(
void
)
static
IAMMultiMediaStream
*
create_ammultimediastream
(
void
)
{
return
S_OK
==
CoCreateInstance
(
&
CLSID_AMMultiMediaStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IAMMultiMediaStream
,
(
LPVOID
*
)
&
pams
);
}
static
void
release_ammultimediastream
(
void
)
{
IAMMultiMediaStream_Release
(
pams
);
IAMMultiMediaStream
*
stream
=
NULL
;
CoCreateInstance
(
&
CLSID_AMMultiMediaStream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IAMMultiMediaStream
,
(
void
**
)
&
stream
);
return
stream
;
}
static
int
create_directdraw
(
void
)
...
...
@@ -89,10 +85,11 @@ static void release_directdraw(void)
static
void
test_openfile
(
void
)
{
IAMMultiMediaStream
*
pams
;
HRESULT
hr
;
IGraphBuilder
*
pgraph
;
if
(
!
create_ammultimediastream
(
))
if
(
!
(
pams
=
create_ammultimediastream
()
))
return
;
hr
=
IAMMultiMediaStream_GetFilterGraph
(
pams
,
&
pgraph
);
...
...
@@ -112,21 +109,22 @@ static void test_openfile(void)
if
(
pgraph
)
IGraphBuilder_Release
(
pgraph
);
release_ammultimediastream
(
);
IAMMultiMediaStream_Release
(
pams
);
}
static
void
test_renderfile
(
void
)
{
IAMMultiMediaStream
*
pams
;
HRESULT
hr
;
IMediaStream
*
pvidstream
=
NULL
;
IDirectDrawMediaStream
*
pddstream
=
NULL
;
IDirectDrawStreamSample
*
pddsample
=
NULL
;
if
(
!
create_ammultimediastream
(
))
if
(
!
(
pams
=
create_ammultimediastream
()
))
return
;
if
(
!
create_directdraw
())
{
release_ammultimediastream
(
);
IAMMultiMediaStream_Release
(
pams
);
return
;
}
...
...
@@ -162,22 +160,23 @@ error:
IMediaStream_Release
(
pvidstream
);
release_directdraw
();
release_ammultimediastream
(
);
IAMMultiMediaStream_Release
(
pams
);
}
static
void
test_media_streams
(
void
)
{
IAMMultiMediaStream
*
pams
;
HRESULT
hr
;
IMediaStream
*
video_stream
=
NULL
;
IMediaStream
*
audio_stream
=
NULL
;
IMediaStream
*
dummy_stream
;
IMediaStreamFilter
*
media_stream_filter
=
NULL
;
if
(
!
create_ammultimediastream
(
))
if
(
!
(
pams
=
create_ammultimediastream
()
))
return
;
if
(
!
create_directdraw
())
{
release_ammultimediastream
(
);
IAMMultiMediaStream_Release
(
pams
);
return
;
}
...
...
@@ -424,7 +423,7 @@ static void test_media_streams(void)
IMediaStreamFilter_Release
(
media_stream_filter
);
release_directdraw
();
release_ammultimediastream
(
);
IAMMultiMediaStream_Release
(
pams
);
}
START_TEST
(
amstream
)
...
...
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