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
509bef71
Commit
509bef71
authored
Apr 07, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Add IMFMediaSinkPreroll stub for SAR.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
56e03da6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
5 deletions
+55
-5
sar.c
dlls/mf/sar.c
+55
-5
No files found.
dlls/mf/sar.c
View file @
509bef71
...
...
@@ -30,6 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
struct
audio_renderer
{
IMFMediaSink
IMFMediaSink_iface
;
IMFMediaSinkPreroll
IMFMediaSinkPreroll_iface
;
LONG
refcount
;
BOOL
is_shut_down
;
CRITICAL_SECTION
cs
;
...
...
@@ -40,21 +41,36 @@ static struct audio_renderer *impl_from_IMFMediaSink(IMFMediaSink *iface)
return
CONTAINING_RECORD
(
iface
,
struct
audio_renderer
,
IMFMediaSink_iface
);
}
static
struct
audio_renderer
*
impl_from_IMFMediaSinkPreroll
(
IMFMediaSinkPreroll
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
audio_renderer
,
IMFMediaSinkPreroll_iface
);
}
static
HRESULT
WINAPI
audio_renderer_sink_QueryInterface
(
IMFMediaSink
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
audio_renderer
*
renderer
=
impl_from_IMFMediaSink
(
iface
);
TRACE
(
"%p, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IMFMediaSink
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
IMFMediaSink_AddRef
(
iface
);
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFMediaSinkPreroll
))
{
*
obj
=
&
renderer
->
IMFMediaSinkPreroll_iface
;
}
else
{
WARN
(
"Unsupported %s.
\n
"
,
debugstr_guid
(
riid
));
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
WARN
(
"Unsupported %s.
\n
"
,
debugstr_guid
(
riid
)
);
*
obj
=
NULL
;
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
obj
);
return
S_OK
;
}
static
ULONG
WINAPI
audio_renderer_sink_AddRef
(
IMFMediaSink
*
iface
)
...
...
@@ -186,6 +202,39 @@ static const IMFMediaSinkVtbl audio_renderer_sink_vtbl =
audio_renderer_sink_Shutdown
,
};
static
HRESULT
WINAPI
audio_renderer_preroll_QueryInterface
(
IMFMediaSinkPreroll
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
audio_renderer
*
renderer
=
impl_from_IMFMediaSinkPreroll
(
iface
);
return
IMFMediaSink_QueryInterface
(
&
renderer
->
IMFMediaSink_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
audio_renderer_preroll_AddRef
(
IMFMediaSinkPreroll
*
iface
)
{
struct
audio_renderer
*
renderer
=
impl_from_IMFMediaSinkPreroll
(
iface
);
return
IMFMediaSink_AddRef
(
&
renderer
->
IMFMediaSink_iface
);
}
static
ULONG
WINAPI
audio_renderer_preroll_Release
(
IMFMediaSinkPreroll
*
iface
)
{
struct
audio_renderer
*
renderer
=
impl_from_IMFMediaSinkPreroll
(
iface
);
return
IMFMediaSink_Release
(
&
renderer
->
IMFMediaSink_iface
);
}
static
HRESULT
WINAPI
audio_renderer_preroll_NotifyPreroll
(
IMFMediaSinkPreroll
*
iface
,
MFTIME
start_time
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
start_time
));
return
E_NOTIMPL
;
}
static
const
IMFMediaSinkPrerollVtbl
audio_renderer_preroll_vtbl
=
{
audio_renderer_preroll_QueryInterface
,
audio_renderer_preroll_AddRef
,
audio_renderer_preroll_Release
,
audio_renderer_preroll_NotifyPreroll
,
};
static
HRESULT
sar_create_object
(
IMFAttributes
*
attributes
,
void
*
user_context
,
IUnknown
**
obj
)
{
struct
audio_renderer
*
renderer
;
...
...
@@ -196,6 +245,7 @@ static HRESULT sar_create_object(IMFAttributes *attributes, void *user_context,
return
E_OUTOFMEMORY
;
renderer
->
IMFMediaSink_iface
.
lpVtbl
=
&
audio_renderer_sink_vtbl
;
renderer
->
IMFMediaSinkPreroll_iface
.
lpVtbl
=
&
audio_renderer_preroll_vtbl
;
renderer
->
refcount
=
1
;
InitializeCriticalSection
(
&
renderer
->
cs
);
...
...
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