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
f557a5ee
Commit
f557a5ee
authored
Jul 08, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Add IMFGetService stub.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
115ac283
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
evr.c
dlls/mf/evr.c
+44
-0
mf.c
dlls/mf/tests/mf.c
+5
-0
No files found.
dlls/mf/evr.c
View file @
f557a5ee
...
@@ -36,6 +36,7 @@ struct video_renderer
...
@@ -36,6 +36,7 @@ struct video_renderer
IMFVideoRenderer
IMFVideoRenderer_iface
;
IMFVideoRenderer
IMFVideoRenderer_iface
;
IMFClockStateSink
IMFClockStateSink_iface
;
IMFClockStateSink
IMFClockStateSink_iface
;
IMFMediaEventGenerator
IMFMediaEventGenerator_iface
;
IMFMediaEventGenerator
IMFMediaEventGenerator_iface
;
IMFGetService
IMFGetService_iface
;
LONG
refcount
;
LONG
refcount
;
IMFMediaEventQueue
*
event_queue
;
IMFMediaEventQueue
*
event_queue
;
...
@@ -70,6 +71,11 @@ static struct video_renderer *impl_from_IMFClockStateSink(IMFClockStateSink *ifa
...
@@ -70,6 +71,11 @@ static struct video_renderer *impl_from_IMFClockStateSink(IMFClockStateSink *ifa
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFClockStateSink_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFClockStateSink_iface
);
}
}
static
struct
video_renderer
*
impl_from_IMFGetService
(
IMFGetService
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFGetService_iface
);
}
static
HRESULT
WINAPI
video_renderer_sink_QueryInterface
(
IMFMediaSink
*
iface
,
REFIID
riid
,
void
**
obj
)
static
HRESULT
WINAPI
video_renderer_sink_QueryInterface
(
IMFMediaSink
*
iface
,
REFIID
riid
,
void
**
obj
)
{
{
struct
video_renderer
*
renderer
=
impl_from_IMFMediaSink
(
iface
);
struct
video_renderer
*
renderer
=
impl_from_IMFMediaSink
(
iface
);
...
@@ -97,6 +103,10 @@ static HRESULT WINAPI video_renderer_sink_QueryInterface(IMFMediaSink *iface, RE
...
@@ -97,6 +103,10 @@ static HRESULT WINAPI video_renderer_sink_QueryInterface(IMFMediaSink *iface, RE
{
{
*
obj
=
&
renderer
->
IMFClockStateSink_iface
;
*
obj
=
&
renderer
->
IMFClockStateSink_iface
;
}
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFGetService
))
{
*
obj
=
&
renderer
->
IMFGetService_iface
;
}
else
else
{
{
WARN
(
"Unsupported interface %s.
\n
"
,
debugstr_guid
(
riid
));
WARN
(
"Unsupported interface %s.
\n
"
,
debugstr_guid
(
riid
));
...
@@ -438,6 +448,39 @@ static const IMFClockStateSinkVtbl video_renderer_clock_sink_vtbl =
...
@@ -438,6 +448,39 @@ static const IMFClockStateSinkVtbl video_renderer_clock_sink_vtbl =
video_renderer_clock_sink_OnClockSetRate
,
video_renderer_clock_sink_OnClockSetRate
,
};
};
static
HRESULT
WINAPI
video_renderer_get_service_QueryInterface
(
IMFGetService
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFGetService
(
iface
);
return
IMFMediaSink_QueryInterface
(
&
renderer
->
IMFMediaSink_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
video_renderer_get_service_AddRef
(
IMFGetService
*
iface
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFGetService
(
iface
);
return
IMFMediaSink_AddRef
(
&
renderer
->
IMFMediaSink_iface
);
}
static
ULONG
WINAPI
video_renderer_get_service_Release
(
IMFGetService
*
iface
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFGetService
(
iface
);
return
IMFMediaSink_Release
(
&
renderer
->
IMFMediaSink_iface
);
}
static
HRESULT
WINAPI
video_renderer_get_service_GetService
(
IMFGetService
*
iface
,
REFGUID
service
,
REFIID
riid
,
void
**
obj
)
{
FIXME
(
"%p, %s, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
service
),
debugstr_guid
(
riid
),
obj
);
return
E_NOTIMPL
;
}
static
const
IMFGetServiceVtbl
video_renderer_get_service_vtbl
=
{
video_renderer_get_service_QueryInterface
,
video_renderer_get_service_AddRef
,
video_renderer_get_service_Release
,
video_renderer_get_service_GetService
,
};
static
HRESULT
video_renderer_create_mixer
(
IMFAttributes
*
attributes
,
IMFTransform
**
out
)
static
HRESULT
video_renderer_create_mixer
(
IMFAttributes
*
attributes
,
IMFTransform
**
out
)
{
{
unsigned
int
flags
=
0
;
unsigned
int
flags
=
0
;
...
@@ -499,6 +542,7 @@ static HRESULT evr_create_object(IMFAttributes *attributes, void *user_context,
...
@@ -499,6 +542,7 @@ static HRESULT evr_create_object(IMFAttributes *attributes, void *user_context,
object
->
IMFVideoRenderer_iface
.
lpVtbl
=
&
video_renderer_vtbl
;
object
->
IMFVideoRenderer_iface
.
lpVtbl
=
&
video_renderer_vtbl
;
object
->
IMFMediaEventGenerator_iface
.
lpVtbl
=
&
video_renderer_events_vtbl
;
object
->
IMFMediaEventGenerator_iface
.
lpVtbl
=
&
video_renderer_events_vtbl
;
object
->
IMFClockStateSink_iface
.
lpVtbl
=
&
video_renderer_clock_sink_vtbl
;
object
->
IMFClockStateSink_iface
.
lpVtbl
=
&
video_renderer_clock_sink_vtbl
;
object
->
IMFGetService_iface
.
lpVtbl
=
&
video_renderer_get_service_vtbl
;
object
->
refcount
=
1
;
object
->
refcount
=
1
;
InitializeCriticalSection
(
&
object
->
cs
);
InitializeCriticalSection
(
&
object
->
cs
);
...
...
dlls/mf/tests/mf.c
View file @
f557a5ee
...
@@ -3234,6 +3234,7 @@ static void test_evr(void)
...
@@ -3234,6 +3234,7 @@ static void test_evr(void)
IMFMediaSink
*
sink
,
*
sink2
;
IMFMediaSink
*
sink
,
*
sink2
;
IMFActivate
*
activate
;
IMFActivate
*
activate
;
DWORD
flags
,
count
;
DWORD
flags
,
count
;
IMFGetService
*
gs
;
UINT64
value
;
UINT64
value
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -3277,6 +3278,10 @@ static void test_evr(void)
...
@@ -3277,6 +3278,10 @@ static void test_evr(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFClockStateSink_Release
(
clock_sink
);
IMFClockStateSink_Release
(
clock_sink
);
hr
=
IMFMediaSink_QueryInterface
(
sink
,
&
IID_IMFGetService
,
(
void
**
)
&
gs
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFGetService_Release
(
gs
);
hr
=
IMFActivate_ShutdownObject
(
activate
);
hr
=
IMFActivate_ShutdownObject
(
activate
);
ok
(
hr
==
S_OK
,
"Failed to shut down, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to shut down, hr %#x.
\n
"
,
hr
);
...
...
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