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
8ce49878
Commit
8ce49878
authored
Jul 07, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Add IMFVideoRenderer stub.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
835611ef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
evr.c
dlls/mf/evr.c
+45
-0
mf.c
dlls/mf/tests/mf.c
+6
-0
No files found.
dlls/mf/evr.c
View file @
8ce49878
...
@@ -33,6 +33,7 @@ struct video_renderer
...
@@ -33,6 +33,7 @@ struct video_renderer
{
{
IMFMediaSink
IMFMediaSink_iface
;
IMFMediaSink
IMFMediaSink_iface
;
IMFMediaSinkPreroll
IMFMediaSinkPreroll_iface
;
IMFMediaSinkPreroll
IMFMediaSinkPreroll_iface
;
IMFVideoRenderer
IMFVideoRenderer_iface
;
LONG
refcount
;
LONG
refcount
;
IMFTransform
*
mixer
;
IMFTransform
*
mixer
;
...
@@ -51,6 +52,11 @@ static struct video_renderer *impl_from_IMFMediaSinkPreroll(IMFMediaSinkPreroll
...
@@ -51,6 +52,11 @@ static struct video_renderer *impl_from_IMFMediaSinkPreroll(IMFMediaSinkPreroll
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFMediaSinkPreroll_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFMediaSinkPreroll_iface
);
}
}
static
struct
video_renderer
*
impl_from_IMFVideoRenderer
(
IMFVideoRenderer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFVideoRenderer_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
);
...
@@ -66,6 +72,10 @@ static HRESULT WINAPI video_renderer_sink_QueryInterface(IMFMediaSink *iface, RE
...
@@ -66,6 +72,10 @@ static HRESULT WINAPI video_renderer_sink_QueryInterface(IMFMediaSink *iface, RE
{
{
*
obj
=
&
renderer
->
IMFMediaSinkPreroll_iface
;
*
obj
=
&
renderer
->
IMFMediaSinkPreroll_iface
;
}
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFVideoRenderer
))
{
*
obj
=
&
renderer
->
IMFVideoRenderer_iface
;
}
else
else
{
{
WARN
(
"Unsupported interface %s.
\n
"
,
debugstr_guid
(
riid
));
WARN
(
"Unsupported interface %s.
\n
"
,
debugstr_guid
(
riid
));
...
@@ -237,6 +247,40 @@ static const IMFMediaSinkPrerollVtbl video_renderer_preroll_vtbl =
...
@@ -237,6 +247,40 @@ static const IMFMediaSinkPrerollVtbl video_renderer_preroll_vtbl =
video_renderer_preroll_NotifyPreroll
,
video_renderer_preroll_NotifyPreroll
,
};
};
static
HRESULT
WINAPI
video_renderer_QueryInterface
(
IMFVideoRenderer
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFVideoRenderer
(
iface
);
return
IMFMediaSink_QueryInterface
(
&
renderer
->
IMFMediaSink_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
video_renderer_AddRef
(
IMFVideoRenderer
*
iface
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFVideoRenderer
(
iface
);
return
IMFMediaSink_AddRef
(
&
renderer
->
IMFMediaSink_iface
);
}
static
ULONG
WINAPI
video_renderer_Release
(
IMFVideoRenderer
*
iface
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFVideoRenderer
(
iface
);
return
IMFMediaSink_Release
(
&
renderer
->
IMFMediaSink_iface
);
}
static
HRESULT
WINAPI
video_renderer_InitializeRenderer
(
IMFVideoRenderer
*
iface
,
IMFTransform
*
mixer
,
IMFVideoPresenter
*
presenter
)
{
FIXME
(
"%p, %p, %p.
\n
"
,
iface
,
mixer
,
presenter
);
return
E_NOTIMPL
;
}
static
const
IMFVideoRendererVtbl
video_renderer_vtbl
=
{
video_renderer_QueryInterface
,
video_renderer_AddRef
,
video_renderer_Release
,
video_renderer_InitializeRenderer
,
};
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
;
...
@@ -295,6 +339,7 @@ static HRESULT evr_create_object(IMFAttributes *attributes, void *user_context,
...
@@ -295,6 +339,7 @@ static HRESULT evr_create_object(IMFAttributes *attributes, void *user_context,
object
->
IMFMediaSink_iface
.
lpVtbl
=
&
video_renderer_sink_vtbl
;
object
->
IMFMediaSink_iface
.
lpVtbl
=
&
video_renderer_sink_vtbl
;
object
->
IMFMediaSinkPreroll_iface
.
lpVtbl
=
&
video_renderer_preroll_vtbl
;
object
->
IMFMediaSinkPreroll_iface
.
lpVtbl
=
&
video_renderer_preroll_vtbl
;
object
->
IMFVideoRenderer_iface
.
lpVtbl
=
&
video_renderer_vtbl
;
object
->
refcount
=
1
;
object
->
refcount
=
1
;
InitializeCriticalSection
(
&
object
->
cs
);
InitializeCriticalSection
(
&
object
->
cs
);
...
...
dlls/mf/tests/mf.c
View file @
8ce49878
...
@@ -41,6 +41,7 @@ DEFINE_GUID(MFVideoFormat_ABGR32, 0x00000020, 0x0000, 0x0010, 0x80, 0x00, 0x00,
...
@@ -41,6 +41,7 @@ DEFINE_GUID(MFVideoFormat_ABGR32, 0x00000020, 0x0000, 0x0010, 0x80, 0x00, 0x00,
#include "initguid.h"
#include "initguid.h"
#include "mmdeviceapi.h"
#include "mmdeviceapi.h"
#include "audioclient.h"
#include "audioclient.h"
#include "evr.h"
#include "wine/test.h"
#include "wine/test.h"
...
@@ -3226,6 +3227,7 @@ todo_wine
...
@@ -3226,6 +3227,7 @@ todo_wine
static
void
test_evr
(
void
)
static
void
test_evr
(
void
)
{
{
IMFVideoRenderer
*
video_renderer
;
IMFMediaSinkPreroll
*
preroll
;
IMFMediaSinkPreroll
*
preroll
;
IMFMediaSink
*
sink
,
*
sink2
;
IMFMediaSink
*
sink
,
*
sink2
;
IMFActivate
*
activate
;
IMFActivate
*
activate
;
...
@@ -3261,6 +3263,10 @@ static void test_evr(void)
...
@@ -3261,6 +3263,10 @@ static void test_evr(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFMediaSinkPreroll_Release
(
preroll
);
IMFMediaSinkPreroll_Release
(
preroll
);
hr
=
IMFMediaSink_QueryInterface
(
sink
,
&
IID_IMFVideoRenderer
,
(
void
**
)
&
video_renderer
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFVideoRenderer_Release
(
video_renderer
);
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