Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
91d0d9ec
Commit
91d0d9ec
authored
Apr 23, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/filewriter: Implement IAMFilterMiscFlags.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
28f17d8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
2 deletions
+63
-2
filewriter.c
dlls/qcap/filewriter.c
+45
-1
filewriter.c
dlls/qcap/tests/filewriter.c
+18
-1
No files found.
dlls/qcap/filewriter.c
View file @
91d0d9ec
...
...
@@ -29,6 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
struct
file_writer
{
struct
strmbase_filter
filter
;
IAMFilterMiscFlags
IAMFilterMiscFlags_iface
;
IFileSinkFilter
IFileSinkFilter_iface
;
struct
strmbase_sink
sink
;
...
...
@@ -105,7 +106,9 @@ static HRESULT file_writer_query_interface(struct strmbase_filter *iface, REFIID
{
struct
file_writer
*
filter
=
impl_from_strmbase_filter
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IFileSinkFilter
))
if
(
IsEqualGUID
(
iid
,
&
IID_IAMFilterMiscFlags
))
*
out
=
&
filter
->
IAMFilterMiscFlags_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IFileSinkFilter
))
*
out
=
&
filter
->
IFileSinkFilter_iface
;
else
return
E_NOINTERFACE
;
...
...
@@ -228,6 +231,46 @@ static const IFileSinkFilterVtbl filesinkfilter_vtbl =
filesinkfilter_GetCurFile
,
};
static
inline
struct
file_writer
*
impl_from_IAMFilterMiscFlags
(
IAMFilterMiscFlags
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
file_writer
,
IAMFilterMiscFlags_iface
);
}
static
HRESULT
WINAPI
misc_flags_QueryInterface
(
IAMFilterMiscFlags
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
file_writer
*
filter
=
impl_from_IAMFilterMiscFlags
(
iface
);
return
IUnknown_QueryInterface
(
filter
->
filter
.
outer_unk
,
iid
,
out
);
}
static
ULONG
WINAPI
misc_flags_AddRef
(
IAMFilterMiscFlags
*
iface
)
{
struct
file_writer
*
filter
=
impl_from_IAMFilterMiscFlags
(
iface
);
return
IUnknown_AddRef
(
filter
->
filter
.
outer_unk
);
}
static
ULONG
WINAPI
misc_flags_Release
(
IAMFilterMiscFlags
*
iface
)
{
struct
file_writer
*
filter
=
impl_from_IAMFilterMiscFlags
(
iface
);
return
IUnknown_Release
(
filter
->
filter
.
outer_unk
);
}
static
ULONG
WINAPI
misc_flags_GetMiscFlags
(
IAMFilterMiscFlags
*
iface
)
{
struct
file_writer
*
filter
=
impl_from_IAMFilterMiscFlags
(
iface
);
TRACE
(
"filter %p.
\n
"
,
filter
);
return
AM_FILTER_MISC_FLAGS_IS_RENDERER
;
}
static
const
IAMFilterMiscFlagsVtbl
misc_flags_vtbl
=
{
misc_flags_QueryInterface
,
misc_flags_AddRef
,
misc_flags_Release
,
misc_flags_GetMiscFlags
,
};
HRESULT
file_writer_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
static
const
WCHAR
sink_name
[]
=
{
'i'
,
'n'
,
0
};
...
...
@@ -238,6 +281,7 @@ HRESULT file_writer_create(IUnknown *outer, IUnknown **out)
strmbase_filter_init
(
&
object
->
filter
,
outer
,
&
CLSID_FileWriter
,
&
filter_ops
);
object
->
IFileSinkFilter_iface
.
lpVtbl
=
&
filesinkfilter_vtbl
;
object
->
IAMFilterMiscFlags_iface
.
lpVtbl
=
&
misc_flags_vtbl
;
strmbase_sink_init
(
&
object
->
sink
,
&
object
->
filter
,
sink_name
,
&
sink_ops
,
NULL
);
...
...
dlls/qcap/tests/filewriter.c
View file @
91d0d9ec
...
...
@@ -78,7 +78,7 @@ static void test_interfaces(void)
ULONG
ref
;
IPin
*
pin
;
todo_wine
check_interface
(
filter
,
&
IID_IAMFilterMiscFlags
,
TRUE
);
check_interface
(
filter
,
&
IID_IAMFilterMiscFlags
,
TRUE
);
check_interface
(
filter
,
&
IID_IBaseFilter
,
TRUE
);
check_interface
(
filter
,
&
IID_IFileSinkFilter
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IFileSinkFilter2
,
TRUE
);
...
...
@@ -769,6 +769,22 @@ static void test_connect_pin(void)
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
static
void
test_misc_flags
(
void
)
{
IBaseFilter
*
filter
=
create_file_writer
();
IAMFilterMiscFlags
*
misc_flags
;
ULONG
flags
,
ref
;
IBaseFilter_QueryInterface
(
filter
,
&
IID_IAMFilterMiscFlags
,
(
void
**
)
&
misc_flags
);
flags
=
IAMFilterMiscFlags_GetMiscFlags
(
misc_flags
);
ok
(
flags
==
AM_FILTER_MISC_FLAGS_IS_RENDERER
,
"Got flags %#x.
\n
"
,
flags
);
IAMFilterMiscFlags_Release
(
misc_flags
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
filewriter
)
{
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
...
...
@@ -781,6 +797,7 @@ START_TEST(filewriter)
test_media_types
();
test_enum_media_types
();
test_connect_pin
();
test_misc_flags
();
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