Commit d63e1d81 authored by Jean-Paul Saman's avatar Jean-Paul Saman

(qt4) Enable reverse playback direction button in qt4 interface.

parent 409327e9
...@@ -378,6 +378,15 @@ QWidget *AbstractController::createWidget( buttonType_e button, int* i_size, ...@@ -378,6 +378,15 @@ QWidget *AbstractController::createWidget( buttonType_e button, int* i_size,
widget = advControls; widget = advControls;
*i_size = advControls->getWidth(); *i_size = advControls->getWidth();
} }
case REVERSE_BUTTON:{
QToolButton *reverseButton = new QToolButton;
setupButton( reverseButton );
CONNECT_MAP_SET( reverseButton, REVERSE_ACTION );
BUTTON_SET_BAR( reverseButton, reverse, qtr( "Reverse" ) );
ENABLE_ON_INPUT( reverseButton );
widget = reverseButton;
}
break;
default: default:
msg_Warn( p_intf, "This should not happen" ); msg_Warn( p_intf, "This should not happen" );
break; break;
...@@ -665,6 +674,8 @@ void AbstractController::doAction( int id_action ) ...@@ -665,6 +674,8 @@ void AbstractController::doAction( int id_action )
THEMIM->getIM()->setAtoB(); break; THEMIM->getIM()->setAtoB(); break;
case FRAME_ACTION: case FRAME_ACTION:
frame(); break; frame(); break;
case REVERSE_ACTION:
reverse(); break;
default: default:
msg_Dbg( p_intf, "Action: %i", id_action ); msg_Dbg( p_intf, "Action: %i", id_action );
break; break;
...@@ -730,6 +741,11 @@ void AbstractController::extSettings() ...@@ -730,6 +741,11 @@ void AbstractController::extSettings()
THEDP->extendedDialog(); THEDP->extendedDialog();
} }
void AbstractController::reverse()
{
THEMIM->getIM()->reverse();
}
void AbstractController::slower() void AbstractController::slower()
{ {
THEMIM->getIM()->slower(); THEMIM->getIM()->slower();
...@@ -1226,7 +1242,6 @@ static int FullscreenControllerWidgetMouseMoved( vlc_object_t *vlc_object, const ...@@ -1226,7 +1242,6 @@ static int FullscreenControllerWidgetMouseMoved( vlc_object_t *vlc_object, const
return VLC_SUCCESS; return VLC_SUCCESS;
} }
/** /**
* It is called when video start * It is called when video start
*/ */
...@@ -1246,6 +1261,7 @@ void FullscreenControllerWidget::attachVout( vout_thread_t *p_nvout ) ...@@ -1246,6 +1261,7 @@ void FullscreenControllerWidget::attachVout( vout_thread_t *p_nvout )
var_GetInteger( p_vout, "mouse-hide-timeout" ) ); var_GetInteger( p_vout, "mouse-hide-timeout" ) );
vlc_mutex_unlock( &lock ); vlc_mutex_unlock( &lock );
} }
/** /**
* It is called after turn off video. * It is called after turn off video.
*/ */
...@@ -1294,4 +1310,3 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout, ...@@ -1294,4 +1310,3 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout,
} }
vlc_mutex_unlock( &lock ); vlc_mutex_unlock( &lock );
} }
...@@ -83,6 +83,7 @@ typedef enum buttonType_e ...@@ -83,6 +83,7 @@ typedef enum buttonType_e
TIME_LABEL, TIME_LABEL,
SPLITTER, SPLITTER,
ADVANCED_CONTROLLER, ADVANCED_CONTROLLER,
REVERSE_BUTTON,
} buttonType_e; } buttonType_e;
typedef enum actionType_e typedef enum actionType_e
...@@ -100,7 +101,8 @@ typedef enum actionType_e ...@@ -100,7 +101,8 @@ typedef enum actionType_e
SNAPSHOT_ACTION, SNAPSHOT_ACTION,
RECORD_ACTION, RECORD_ACTION,
FRAME_ACTION, FRAME_ACTION,
ATOB_ACTION ATOB_ACTION,
REVERSE_ACTION,
} actionType_e; } actionType_e;
enum enum
...@@ -147,6 +149,7 @@ protected slots: ...@@ -147,6 +149,7 @@ protected slots:
void extSettings(); void extSettings();
void faster(); void faster();
void slower(); void slower();
void reverse();
void playlist(); void playlist();
void snapshot(); void snapshot();
void record(); void record();
......
...@@ -572,6 +572,15 @@ void InputManager::activateTeletext( bool b_enable ) ...@@ -572,6 +572,15 @@ void InputManager::activateTeletext( bool b_enable )
} }
} }
void InputManager::reverse()
{
if( hasInput() )
{
int i_rate = var_GetInteger( p_input, "rate" );
var_SetInteger( p_input, "rate", -i_rate );
}
}
void InputManager::slower() void InputManager::slower()
{ {
if( hasInput() ) if( hasInput() )
...@@ -869,4 +878,3 @@ static int VolumeChanged( vlc_object_t *p_this, const char *psz_var, ...@@ -869,4 +878,3 @@ static int VolumeChanged( vlc_object_t *p_this, const char *psz_var,
QApplication::postEvent( mim, static_cast<QEvent*>(event) ); QApplication::postEvent( mim, static_cast<QEvent*>(event) );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -116,6 +116,7 @@ public slots: ...@@ -116,6 +116,7 @@ public slots:
void setInput( input_thread_t * ); ///< Our controlled input changed void setInput( input_thread_t * ); ///< Our controlled input changed
void sliderUpdate( float ); ///< User dragged the slider. We get new pos void sliderUpdate( float ); ///< User dragged the slider. We get new pos
/* SpeedRate Rate Management */ /* SpeedRate Rate Management */
void reverse();
void slower(); void slower();
void faster(); void faster();
void normalRate(); void normalRate();
......
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