vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Fri May 22 21:55:10 2015 +0300| [4286e342001523cbc75996674645f08075441502] | committer: Rémi Denis-Courmont
input: change time-offset from time to integer type > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4286e342001523cbc75996674645f08075441502 --- modules/control/gestures.c | 4 ++-- modules/control/hotkeys.c | 2 +- modules/gui/macosx/CoreInteraction.m | 2 +- modules/gui/qt4/input_manager.cpp | 4 ++-- src/input/var.c | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/control/gestures.c b/modules/control/gestures.c index c53202d..ebf8403 100644 --- a/modules/control/gestures.c +++ b/modules/control/gestures.c @@ -201,7 +201,7 @@ static void ProcessGesture( intf_thread_t *p_intf ) int it = var_InheritInteger( p_intf , "short-jump-size" ); 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 ); break; } @@ -216,7 +216,7 @@ static void ProcessGesture( intf_thread_t *p_intf ) int it = var_InheritInteger( p_intf , "short-jump-size" ); 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 ); break; } diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c index 6bf59c4..02f98c4 100644 --- a/modules/control/hotkeys.c +++ b/modules/control/hotkeys.c @@ -739,7 +739,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action ) mtime_t it = var_InheritInteger( p_input, varname ); if( it < 0 ) 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 ); break; } diff --git a/modules/gui/macosx/CoreInteraction.m b/modules/gui/macosx/CoreInteraction.m index c5705eb..e6d4878 100644 --- a/modules/gui/macosx/CoreInteraction.m +++ b/modules/gui/macosx/CoreInteraction.m @@ -293,7 +293,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil; mtime_t val = CLOCK_FREQ * i_interval; if (!b_value) val = val * -1; - var_SetTime( p_input, "time-offset", val ); + var_SetInteger( p_input, "time-offset", val ); } vlc_object_release(p_input); } diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp index daf96aa..669e93e 100644 --- a/modules/gui/qt4/input_manager.cpp +++ b/modules/gui/qt4/input_manager.cpp @@ -961,7 +961,7 @@ void InputManager::jumpFwd() if( i_interval > 0 && hasInput() ) { 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() if( i_interval > 0 && hasInput() ) { mtime_t val = -CLOCK_FREQ * i_interval; - var_SetTime( p_input, "time-offset", val ); + var_SetInteger( p_input, "time-offset", val ); } } diff --git a/src/input/var.c b/src/input/var.c index 3e588d7..328086f 100644 --- a/src/input/var.c +++ b/src/input/var.c @@ -148,7 +148,7 @@ void input_ControlVarInit ( input_thread_t *p_input ) /* Time */ 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 */ 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, { 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 ) i_time = 0; - var_SetTime( obj, "time", i_time ); + var_SetInteger( obj, "time", i_time ); return VLC_SUCCESS; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
