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
4f8584ac
Commit
4f8584ac
authored
Nov 05, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Nov 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Remove position from filtergraph.
parent
2e0e6677
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
32 deletions
+27
-32
filtergraph.c
dlls/quartz/filtergraph.c
+27
-32
No files found.
dlls/quartz/filtergraph.c
View file @
4f8584ac
...
...
@@ -203,7 +203,6 @@ typedef struct _IFilterGraphImpl {
GUID
timeformatseek
;
REFERENCE_TIME
start_time
;
REFERENCE_TIME
pause_time
;
LONGLONG
position
;
LONGLONG
stop_position
;
LONG
recursioncount
;
}
IFilterGraphImpl
;
...
...
@@ -1956,7 +1955,7 @@ static HRESULT WINAPI MediaControl_Run(IMediaControl *iface) {
else
This
->
start_time
+=
now
-
This
->
pause_time
;
}
else
This
->
position
=
This
->
start_time
=
0
;
else
This
->
start_time
=
0
;
SendFilterMessage
(
iface
,
SendRun
,
0
);
This
->
state
=
State_Running
;
...
...
@@ -1990,13 +1989,6 @@ static HRESULT WINAPI MediaControl_Stop(IMediaControl *iface) {
if
(
This
->
state
==
State_Stopped
)
return
S_OK
;
EnterCriticalSection
(
&
This
->
cs
);
if
(
This
->
state
==
State_Running
&&
This
->
refClock
)
{
LONGLONG
time
=
This
->
start_time
;
IReferenceClock_GetTime
(
This
->
refClock
,
&
time
);
This
->
position
+=
time
-
This
->
start_time
;
}
if
(
This
->
state
==
State_Running
)
SendFilterMessage
(
iface
,
SendPause
,
0
);
SendFilterMessage
(
iface
,
SendStop
,
0
);
This
->
state
=
State_Stopped
;
...
...
@@ -2319,10 +2311,8 @@ static HRESULT WINAPI FoundDuration(IFilterGraphImpl *This, IMediaSeeking *seek,
if
(
FAILED
(
hr
))
return
hr
;
/* FIXME: Minimum or maximum duration? Assuming minimum */
if
(
duration
>
0
&&
*
pdur
<
duration
)
if
(
*
pdur
<
duration
)
*
pdur
=
duration
;
return
hr
;
}
...
...
@@ -2337,7 +2327,7 @@ static HRESULT WINAPI MediaSeeking_GetDuration(IMediaSeeking *iface,
return
E_POINTER
;
EnterCriticalSection
(
&
This
->
cs
);
*
pDuration
=
-
1
;
*
pDuration
=
0
;
hr
=
all_renderers_seek
(
This
,
FoundDuration
,
(
DWORD_PTR
)
pDuration
);
LeaveCriticalSection
(
&
This
->
cs
);
...
...
@@ -2361,37 +2351,45 @@ static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface,
hr
=
IMediaSeeking_GetDuration
(
iface
,
pStop
);
else
*
pStop
=
This
->
stop_position
;
LeaveCriticalSection
(
&
This
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
FoundCurrentPosition
(
IFilterGraphImpl
*
This
,
IMediaSeeking
*
seek
,
DWORD_PTR
pposition
)
{
HRESULT
hr
;
LONGLONG
pos
=
0
,
*
ppos
=
(
LONGLONG
*
)
pposition
;
hr
=
IMediaSeeking_GetCurrentPosition
(
seek
,
&
pos
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
*
ppos
<
0
||
pos
<
*
ppos
)
*
ppos
=
pos
;
return
hr
;
}
static
HRESULT
WINAPI
MediaSeeking_GetCurrentPosition
(
IMediaSeeking
*
iface
,
LONGLONG
*
pCurrent
)
{
ICOM_THIS_MULTI
(
IFilterGraphImpl
,
IMediaSeeking_vtbl
,
iface
);
LONGLONG
time
=
0
;
HRESULT
hr
;
if
(
!
pCurrent
)
return
E_POINTER
;
EnterCriticalSection
(
&
This
->
cs
);
if
(
This
->
state
==
State_Running
&&
This
->
refClock
)
{
IReferenceClock_GetTime
(
This
->
refClock
,
&
time
);
if
(
time
)
time
+=
This
->
position
-
This
->
start_time
;
if
(
time
<
This
->
position
)
time
=
This
->
position
;
*
pCurrent
=
time
;
*
pCurrent
=
-
1
;
hr
=
all_renderers_seek
(
This
,
FoundCurrentPosition
,
(
DWORD_PTR
)
pCurrent
);
if
(
hr
==
E_NOTIMPL
)
{
*
pCurrent
=
0
;
hr
=
S_OK
;
}
else
*
pCurrent
=
This
->
position
;
LeaveCriticalSection
(
&
This
->
cs
);
TRACE
(
"Time: %u.%03u
\n
"
,
(
DWORD
)(
*
pCurrent
/
10000000
),
(
DWORD
)((
*
pCurrent
/
10000
)
%
1000
));
return
S_OK
;
return
hr
;
}
static
HRESULT
WINAPI
MediaSeeking_ConvertTimeFormat
(
IMediaSeeking
*
iface
,
...
...
@@ -2435,11 +2433,8 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface,
state
=
This
->
state
;
TRACE
(
"State: %s
\n
"
,
state
==
State_Running
?
"Running"
:
(
state
==
State_Paused
?
"Paused"
:
(
state
==
State_Stopped
?
"Stopped"
:
"UNKNOWN"
)));
if
((
dwCurrentFlags
&
0x7
)
==
AM_SEEKING_AbsolutePositioning
)
{
This
->
position
=
*
pCurrent
;
}
else
if
((
dwCurrentFlags
&
0x7
)
!=
AM_SEEKING_NoPositioning
)
if
((
dwCurrentFlags
&
0x7
)
!=
AM_SEEKING_AbsolutePositioning
&&
(
dwCurrentFlags
&
0x7
)
!=
AM_SEEKING_NoPositioning
)
FIXME
(
"Adjust method %x not handled yet!
\n
"
,
dwCurrentFlags
&
0x7
);
if
((
dwStopFlags
&
0x7
)
==
AM_SEEKING_AbsolutePositioning
)
...
...
@@ -5477,7 +5472,7 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj)
fimpl
->
cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": IFilterGraphImpl.cs"
);
fimpl
->
nItfCacheEntries
=
0
;
memcpy
(
&
fimpl
->
timeformatseek
,
&
TIME_FORMAT_MEDIA_TIME
,
sizeof
(
GUID
));
fimpl
->
start_time
=
fimpl
->
p
osition
=
0
;
fimpl
->
start_time
=
fimpl
->
p
ause_time
=
0
;
fimpl
->
stop_position
=
-
1
;
fimpl
->
punkFilterMapper2
=
NULL
;
fimpl
->
recursioncount
=
0
;
...
...
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