Commit 4286e342 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

input: change time-offset from time to integer type

parent ce80ca38
...@@ -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_SetTime( p_input, "time-offset", -CLOCK_FREQ * it ); var_SetInteger( 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_SetTime( p_input, "time-offset", CLOCK_FREQ * it ); var_SetInteger( p_input, "time-offset", CLOCK_FREQ * it );
vlc_object_release( p_input ); vlc_object_release( p_input );
break; break;
} }
......
...@@ -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_SetTime( p_input, "time-offset", it * sign * CLOCK_FREQ ); var_SetInteger( p_input, "time-offset", it * sign * CLOCK_FREQ );
DisplayPosition( p_intf, p_vout, p_input ); DisplayPosition( p_intf, p_vout, p_input );
break; break;
} }
......
...@@ -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_SetTime( p_input, "time-offset", val ); var_SetInteger( p_input, "time-offset", val );
} }
vlc_object_release(p_input); vlc_object_release(p_input);
} }
......
...@@ -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_SetTime( p_input, "time-offset", val ); var_SetInteger( 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_SetTime( p_input, "time-offset", val ); var_SetInteger( p_input, "time-offset", val );
} }
} }
......
...@@ -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_SetTime( obj, "time", i_time ); var_SetInteger( obj, "time", i_time );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment