Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
1b2ae82c
Commit
1b2ae82c
authored
May 17, 2012
by
Mirsal Ennaime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbus: Fix seek detection
Closes: #6802
parent
5c165066
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
modules/control/dbus/dbus.c
modules/control/dbus/dbus.c
+14
-2
No files found.
modules/control/dbus/dbus.c
View file @
1b2ae82c
...
...
@@ -912,20 +912,32 @@ static int InputIntfEventCallback( intf_thread_t *p_intf,
case
INPUT_EVENT_POSITION
:
/* Detect seeks
* XXX: This is way more convoluted than it should be... */
i_pos
=
var_GetTime
(
p_input
,
"time"
);
if
(
!
p_intf
->
p_sys
->
i_last_input_pos_event
||
!
(
var_GetInteger
(
p_input
,
"state"
)
==
PLAYING_S
)
)
{
p_intf
->
p_sys
->
i_last_input_pos_event
=
i_now
;
p_intf
->
p_sys
->
i_last_input_pos
=
i_pos
;
break
;
i_pos
=
var_GetTime
(
p_input
,
"time"
);
}
f_current_rate
=
var_GetFloat
(
p_input
,
"rate"
);
i_interval
=
(
i_now
-
p_intf
->
p_sys
->
i_last_input_pos_event
);
i_projected_pos
=
p_intf
->
p_sys
->
i_last_input_pos
+
(
i_interval
*
f_current_rate
);
i_projected_pos
=
p_intf
->
p_sys
->
i_last_input_pos
+
(
i_interval
*
f_current_rate
);
p_intf
->
p_sys
->
i_last_input_pos_event
=
i_now
;
p_intf
->
p_sys
->
i_last_input_pos
=
i_pos
;
if
(
ABS
(
i_pos
-
i_projected_pos
)
<
SEEK_THRESHOLD
)
break
;
p_info
->
signal
=
SIGNAL_SEEK
;
p_info
->
i_item
=
input_GetItem
(
p_input
)
->
i_id
;
break
;
default:
return
VLC_EGENERIC
;
}
...
...
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