Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
4286e342
Commit
4286e342
authored
May 22, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: change time-offset from time to integer type
parent
ce80ca38
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
modules/control/gestures.c
modules/control/gestures.c
+2
-2
modules/control/hotkeys.c
modules/control/hotkeys.c
+1
-1
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+1
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+2
-2
src/input/var.c
src/input/var.c
+3
-3
No files found.
modules/control/gestures.c
View file @
4286e342
...
@@ -201,7 +201,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
...
@@ -201,7 +201,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
int
it
=
var_InheritInteger
(
p_intf
,
"short-jump-size"
);
int
it
=
var_InheritInteger
(
p_intf
,
"short-jump-size"
);
if
(
it
>
0
)
if
(
it
>
0
)
var_Set
Time
(
p_input
,
"time-offset"
,
-
CLOCK_FREQ
*
it
);
var_Set
Integer
(
p_input
,
"time-offset"
,
-
CLOCK_FREQ
*
it
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
break
;
break
;
}
}
...
@@ -216,7 +216,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
...
@@ -216,7 +216,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
int
it
=
var_InheritInteger
(
p_intf
,
"short-jump-size"
);
int
it
=
var_InheritInteger
(
p_intf
,
"short-jump-size"
);
if
(
it
>
0
)
if
(
it
>
0
)
var_Set
Time
(
p_input
,
"time-offset"
,
CLOCK_FREQ
*
it
);
var_Set
Integer
(
p_input
,
"time-offset"
,
CLOCK_FREQ
*
it
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
break
;
break
;
}
}
...
...
modules/control/hotkeys.c
View file @
4286e342
...
@@ -739,7 +739,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
...
@@ -739,7 +739,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
mtime_t
it
=
var_InheritInteger
(
p_input
,
varname
);
mtime_t
it
=
var_InheritInteger
(
p_input
,
varname
);
if
(
it
<
0
)
if
(
it
<
0
)
break
;
break
;
var_Set
Time
(
p_input
,
"time-offset"
,
it
*
sign
*
CLOCK_FREQ
);
var_Set
Integer
(
p_input
,
"time-offset"
,
it
*
sign
*
CLOCK_FREQ
);
DisplayPosition
(
p_intf
,
p_vout
,
p_input
);
DisplayPosition
(
p_intf
,
p_vout
,
p_input
);
break
;
break
;
}
}
...
...
modules/gui/macosx/CoreInteraction.m
View file @
4286e342
...
@@ -293,7 +293,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
...
@@ -293,7 +293,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
mtime_t
val
=
CLOCK_FREQ
*
i_interval
;
mtime_t
val
=
CLOCK_FREQ
*
i_interval
;
if
(
!
b_value
)
if
(
!
b_value
)
val
=
val
*
-
1
;
val
=
val
*
-
1
;
var_Set
Time
(
p_input
,
"time-offset"
,
val
);
var_Set
Integer
(
p_input
,
"time-offset"
,
val
);
}
}
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
}
}
...
...
modules/gui/qt4/input_manager.cpp
View file @
4286e342
...
@@ -961,7 +961,7 @@ void InputManager::jumpFwd()
...
@@ -961,7 +961,7 @@ void InputManager::jumpFwd()
if
(
i_interval
>
0
&&
hasInput
()
)
if
(
i_interval
>
0
&&
hasInput
()
)
{
{
mtime_t
val
=
CLOCK_FREQ
*
i_interval
;
mtime_t
val
=
CLOCK_FREQ
*
i_interval
;
var_Set
Time
(
p_input
,
"time-offset"
,
val
);
var_Set
Integer
(
p_input
,
"time-offset"
,
val
);
}
}
}
}
...
@@ -971,7 +971,7 @@ void InputManager::jumpBwd()
...
@@ -971,7 +971,7 @@ void InputManager::jumpBwd()
if
(
i_interval
>
0
&&
hasInput
()
)
if
(
i_interval
>
0
&&
hasInput
()
)
{
{
mtime_t
val
=
-
CLOCK_FREQ
*
i_interval
;
mtime_t
val
=
-
CLOCK_FREQ
*
i_interval
;
var_Set
Time
(
p_input
,
"time-offset"
,
val
);
var_Set
Integer
(
p_input
,
"time-offset"
,
val
);
}
}
}
}
...
...
src/input/var.c
View file @
4286e342
...
@@ -148,7 +148,7 @@ void input_ControlVarInit ( input_thread_t *p_input )
...
@@ -148,7 +148,7 @@ void input_ControlVarInit ( input_thread_t *p_input )
/* Time */
/* Time */
var_Create
(
p_input
,
"time"
,
VLC_VAR_INTEGER
);
var_Create
(
p_input
,
"time"
,
VLC_VAR_INTEGER
);
var_Create
(
p_input
,
"time-offset"
,
VLC_VAR_TIME
);
/* relative */
var_Create
(
p_input
,
"time-offset"
,
VLC_VAR_INTEGER
);
/* relative */
/* Bookmark */
/* Bookmark */
var_Create
(
p_input
,
"bookmark"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
|
var_Create
(
p_input
,
"bookmark"
,
VLC_VAR_INTEGER
|
VLC_VAR_HASCHOICE
|
...
@@ -639,10 +639,10 @@ static int TimeOffsetCallback( vlc_object_t *obj, char const *varname,
...
@@ -639,10 +639,10 @@ static int TimeOffsetCallback( vlc_object_t *obj, char const *varname,
{
{
VLC_UNUSED
(
varname
);
VLC_UNUSED
(
prev
);
VLC_UNUSED
(
data
);
VLC_UNUSED
(
varname
);
VLC_UNUSED
(
prev
);
VLC_UNUSED
(
data
);
mtime_t
i_time
=
var_GetTime
(
obj
,
"time"
)
+
cur
.
i_time
;
int64_t
i_time
=
var_GetInteger
(
obj
,
"time"
)
+
cur
.
i_int
;
if
(
i_time
<
0
)
if
(
i_time
<
0
)
i_time
=
0
;
i_time
=
0
;
var_Set
Time
(
obj
,
"time"
,
i_time
);
var_Set
Integer
(
obj
,
"time"
,
i_time
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
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