vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Sat Dec 5 13:05:16 2015 +0100| [a9c9d3cfd6d95706d670f5aefcb4f14ecd1d2412] | committer: Hugo Beauzée-Luyssen
qt4: input_manager: Pass a boolean to indicate if there is an input loaded Do not pass an input_thread_t through the Qt message loop > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a9c9d3cfd6d95706d670f5aefcb4f14ecd1d2412 --- modules/gui/qt4/components/interface_widgets.cpp | 2 +- modules/gui/qt4/components/playlist/playlist_model.cpp | 2 +- modules/gui/qt4/extensions_manager.cpp | 2 +- modules/gui/qt4/input_manager.cpp | 6 +++--- modules/gui/qt4/input_manager.hpp | 2 +- modules/gui/qt4/util/input_slider.cpp | 6 +++--- modules/gui/qt4/util/input_slider.hpp | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index bd99fcf..0f1a2b5 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -514,7 +514,7 @@ SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent ) /* Change the SpeedRate in the Label */ CONNECT( THEMIM->getIM(), rateChanged( float ), this, setRate( float ) ); - DCONNECT( THEMIM, inputChanged( input_thread_t * ), + DCONNECT( THEMIM, inputChanged( bool ), speedControl, activateOnState() ); setContentsMargins(4, 0, 4, 0); diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp index f8f794c..3734efb 100644 --- a/modules/gui/qt4/components/playlist/playlist_model.cpp +++ b/modules/gui/qt4/components/playlist/playlist_model.cpp @@ -59,7 +59,7 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */ rebuild( p_root ); DCONNECT( THEMIM->getIM(), metaChanged( input_item_t *), this, processInputItemUpdate( input_item_t *) ); - DCONNECT( THEMIM, inputChanged( input_thread_t * ), + DCONNECT( THEMIM, inputChanged( bool ), this, processInputItemUpdate( ) ); CONNECT( THEMIM, playlistItemAppended( int, int ), this, processItemAppend( int, int ) ); diff --git a/modules/gui/qt4/extensions_manager.cpp b/modules/gui/qt4/extensions_manager.cpp index e8af9b6..970563f 100644 --- a/modules/gui/qt4/extensions_manager.cpp +++ b/modules/gui/qt4/extensions_manager.cpp @@ -49,7 +49,7 @@ ExtensionsManager::ExtensionsManager( intf_thread_t *_p_intf, QObject *parent ) menuMapper = new QSignalMapper( this ); CONNECT( menuMapper, mapped( int ), this, triggerMenu( int ) ); CONNECT( THEMIM->getIM(), playingStatusChanged( int ), this, playingChanged( int ) ); - DCONNECT( THEMIM, inputChanged( input_thread_t * ), + DCONNECT( THEMIM, inputChanged( bool ), this, inputChanged( ) ); CONNECT( THEMIM->getIM(), metaChanged( input_item_t* ), this, metaChanged( input_item_t* ) ); diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp index 66a8ee4..df842da 100644 --- a/modules/gui/qt4/input_manager.cpp +++ b/modules/gui/qt4/input_manager.cpp @@ -1035,7 +1035,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf ) mute.addCallback( this, SLOT(notifyMute(bool)) ); /* Warn our embedded IM about input changes */ - DCONNECT( this, inputChanged( input_thread_t * ), + DCONNECT( this, inputChanged( bool ), im, inputChangedHandler() ); } @@ -1045,7 +1045,7 @@ MainInputManager::~MainInputManager() { vlc_object_release( p_input ); p_input = NULL; - emit inputChanged( NULL ); + emit inputChanged( false ); } var_DelCallback( THEPL, "input-current", PLItemChanged, this ); @@ -1100,7 +1100,7 @@ void MainInputManager::customEvent( QEvent *event ) if( p_input != NULL ) vlc_object_release( p_input ); p_input = playlist_CurrentInput( THEPL ); - emit inputChanged( p_input ); + emit inputChanged( p_input != NULL ); } /* Playlist Control functions */ diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp index 5350b1e..8a0d2c3 100644 --- a/modules/gui/qt4/input_manager.hpp +++ b/modules/gui/qt4/input_manager.hpp @@ -309,7 +309,7 @@ private slots: void menusUpdateAudio( const QString& ); signals: - void inputChanged( input_thread_t * ); + void inputChanged( bool ); void volumeChanged( float ); void soundMuteChanged( bool ); void playlistItemAppended( int itemId, int parentId ); diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp index 756c16f..deacbe5 100644 --- a/modules/gui/qt4/util/input_slider.cpp +++ b/modules/gui/qt4/util/input_slider.cpp @@ -153,7 +153,7 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static ) hideHandleTimer->setSingleShot( true ); hideHandleTimer->setInterval( FADEOUTDELAY ); - CONNECT( MainInputManager::getInstance(), inputChanged( input_thread_t * ), this , inputUpdated( input_thread_t * ) ); + CONNECT( MainInputManager::getInstance(), inputChanged( bool ), this , inputUpdated( bool ) ); CONNECT( this, sliderMoved( int ), this, startSeekTimer() ); CONNECT( seekLimitTimer, timeout(), this, updatePos() ); CONNECT( hideHandleTimer, timeout(), this, hideHandle() ); @@ -229,9 +229,9 @@ void SeekSlider::updateBuffering( float f_buffering_ ) repaint(); } -void SeekSlider::inputUpdated( input_thread_t *p_input ) +void SeekSlider::inputUpdated( bool b_has_input ) { - if ( p_input == NULL ) { + if ( b_has_input == false ) { animLoading->stop(); mLoading = 0.0; repaint(); diff --git a/modules/gui/qt4/util/input_slider.hpp b/modules/gui/qt4/util/input_slider.hpp index a95adbb..5e4b203 100644 --- a/modules/gui/qt4/util/input_slider.hpp +++ b/modules/gui/qt4/util/input_slider.hpp @@ -120,7 +120,7 @@ public slots: private slots: void startSeekTimer(); void updatePos(); - void inputUpdated( input_thread_t *p_input ); + void inputUpdated( bool ); signals: void sliderDragged( float ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
