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
7a4da222
Commit
7a4da222
authored
Jul 01, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr: Implement presenter state tracking methods.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7e4e2b37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
10 deletions
+53
-10
presenter.c
dlls/evr/presenter.c
+53
-10
No files found.
dlls/evr/presenter.c
View file @
7a4da222
...
...
@@ -31,6 +31,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
evr
);
enum
presenter_state
{
PRESENTER_STATE_SHUT_DOWN
=
0
,
PRESENTER_STATE_STARTED
,
PRESENTER_STATE_STOPPED
,
PRESENTER_STATE_PAUSED
,
};
struct
video_presenter
{
IMFVideoPresenter
IMFVideoPresenter_iface
;
...
...
@@ -41,6 +49,9 @@ struct video_presenter
IUnknown
IUnknown_inner
;
IUnknown
*
outer_unk
;
LONG
refcount
;
unsigned
int
state
;
CRITICAL_SECTION
cs
;
};
static
struct
video_presenter
*
impl_from_IUnknown
(
IUnknown
*
iface
)
...
...
@@ -134,6 +145,7 @@ static ULONG WINAPI video_presenter_inner_Release(IUnknown *iface)
if
(
!
refcount
)
{
DeleteCriticalSection
(
&
presenter
->
cs
);
heap_free
(
presenter
);
}
...
...
@@ -167,30 +179,54 @@ static ULONG WINAPI video_presenter_Release(IMFVideoPresenter *iface)
static
HRESULT
WINAPI
video_presenter_OnClockStart
(
IMFVideoPresenter
*
iface
,
MFTIME
systime
,
LONGLONG
offset
)
{
FIXME
(
"%p, %s, %s.
\n
"
,
iface
,
debugstr_time
(
systime
),
wine_dbgstr_longlong
(
offset
)
);
struct
video_presenter
*
presenter
=
impl_from_IMFVideoPresenter
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p, %s, %s.
\n
"
,
iface
,
debugstr_time
(
systime
),
wine_dbgstr_longlong
(
offset
));
EnterCriticalSection
(
&
presenter
->
cs
);
presenter
->
state
=
PRESENTER_STATE_STARTED
;
LeaveCriticalSection
(
&
presenter
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
video_presenter_OnClockStop
(
IMFVideoPresenter
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
)
);
struct
video_presenter
*
presenter
=
impl_from_IMFVideoPresenter
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
EnterCriticalSection
(
&
presenter
->
cs
);
presenter
->
state
=
PRESENTER_STATE_STOPPED
;
LeaveCriticalSection
(
&
presenter
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
video_presenter_OnClockPause
(
IMFVideoPresenter
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
)
);
struct
video_presenter
*
presenter
=
impl_from_IMFVideoPresenter
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
EnterCriticalSection
(
&
presenter
->
cs
);
presenter
->
state
=
PRESENTER_STATE_PAUSED
;
LeaveCriticalSection
(
&
presenter
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
video_presenter_OnClockRestart
(
IMFVideoPresenter
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
)
);
struct
video_presenter
*
presenter
=
impl_from_IMFVideoPresenter
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
EnterCriticalSection
(
&
presenter
->
cs
);
presenter
->
state
=
PRESENTER_STATE_STARTED
;
LeaveCriticalSection
(
&
presenter
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
video_presenter_OnClockSetRate
(
IMFVideoPresenter
*
iface
,
MFTIME
systime
,
float
rate
)
...
...
@@ -295,9 +331,15 @@ static HRESULT WINAPI video_presenter_service_client_InitServicePointers(IMFTopo
static
HRESULT
WINAPI
video_presenter_service_client_ReleaseServicePointers
(
IMFTopologyServiceLookupClient
*
iface
)
{
FIXME
(
"%p.
\n
"
,
iface
);
struct
video_presenter
*
presenter
=
impl_from_IMFTopologyServiceLookupClient
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p.
\n
"
,
iface
);
EnterCriticalSection
(
&
presenter
->
cs
);
presenter
->
state
=
PRESENTER_STATE_SHUT_DOWN
;
LeaveCriticalSection
(
&
presenter
->
cs
);
return
S_OK
;
}
static
const
IMFTopologyServiceLookupClientVtbl
video_presenter_service_client_vtbl
=
...
...
@@ -496,6 +538,7 @@ HRESULT evr_presenter_create(IUnknown *outer, void **out)
object
->
IUnknown_inner
.
lpVtbl
=
&
video_presenter_inner_vtbl
;
object
->
outer_unk
=
outer
?
outer
:
&
object
->
IUnknown_inner
;
object
->
refcount
=
1
;
InitializeCriticalSection
(
&
object
->
cs
);
*
out
=
&
object
->
IUnknown_inner
;
...
...
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