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
4f6f1bcb
Commit
4f6f1bcb
authored
Dec 12, 2007
by
Lei Zhang
Committed by
Alexandre Julliard
Dec 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Add videorenderer QueryInterface test.
parent
e533e50d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
2 deletions
+106
-2
Makefile.in
dlls/quartz/tests/Makefile.in
+3
-2
videorenderer.c
dlls/quartz/tests/videorenderer.c
+103
-0
No files found.
dlls/quartz/tests/Makefile.in
View file @
4f6f1bcb
...
...
@@ -4,12 +4,13 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
TESTDLL
=
quartz.dll
IMPORTS
=
ole32 kernel32
EXTRALIBS
=
-lstrmiids
EXTRALIBS
=
-lstrmiids
-luuid
CTESTS
=
\
filtergraph.c
\
memallocator.c
\
referenceclock.c
referenceclock.c
\
videorenderer.c
@MAKE_TEST_RULES@
...
...
dlls/quartz/tests/videorenderer.c
0 → 100644
View file @
4f6f1bcb
/*
* Unit tests for Video Renderer functions
*
* Copyright (C) 2007 Google (Lei Zhang)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "wine/test.h"
#include "dshow.h"
#define QI_SUCCEED(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \
ok(hr == S_OK, "IUnknown_QueryInterface returned %x\n", hr); \
ok(ppv != NULL, "Pointer is NULL\n");
#define ADDREF_EXPECT(iface, num) if (iface) { \
hr = IUnknown_AddRef(iface); \
ok(hr == num, "IUnknown_AddRef should return %d, got %d\n", num, hr); \
}
#define RELEASE_EXPECT(iface, num) if (iface) { \
hr = IUnknown_Release(iface); \
ok(hr == num, "IUnknown_Release should return %d, got %d\n", num, hr); \
}
static
IUnknown
*
pVideoRenderer
=
NULL
;
static
int
create_video_renderer
(
void
)
{
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_VideoRenderer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
LPVOID
*
)
&
pVideoRenderer
);
return
(
hr
==
S_OK
&&
pVideoRenderer
!=
NULL
);
}
static
void
release_video_renderer
(
void
)
{
HRESULT
hr
;
hr
=
IUnknown_Release
(
pVideoRenderer
);
ok
(
hr
==
0
,
"IUnknown_Release failed with %x
\n
"
,
hr
);
}
static
void
test_query_interface
(
void
)
{
HRESULT
hr
;
IBaseFilter
*
pBaseFilter
=
NULL
;
IBasicVideo
*
pBasicVideo
=
NULL
;
IDirectDrawVideo
*
pDirectDrawVideo
=
NULL
;
IKsPropertySet
*
pKsPropertySet
=
NULL
;
IMediaPosition
*
pMediaPosition
=
NULL
;
IMediaSeeking
*
pMediaSeeking
=
NULL
;
IQualityControl
*
pQualityControl
=
NULL
;
IQualProp
*
pQualProp
=
NULL
;
IVideoWindow
*
pVideoWindow
=
NULL
;
QI_SUCCEED
(
pVideoRenderer
,
IID_IBaseFilter
,
pBaseFilter
);
RELEASE_EXPECT
(
pBaseFilter
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IBasicVideo
,
pBasicVideo
);
RELEASE_EXPECT
(
pBasicVideo
,
1
);
todo_wine
{
QI_SUCCEED
(
pVideoRenderer
,
IID_IDirectDrawVideo
,
pDirectDrawVideo
);
RELEASE_EXPECT
(
pDirectDrawVideo
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IKsPropertySet
,
pKsPropertySet
);
RELEASE_EXPECT
(
pKsPropertySet
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IMediaPosition
,
pMediaPosition
);
RELEASE_EXPECT
(
pMediaPosition
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IMediaSeeking
,
pMediaSeeking
);
RELEASE_EXPECT
(
pMediaSeeking
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IQualityControl
,
pQualityControl
);
RELEASE_EXPECT
(
pQualityControl
,
1
);
QI_SUCCEED
(
pVideoRenderer
,
IID_IQualProp
,
pQualProp
);
RELEASE_EXPECT
(
pQualProp
,
1
);
}
QI_SUCCEED
(
pVideoRenderer
,
IID_IVideoWindow
,
pVideoWindow
);
RELEASE_EXPECT
(
pVideoWindow
,
1
);
}
START_TEST
(
videorenderer
)
{
CoInitialize
(
NULL
);
if
(
!
create_video_renderer
())
return
;
test_query_interface
();
release_video_renderer
();
}
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