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
0b9c35ed
Commit
0b9c35ed
authored
Apr 12, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr: Add IAMFilterMiscFlags interface.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
22fa68bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
1 deletion
+62
-1
evr.c
dlls/evr/evr.c
+42
-0
evr.c
dlls/evr/tests/evr.c
+20
-1
No files found.
dlls/evr/evr.c
View file @
0b9c35ed
...
...
@@ -34,6 +34,7 @@ struct evr
{
struct
strmbase_renderer
renderer
;
IEVRFilterConfig
IEVRFilterConfig_iface
;
IAMFilterMiscFlags
IAMFilterMiscFlags_iface
;
};
static
struct
evr
*
impl_from_strmbase_renderer
(
struct
strmbase_renderer
*
iface
)
...
...
@@ -47,6 +48,8 @@ static HRESULT evr_query_interface(struct strmbase_renderer *iface, REFIID iid,
if
(
IsEqualGUID
(
iid
,
&
IID_IEVRFilterConfig
))
*
out
=
&
filter
->
IEVRFilterConfig_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IAMFilterMiscFlags
))
*
out
=
&
filter
->
IAMFilterMiscFlags_iface
;
else
return
E_NOINTERFACE
;
...
...
@@ -132,6 +135,44 @@ static const IEVRFilterConfigVtbl filter_config_vtbl =
filter_config_GetNumberOfStreams
,
};
static
struct
evr
*
impl_from_IAMFilterMiscFlags
(
IAMFilterMiscFlags
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
evr
,
IAMFilterMiscFlags_iface
);
}
static
HRESULT
WINAPI
filter_misc_flags_QueryInterface
(
IAMFilterMiscFlags
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
evr
*
filter
=
impl_from_IAMFilterMiscFlags
(
iface
);
return
IUnknown_QueryInterface
(
filter
->
renderer
.
filter
.
outer_unk
,
iid
,
out
);
}
static
ULONG
WINAPI
filter_misc_flags_AddRef
(
IAMFilterMiscFlags
*
iface
)
{
struct
evr
*
filter
=
impl_from_IAMFilterMiscFlags
(
iface
);
return
IUnknown_AddRef
(
filter
->
renderer
.
filter
.
outer_unk
);
}
static
ULONG
WINAPI
filter_misc_flags_Release
(
IAMFilterMiscFlags
*
iface
)
{
struct
evr
*
filter
=
impl_from_IAMFilterMiscFlags
(
iface
);
return
IUnknown_Release
(
filter
->
renderer
.
filter
.
outer_unk
);
}
static
ULONG
WINAPI
filter_misc_flags_GetMiscFlags
(
IAMFilterMiscFlags
*
iface
)
{
TRACE
(
"%p.
\n
"
,
iface
);
return
AM_FILTER_MISC_FLAGS_IS_RENDERER
;
}
static
const
IAMFilterMiscFlagsVtbl
filter_misc_flags_vtbl
=
{
filter_misc_flags_QueryInterface
,
filter_misc_flags_AddRef
,
filter_misc_flags_Release
,
filter_misc_flags_GetMiscFlags
,
};
HRESULT
evr_filter_create
(
IUnknown
*
outer
,
void
**
out
)
{
struct
evr
*
object
;
...
...
@@ -142,6 +183,7 @@ HRESULT evr_filter_create(IUnknown *outer, void **out)
strmbase_renderer_init
(
&
object
->
renderer
,
outer
,
&
CLSID_EnhancedVideoRenderer
,
L"EVR Input0"
,
&
renderer_ops
);
object
->
IEVRFilterConfig_iface
.
lpVtbl
=
&
filter_config_vtbl
;
object
->
IAMFilterMiscFlags_iface
.
lpVtbl
=
&
filter_misc_flags_vtbl
;
TRACE
(
"Created EVR %p.
\n
"
,
object
);
*
out
=
&
object
->
renderer
.
filter
.
IUnknown_inner
;
...
...
dlls/evr/tests/evr.c
View file @
0b9c35ed
...
...
@@ -276,7 +276,7 @@ static void test_interfaces(void)
IBaseFilter
*
filter
=
create_evr
();
ULONG
ref
;
todo_wine
check_interface
(
filter
,
&
IID_IAMFilterMiscFlags
,
TRUE
);
check_interface
(
filter
,
&
IID_IAMFilterMiscFlags
,
TRUE
);
check_interface
(
filter
,
&
IID_IBaseFilter
,
TRUE
);
check_interface
(
filter
,
&
IID_IEVRFilterConfig
,
TRUE
);
check_interface
(
filter
,
&
IID_IMediaFilter
,
TRUE
);
...
...
@@ -551,6 +551,24 @@ static void test_unconnected_eos(void)
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
}
static
void
test_misc_flags
(
void
)
{
IBaseFilter
*
filter
=
create_evr
();
IAMFilterMiscFlags
*
misc_flags
;
ULONG
ref
,
flags
;
HRESULT
hr
;
hr
=
IBaseFilter_QueryInterface
(
filter
,
&
IID_IAMFilterMiscFlags
,
(
void
**
)
&
misc_flags
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
flags
=
IAMFilterMiscFlags_GetMiscFlags
(
misc_flags
);
ok
(
flags
==
AM_FILTER_MISC_FLAGS_IS_RENDERER
,
"Unexpected flags %#lx.
\n
"
,
flags
);
IAMFilterMiscFlags_Release
(
misc_flags
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
}
static
IMFMediaType
*
create_video_type
(
const
GUID
*
subtype
)
{
IMFMediaType
*
video_type
;
...
...
@@ -3207,6 +3225,7 @@ START_TEST(evr)
test_find_pin
();
test_pin_info
();
test_unconnected_eos
();
test_misc_flags
();
test_default_mixer
();
test_default_mixer_type_negotiation
();
...
...
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