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
c9ce21ed
Commit
c9ce21ed
authored
May 22, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jul 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Add support for renderer methods to MediaSeekingPassThru.
parent
5fbef396
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
1 deletion
+54
-1
control.c
dlls/quartz/control.c
+50
-1
control_private.h
dlls/quartz/control_private.h
+4
-0
No files found.
dlls/quartz/control.c
View file @
c9ce21ed
...
...
@@ -42,6 +42,9 @@ typedef struct PassThruImpl {
BOOL
bUnkOuterValid
;
BOOL
bAggregatable
;
BOOL
renderer
;
CRITICAL_SECTION
time_cs
;
BOOL
timevalid
;
REFERENCE_TIME
time_earliest
;
}
PassThruImpl
;
static
HRESULT
WINAPI
SeekInner_QueryInterface
(
IUnknown
*
iface
,
...
...
@@ -90,6 +93,8 @@ static ULONG WINAPI SeekInner_Release(IUnknown * iface) {
if
(
ref
==
0
)
{
This
->
time_cs
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
time_cs
);
CoTaskMemFree
(
This
);
}
return
ref
;
...
...
@@ -213,6 +218,9 @@ HRESULT SeekingPassThru_create(IUnknown *pUnkOuter, LPVOID *ppObj)
fimpl
->
IMediaSeeking_vtbl
=
&
IMediaSeekingPassThru_Vtbl
;
fimpl
->
ref
=
1
;
fimpl
->
pin
=
NULL
;
fimpl
->
timevalid
=
0
;
InitializeCriticalSection
(
&
fimpl
->
time_cs
);
fimpl
->
time_cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": PassThruImpl.time_cs"
);
return
S_OK
;
}
...
...
@@ -854,8 +862,20 @@ static HRESULT WINAPI MediaSeekingPassThru_GetCurrentPosition(IMediaSeeking * if
{
ICOM_THIS_MULTI
(
PassThruImpl
,
IMediaSeeking_vtbl
,
iface
);
IMediaSeeking
*
seek
;
HRESULT
hr
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p/%p)->(%p)
\n
"
,
iface
,
This
,
pCurrent
);
if
(
!
pCurrent
)
return
E_POINTER
;
EnterCriticalSection
(
&
This
->
time_cs
);
if
(
This
->
timevalid
)
*
pCurrent
=
This
->
time_earliest
;
else
hr
=
E_FAIL
;
LeaveCriticalSection
(
&
This
->
time_cs
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMediaSeeking_ConvertTimeFormat
(
iface
,
pCurrent
,
NULL
,
*
pCurrent
,
&
TIME_FORMAT_MEDIA_TIME
);
return
hr
;
}
hr
=
get_connected
(
This
,
&
seek
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMediaSeeking_GetCurrentPosition
(
seek
,
pCurrent
);
...
...
@@ -962,6 +982,35 @@ static HRESULT WINAPI MediaSeekingPassThru_GetPreroll(IMediaSeeking * iface, LON
return
hr
;
}
void
MediaSeekingPassThru_RegisterMediaTime
(
IUnknown
*
iface
,
REFERENCE_TIME
start
)
{
ICOM_THIS_MULTI
(
PassThruImpl
,
IInner_vtbl
,
iface
);
EnterCriticalSection
(
&
This
->
time_cs
);
This
->
time_earliest
=
start
;
This
->
timevalid
=
1
;
LeaveCriticalSection
(
&
This
->
time_cs
);
}
void
MediaSeekingPassThru_ResetMediaTime
(
IUnknown
*
iface
)
{
ICOM_THIS_MULTI
(
PassThruImpl
,
IInner_vtbl
,
iface
);
EnterCriticalSection
(
&
This
->
time_cs
);
This
->
timevalid
=
0
;
LeaveCriticalSection
(
&
This
->
time_cs
);
}
void
MediaSeekingPassThru_EOS
(
IUnknown
*
iface
)
{
ICOM_THIS_MULTI
(
PassThruImpl
,
IInner_vtbl
,
iface
);
REFERENCE_TIME
time
;
HRESULT
hr
;
hr
=
IMediaSeeking_GetStopPosition
((
IMediaSeeking
*
)
&
This
->
IMediaSeeking_vtbl
,
&
time
);
EnterCriticalSection
(
&
This
->
time_cs
);
if
(
SUCCEEDED
(
hr
))
{
This
->
timevalid
=
1
;
This
->
time_earliest
=
time
;
}
else
This
->
timevalid
=
0
;
LeaveCriticalSection
(
&
This
->
time_cs
);
}
static
const
IMediaSeekingVtbl
IMediaSeekingPassThru_Vtbl
=
{
MediaSeekingPassThru_QueryInterface
,
...
...
dlls/quartz/control_private.h
View file @
c9ce21ed
...
...
@@ -59,4 +59,8 @@ HRESULT WINAPI MediaSeekingImpl_SetRate(IMediaSeeking * iface, double dRate);
HRESULT
WINAPI
MediaSeekingImpl_GetRate
(
IMediaSeeking
*
iface
,
double
*
dRate
);
HRESULT
WINAPI
MediaSeekingImpl_GetPreroll
(
IMediaSeeking
*
iface
,
LONGLONG
*
pPreroll
);
void
MediaSeekingPassThru_RegisterMediaTime
(
IUnknown
*
iface
,
REFERENCE_TIME
start
);
void
MediaSeekingPassThru_ResetMediaTime
(
IUnknown
*
iface
);
void
MediaSeekingPassThru_EOS
(
IUnknown
*
iface
);
#endif
/*QUARTZ_CONTROL_H*/
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