Commit 8d5ee287 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: provide a way to jump forward and backward programatically without going through hotkeys.

parent 87bbbc45
...@@ -791,6 +791,28 @@ void InputManager::setRate( int new_rate ) ...@@ -791,6 +791,28 @@ void InputManager::setRate( int new_rate )
var_SetInteger( p_input, "rate", new_rate ); var_SetInteger( p_input, "rate", new_rate );
} }
void InputManager::jumpFwd()
{
int i_interval = config_GetInt( p_input, "short-jump-size" );
if( i_interval > 0 )
{
vlc_value_t val;
val.i_time = (mtime_t)(i_interval) * 1000000L;
var_Set( p_input, "time-offset", val );
}
}
void InputManager::jumpBwd()
{
int i_interval = config_GetInt( p_input, "short-jump-size" );
if( i_interval > 0 )
{
vlc_value_t val;
val.i_time = -1 *(mtime_t)(i_interval) * 1000000L;
var_Set( p_input, "time-offset", val );
}
}
void InputManager::setAtoB() void InputManager::setAtoB()
{ {
if( !timeA ) if( !timeA )
......
...@@ -147,6 +147,9 @@ public slots: ...@@ -147,6 +147,9 @@ public slots:
void faster(); void faster();
void normalRate(); void normalRate();
void setRate( int ); void setRate( int );
/* Jumping */
void jumpFwd();
void jumpBwd();
/* Menus */ /* Menus */
void sectionNext(); void sectionNext();
void sectionPrev(); void sectionPrev();
......
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