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
36fb590e
Commit
36fb590e
authored
Nov 12, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Nov 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Fix seeking for real.
parent
9867c391
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
gstdemux.c
dlls/winegstreamer/gstdemux.c
+11
-8
No files found.
dlls/winegstreamer/gstdemux.c
View file @
36fb590e
...
...
@@ -326,7 +326,7 @@ static gboolean gst_base_src_perform_seek(GSTImpl *This, GstEvent *event)
gst_pad_activate_push
(
This
->
my_src
,
0
);
}
T
RACE
(
"++++++++++++++++ perform byte seek ------------------
\n
"
)
;
T
his
->
nextofs
=
This
->
start
=
cur
;
/* and prepare to continue streaming */
if
(
flush
)
{
...
...
@@ -829,11 +829,15 @@ static gboolean activate_push(GstPad *pad, gboolean activate) {
EnterCriticalSection
(
&
This
->
filter
.
csFilter
);
if
(
!
activate
)
{
TRACE
(
"Deactivating
\n
"
);
if
(
!
This
->
initial
)
IAsyncReader_BeginFlush
(
This
->
pInputPin
.
pReader
);
if
(
This
->
push_thread
)
{
WaitForSingleObject
(
This
->
push_thread
,
-
1
);
CloseHandle
(
This
->
push_thread
);
This
->
push_thread
=
NULL
;
}
if
(
!
This
->
initial
)
IAsyncReader_EndFlush
(
This
->
pInputPin
.
pReader
);
if
(
This
->
filter
.
state
==
State_Stopped
)
This
->
nextofs
=
This
->
start
;
}
else
if
(
!
This
->
push_thread
)
{
...
...
@@ -968,6 +972,7 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
gst_pad_query_duration
(
This
->
ppPins
[
0
]
->
their_src
,
&
format
,
&
duration
);
for
(
i
=
0
;
i
<
This
->
cStreams
;
++
i
)
{
This
->
ppPins
[
i
]
->
seek
.
llDuration
=
This
->
ppPins
[
i
]
->
seek
.
llStop
=
duration
/
100
;
This
->
ppPins
[
i
]
->
seek
.
llCurrent
=
0
;
if
(
!
This
->
ppPins
[
i
]
->
seek
.
llDuration
)
This
->
ppPins
[
i
]
->
seek
.
dwCapabilities
=
0
;
WaitForSingleObject
(
This
->
ppPins
[
i
]
->
caps_event
,
-
1
);
...
...
@@ -1134,11 +1139,8 @@ static HRESULT WINAPI GST_Stop(IBaseFilter *iface) {
TRACE
(
"()
\n
"
);
if
(
This
->
gstfilter
)
{
IAsyncReader_BeginFlush
(
This
->
pInputPin
.
pReader
);
if
(
This
->
gstfilter
)
gst_element_set_state
(
This
->
gstfilter
,
GST_STATE_READY
);
IAsyncReader_EndFlush
(
This
->
pInputPin
.
pReader
);
}
return
S_OK
;
}
...
...
@@ -1313,6 +1315,7 @@ static HRESULT WINAPI GST_Seeking_GetCurrentPosition(IMediaSeeking *iface, REFER
return
E_NOTIMPL
;
}
*
pos
/=
100
;
This
->
seek
.
llCurrent
=
*
pos
;
return
S_OK
;
}
...
...
@@ -1339,8 +1342,10 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, REFERENCE_T
hr
=
SourceSeekingImpl_SetPositions
(
iface
,
pCur
,
curflags
,
pStop
,
stopflags
);
if
(
!
This
->
their_src
)
return
This
->
seek
.
llDuration
?
hr
:
E_NOTIMPL
;
return
hr
;
curtype
=
type_from_flags
(
curflags
);
stoptype
=
type_from_flags
(
stopflags
);
if
(
curflags
&
AM_SEEKING_SeekToKeyFrame
)
f
|=
GST_SEEK_FLAG_KEY_UNIT
;
if
(
curflags
&
AM_SEEKING_Segment
)
...
...
@@ -1348,8 +1353,6 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, REFERENCE_T
if
(
!
(
curflags
&
AM_SEEKING_NoFlush
))
f
|=
GST_SEEK_FLAG_FLUSH
;
curtype
=
type_from_flags
(
curflags
);
stoptype
=
type_from_flags
(
stopflags
);
e
=
gst_event_new_seek
(
This
->
seek
.
dRate
,
GST_FORMAT_TIME
,
f
,
curtype
,
pCur
?
*
pCur
*
100
:
-
1
,
stoptype
,
pStop
?
*
pStop
*
100
:
-
1
);
if
(
gst_pad_push_event
(
This
->
my_sink
,
e
))
return
S_OK
;
...
...
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