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
e6c488de
Commit
e6c488de
authored
May 20, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Add clock state sink stub for grabber.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a2c8658b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
3 deletions
+77
-3
samplegrabber.c
dlls/mf/samplegrabber.c
+76
-0
mf.c
dlls/mf/tests/mf.c
+1
-3
No files found.
dlls/mf/samplegrabber.c
View file @
e6c488de
...
...
@@ -38,6 +38,7 @@ struct sample_grabber_stream
struct
sample_grabber
{
IMFMediaSink
IMFMediaSink_iface
;
IMFClockStateSink
IMFClockStateSink_iface
;
LONG
refcount
;
IMFSampleGrabberSinkCallback
*
callback
;
IMFMediaType
*
media_type
;
...
...
@@ -65,6 +66,11 @@ static struct sample_grabber *impl_from_IMFMediaSink(IMFMediaSink *iface)
return
CONTAINING_RECORD
(
iface
,
struct
sample_grabber
,
IMFMediaSink_iface
);
}
static
struct
sample_grabber
*
impl_from_IMFClockStateSink
(
IMFClockStateSink
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
sample_grabber
,
IMFClockStateSink_iface
);
}
static
struct
sample_grabber_stream
*
impl_from_IMFStreamSink
(
IMFStreamSink
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
sample_grabber_stream
,
IMFStreamSink_iface
);
...
...
@@ -320,6 +326,10 @@ static HRESULT WINAPI sample_grabber_sink_QueryInterface(IMFMediaSink *iface, RE
{
*
obj
=
&
grabber
->
IMFMediaSink_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFClockStateSink
))
{
*
obj
=
&
grabber
->
IMFClockStateSink_iface
;
}
else
{
WARN
(
"Unsupported %s.
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -508,6 +518,71 @@ static const IMFMediaSinkVtbl sample_grabber_sink_vtbl =
sample_grabber_sink_Shutdown
,
};
static
HRESULT
WINAPI
sample_grabber_clock_sink_QueryInterface
(
IMFClockStateSink
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
sample_grabber
*
grabber
=
impl_from_IMFClockStateSink
(
iface
);
return
IMFMediaSink_QueryInterface
(
&
grabber
->
IMFMediaSink_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
sample_grabber_clock_sink_AddRef
(
IMFClockStateSink
*
iface
)
{
struct
sample_grabber
*
grabber
=
impl_from_IMFClockStateSink
(
iface
);
return
IMFMediaSink_AddRef
(
&
grabber
->
IMFMediaSink_iface
);
}
static
ULONG
WINAPI
sample_grabber_clock_sink_Release
(
IMFClockStateSink
*
iface
)
{
struct
sample_grabber
*
grabber
=
impl_from_IMFClockStateSink
(
iface
);
return
IMFMediaSink_Release
(
&
grabber
->
IMFMediaSink_iface
);
}
static
HRESULT
WINAPI
sample_grabber_clock_sink_OnClockStart
(
IMFClockStateSink
*
iface
,
MFTIME
systime
,
LONGLONG
offset
)
{
FIXME
(
"%p, %s, %s.
\n
"
,
iface
,
wine_dbgstr_longlong
(
systime
),
wine_dbgstr_longlong
(
offset
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
sample_grabber_clock_sink_OnClockStop
(
IMFClockStateSink
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
wine_dbgstr_longlong
(
systime
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
sample_grabber_clock_sink_OnClockPause
(
IMFClockStateSink
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
wine_dbgstr_longlong
(
systime
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
sample_grabber_clock_sink_OnClockRestart
(
IMFClockStateSink
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
wine_dbgstr_longlong
(
systime
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
sample_grabber_clock_sink_OnClockSetRate
(
IMFClockStateSink
*
iface
,
MFTIME
systime
,
float
rate
)
{
FIXME
(
"%p, %s, %f.
\n
"
,
iface
,
wine_dbgstr_longlong
(
systime
),
rate
);
return
E_NOTIMPL
;
}
static
const
IMFClockStateSinkVtbl
sample_grabber_clock_sink_vtbl
=
{
sample_grabber_clock_sink_QueryInterface
,
sample_grabber_clock_sink_AddRef
,
sample_grabber_clock_sink_Release
,
sample_grabber_clock_sink_OnClockStart
,
sample_grabber_clock_sink_OnClockStop
,
sample_grabber_clock_sink_OnClockPause
,
sample_grabber_clock_sink_OnClockRestart
,
sample_grabber_clock_sink_OnClockSetRate
,
};
static
HRESULT
sample_grabber_create_stream
(
IMFMediaSink
*
sink
,
IMFStreamSink
**
stream
)
{
struct
sample_grabber_stream
*
object
;
...
...
@@ -540,6 +615,7 @@ static HRESULT sample_grabber_create_object(IMFAttributes *attributes, void *use
return
E_OUTOFMEMORY
;
object
->
IMFMediaSink_iface
.
lpVtbl
=
&
sample_grabber_sink_vtbl
;
object
->
IMFClockStateSink_iface
.
lpVtbl
=
&
sample_grabber_clock_sink_vtbl
;
object
->
refcount
=
1
;
object
->
callback
=
context
->
callback
;
IMFSampleGrabberSinkCallback_AddRef
(
object
->
callback
);
...
...
dlls/mf/tests/mf.c
View file @
e6c488de
...
...
@@ -1709,10 +1709,8 @@ static void test_sample_grabber(void)
ok
(
hr
==
MF_E_STREAMSINKS_FIXED
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaSink_QueryInterface
(
sink
,
&
IID_IMFClockStateSink
,
(
void
**
)
&
clocksink
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get interface, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IMFClockStateSink_Release
(
clocksink
);
IMFClockStateSink_Release
(
clocksink
);
hr
=
IMFMediaSink_QueryInterface
(
sink
,
&
IID_IMFMediaEventGenerator
,
(
void
**
)
&
eg
);
todo_wine
...
...
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