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
83d97ad0
Commit
83d97ad0
authored
Apr 14, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit/tests: Add more tests for sample grabber filter interfaces.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b4811dbf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
12 deletions
+88
-12
Makefile.in
dlls/qedit/tests/Makefile.in
+1
-0
mediadet.c
dlls/qedit/tests/mediadet.c
+0
-12
samplegrabber.c
dlls/qedit/tests/samplegrabber.c
+87
-0
No files found.
dlls/qedit/tests/Makefile.in
View file @
83d97ad0
...
...
@@ -3,6 +3,7 @@ IMPORTS = oleaut32 ole32
C_SRCS
=
\
mediadet.c
\
samplegrabber.c
\
timeline.c
RC_SRCS
=
qedit.rc
dlls/qedit/tests/mediadet.c
View file @
83d97ad0
...
...
@@ -612,18 +612,6 @@ static void test_samplegrabber(void)
IMemInputPin_Release
(
inpin
);
IPin_Release
(
pin
);
/* Interfaces that native does not support */
hr
=
ISampleGrabber_QueryInterface
(
sg
,
&
IID_IMediaPosition
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
E_NOINTERFACE
,
"QueryInterface for IID_IMediaPosition failed: %08x
\n
"
,
hr
);
hr
=
ISampleGrabber_QueryInterface
(
sg
,
&
IID_IMediaSeeking
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
E_NOINTERFACE
,
"QueryInterface for IID_IMediaSeeking failed: %08x
\n
"
,
hr
);
hr
=
ISampleGrabber_QueryInterface
(
sg
,
&
IID_IMemInputPin
,
(
void
**
)
&
unk
);
ok
(
hr
==
E_NOINTERFACE
,
"QueryInterface for IID_IMemInputPin failed: %08x
\n
"
,
hr
);
hr
=
ISampleGrabber_QueryInterface
(
sg
,
&
IID_IQualityControl
,
(
void
**
)
&
unk
);
ok
(
hr
==
E_NOINTERFACE
,
"QueryInterface for IID_IQualityControl failed: %08x
\n
"
,
hr
);
hr
=
ISampleGrabber_QueryInterface
(
sg
,
&
IID_ISeekingPassThru
,
(
void
**
)
&
unk
);
ok
(
hr
==
E_NOINTERFACE
,
"QueryInterface for IID_ISeekingPassThru failed: %08x
\n
"
,
hr
);
while
(
ISampleGrabber_Release
(
sg
));
}
...
...
dlls/qedit/tests/samplegrabber.c
0 → 100644
View file @
83d97ad0
/*
* Sample grabber filter unit tests
*
* Copyright 2018 Zebediah Figura
*
* 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 "dshow.h"
#include "qedit.h"
#include "wine/test.h"
static
IBaseFilter
*
create_sample_grabber
(
void
)
{
IBaseFilter
*
filter
=
NULL
;
HRESULT
hr
=
CoCreateInstance
(
&
CLSID_SampleGrabber
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
void
**
)
&
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
return
filter
;
}
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
static
void
check_interface_
(
unsigned
int
line
,
void
*
iface_ptr
,
REFIID
iid
,
BOOL
supported
)
{
IUnknown
*
iface
=
iface_ptr
;
HRESULT
hr
,
expected_hr
;
IUnknown
*
unk
;
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#x, expected %#x.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
static
void
test_interfaces
(
void
)
{
IBaseFilter
*
filter
=
create_sample_grabber
();
ULONG
ref
;
check_interface
(
filter
,
&
IID_IBaseFilter
,
TRUE
);
check_interface
(
filter
,
&
IID_IMediaFilter
,
TRUE
);
check_interface
(
filter
,
&
IID_IPersist
,
TRUE
);
check_interface
(
filter
,
&
IID_ISampleGrabber
,
TRUE
);
check_interface
(
filter
,
&
IID_IUnknown
,
TRUE
);
check_interface
(
filter
,
&
IID_IAMFilterMiscFlags
,
FALSE
);
check_interface
(
filter
,
&
IID_IBasicAudio
,
FALSE
);
check_interface
(
filter
,
&
IID_IBasicVideo
,
FALSE
);
check_interface
(
filter
,
&
IID_IKsPropertySet
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IMediaPosition
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
filter
,
&
IID_IMemInputPin
,
FALSE
);
check_interface
(
filter
,
&
IID_IPersistPropertyBag
,
FALSE
);
check_interface
(
filter
,
&
IID_IPin
,
FALSE
);
check_interface
(
filter
,
&
IID_IQualityControl
,
FALSE
);
check_interface
(
filter
,
&
IID_IQualProp
,
FALSE
);
check_interface
(
filter
,
&
IID_IReferenceClock
,
FALSE
);
check_interface
(
filter
,
&
IID_ISeekingPassThru
,
FALSE
);
check_interface
(
filter
,
&
IID_IVideoWindow
,
FALSE
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got unexpected refcount %d.
\n
"
,
ref
);
}
START_TEST
(
samplegrabber
)
{
CoInitialize
(
NULL
);
test_interfaces
();
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