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
4d7b3c78
Commit
4d7b3c78
authored
Aug 29, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/filter: Add IMFTopologyServiceLookup stub.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
27972922
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
0 deletions
+80
-0
evr.c
dlls/evr/evr.c
+45
-0
evr.c
dlls/evr/tests/evr.c
+35
-0
No files found.
dlls/evr/evr.c
View file @
4d7b3c78
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "evr_private.h"
#include "evr_private.h"
#include "d3d9.h"
#include "d3d9.h"
#include "mferror.h"
#include "initguid.h"
#include "initguid.h"
#include "dxva2api.h"
#include "dxva2api.h"
...
@@ -38,6 +39,7 @@ struct evr
...
@@ -38,6 +39,7 @@ struct evr
IMFGetService
IMFGetService_iface
;
IMFGetService
IMFGetService_iface
;
IMFVideoRenderer
IMFVideoRenderer_iface
;
IMFVideoRenderer
IMFVideoRenderer_iface
;
IMediaEventSink
IMediaEventSink_iface
;
IMediaEventSink
IMediaEventSink_iface
;
IMFTopologyServiceLookup
IMFTopologyServiceLookup_iface
;
IMFTransform
*
mixer
;
IMFTransform
*
mixer
;
IMFVideoPresenter
*
presenter
;
IMFVideoPresenter
*
presenter
;
...
@@ -114,6 +116,8 @@ static HRESULT evr_query_interface(struct strmbase_renderer *iface, REFIID iid,
...
@@ -114,6 +116,8 @@ static HRESULT evr_query_interface(struct strmbase_renderer *iface, REFIID iid,
*
out
=
&
filter
->
IMFVideoRenderer_iface
;
*
out
=
&
filter
->
IMFVideoRenderer_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IMediaEventSink
))
else
if
(
IsEqualGUID
(
iid
,
&
IID_IMediaEventSink
))
*
out
=
&
filter
->
IMediaEventSink_iface
;
*
out
=
&
filter
->
IMediaEventSink_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IMFTopologyServiceLookup
))
*
out
=
&
filter
->
IMFTopologyServiceLookup_iface
;
else
else
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
...
@@ -389,6 +393,46 @@ static const IMediaEventSinkVtbl filter_media_event_sink_vtbl =
...
@@ -389,6 +393,46 @@ static const IMediaEventSinkVtbl filter_media_event_sink_vtbl =
filter_media_event_sink_Notify
,
filter_media_event_sink_Notify
,
};
};
static
struct
evr
*
impl_from_IMFTopologyServiceLookup
(
IMFTopologyServiceLookup
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
evr
,
IMFTopologyServiceLookup_iface
);
}
static
HRESULT
WINAPI
filter_service_lookup_QueryInterface
(
IMFTopologyServiceLookup
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
evr
*
filter
=
impl_from_IMFTopologyServiceLookup
(
iface
);
return
IUnknown_QueryInterface
(
filter
->
renderer
.
filter
.
outer_unk
,
riid
,
obj
);
}
static
ULONG
WINAPI
filter_service_lookup_AddRef
(
IMFTopologyServiceLookup
*
iface
)
{
struct
evr
*
filter
=
impl_from_IMFTopologyServiceLookup
(
iface
);
return
IUnknown_AddRef
(
filter
->
renderer
.
filter
.
outer_unk
);
}
static
ULONG
WINAPI
filter_service_lookup_Release
(
IMFTopologyServiceLookup
*
iface
)
{
struct
evr
*
filter
=
impl_from_IMFTopologyServiceLookup
(
iface
);
return
IUnknown_Release
(
filter
->
renderer
.
filter
.
outer_unk
);
}
static
HRESULT
WINAPI
filter_service_lookup_LookupService
(
IMFTopologyServiceLookup
*
iface
,
MF_SERVICE_LOOKUP_TYPE
lookup_type
,
DWORD
index
,
REFGUID
service
,
REFIID
riid
,
void
**
objects
,
DWORD
*
num_objects
)
{
FIXME
(
"iface %p, lookup_type %d, index %lu, service %s, riid %s, objects %p, num_objects %p.
\n
"
,
iface
,
lookup_type
,
index
,
debugstr_guid
(
service
),
debugstr_guid
(
riid
),
objects
,
num_objects
);
return
MF_E_NOTACCEPTING
;
}
static
const
IMFTopologyServiceLookupVtbl
filter_service_lookup_vtbl
=
{
filter_service_lookup_QueryInterface
,
filter_service_lookup_AddRef
,
filter_service_lookup_Release
,
filter_service_lookup_LookupService
,
};
HRESULT
evr_filter_create
(
IUnknown
*
outer
,
void
**
out
)
HRESULT
evr_filter_create
(
IUnknown
*
outer
,
void
**
out
)
{
{
struct
evr
*
object
;
struct
evr
*
object
;
...
@@ -403,6 +447,7 @@ HRESULT evr_filter_create(IUnknown *outer, void **out)
...
@@ -403,6 +447,7 @@ HRESULT evr_filter_create(IUnknown *outer, void **out)
object
->
IMFGetService_iface
.
lpVtbl
=
&
filter_get_service_vtbl
;
object
->
IMFGetService_iface
.
lpVtbl
=
&
filter_get_service_vtbl
;
object
->
IMFVideoRenderer_iface
.
lpVtbl
=
&
filter_video_renderer_vtbl
;
object
->
IMFVideoRenderer_iface
.
lpVtbl
=
&
filter_video_renderer_vtbl
;
object
->
IMediaEventSink_iface
.
lpVtbl
=
&
filter_media_event_sink_vtbl
;
object
->
IMediaEventSink_iface
.
lpVtbl
=
&
filter_media_event_sink_vtbl
;
object
->
IMFTopologyServiceLookup_iface
.
lpVtbl
=
&
filter_service_lookup_vtbl
;
TRACE
(
"Created EVR %p.
\n
"
,
object
);
TRACE
(
"Created EVR %p.
\n
"
,
object
);
*
out
=
&
object
->
renderer
.
filter
.
IUnknown_inner
;
*
out
=
&
object
->
renderer
.
filter
.
IUnknown_inner
;
...
...
dlls/evr/tests/evr.c
View file @
4d7b3c78
...
@@ -603,6 +603,40 @@ static void test_display_control(void)
...
@@ -603,6 +603,40 @@ static void test_display_control(void)
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
}
}
static
void
test_service_lookup
(
void
)
{
IBaseFilter
*
filter
=
create_evr
();
IMFTopologyServiceLookup
*
service_lookup
;
IUnknown
*
unk
;
DWORD
count
;
HRESULT
hr
;
ULONG
ref
;
hr
=
IBaseFilter_QueryInterface
(
filter
,
&
IID_IMFTopologyServiceLookup
,
(
void
**
)
&
service_lookup
);
if
(
FAILED
(
hr
))
{
win_skip
(
"IMFTopologyServiceLookup is not exposed.
\n
"
);
IBaseFilter_Release
(
filter
);
return
;
}
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFTopologyServiceLookup_QueryInterface
(
service_lookup
,
&
IID_IBaseFilter
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
unk
==
(
IUnknown
*
)
filter
,
"Unexpected pointer.
\n
"
);
IUnknown_Release
(
unk
);
count
=
1
;
hr
=
IMFTopologyServiceLookup_LookupService
(
service_lookup
,
MF_SERVICE_LOOKUP_GLOBAL
,
0
,
&
MR_VIDEO_RENDER_SERVICE
,
&
IID_IMediaEventSink
,
(
void
**
)
&
unk
,
&
count
);
ok
(
hr
==
MF_E_NOTACCEPTING
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFTopologyServiceLookup_Release
(
service_lookup
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
}
static
IMFMediaType
*
create_video_type
(
const
GUID
*
subtype
)
static
IMFMediaType
*
create_video_type
(
const
GUID
*
subtype
)
{
{
IMFMediaType
*
video_type
;
IMFMediaType
*
video_type
;
...
@@ -3276,6 +3310,7 @@ START_TEST(evr)
...
@@ -3276,6 +3310,7 @@ START_TEST(evr)
test_unconnected_eos
();
test_unconnected_eos
();
test_misc_flags
();
test_misc_flags
();
test_display_control
();
test_display_control
();
test_service_lookup
();
test_default_mixer
();
test_default_mixer
();
test_default_mixer_type_negotiation
();
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