[vlc-devel] [RFC 35/82] qt: port the extension manager to the new player/playlist API
Pierre Lamot
pierre at videolabs.io
Fri Feb 1 14:01:39 CET 2019
note that the extension_SetInput is incompatible with the new API
---
modules/gui/qt/extensions_manager.cpp | 41 ++++++++++++++-------------
modules/gui/qt/extensions_manager.hpp | 3 +-
2 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/modules/gui/qt/extensions_manager.cpp b/modules/gui/qt/extensions_manager.cpp
index 5bcc8d513a..02ab287f13 100644
--- a/modules/gui/qt/extensions_manager.cpp
+++ b/modules/gui/qt/extensions_manager.cpp
@@ -21,7 +21,7 @@
*****************************************************************************/
#include "extensions_manager.hpp"
-#include "input_manager.hpp"
+#include "components/player_controler.hpp"
#include "dialogs/extensions.hpp"
#include <vlc_modules.h>
@@ -47,10 +47,10 @@ 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 ) );
+ connect( THEMIM, &PlayerControler::playingStateChanged, this, &ExtensionsManager::playingChanged );
DCONNECT( THEMIM, inputChanged( bool ),
this, inputChanged( ) );
- CONNECT( THEMIM->getIM(), metaChanged( input_item_t* ),
+ CONNECT( THEMIM, metaChanged( input_item_t* ),
this, metaChanged( input_item_t* ) );
b_unloading = false;
b_failed = false;
@@ -264,25 +264,26 @@ void ExtensionsManager::triggerMenu( int id )
void ExtensionsManager::inputChanged( )
{
- input_thread_t* p_input = THEMIM->getInput();
- //This is unlikely, but can happen if no extension modules can be loaded.
- if ( p_extensions_manager == NULL )
- return ;
- vlc_mutex_lock( &p_extensions_manager->lock );
-
- extension_t *p_ext;
- ARRAY_FOREACH( p_ext, p_extensions_manager->extensions )
- {
- if( extension_IsActivated( p_extensions_manager, p_ext ) )
- {
- extension_SetInput( p_extensions_manager, p_ext, p_input );
- }
- }
-
- vlc_mutex_unlock( &p_extensions_manager->lock );
+ //FIXME unimplemented
+ //input_item_t* p_input = THEMIM->getInput();
+ ////This is unlikely, but can happen if no extension modules can be loaded.
+ //if ( p_extensions_manager == NULL )
+ // return ;
+ //vlc_mutex_lock( &p_extensions_manager->lock );
+ //
+ //extension_t *p_ext;
+ //ARRAY_FOREACH( p_ext, p_extensions_manager->extensions )
+ //{
+ // if( extension_IsActivated( p_extensions_manager, p_ext ) )
+ // {
+ // extension_SetInput( p_extensions_manager, p_ext, p_input );
+ // }
+ //}
+ //
+ //vlc_mutex_unlock( &p_extensions_manager->lock );
}
-void ExtensionsManager::playingChanged( int state )
+void ExtensionsManager::playingChanged( PlayerControler::PlayingState state )
{
//This is unlikely, but can happen if no extension modules can be loaded.
if ( p_extensions_manager == NULL )
diff --git a/modules/gui/qt/extensions_manager.hpp b/modules/gui/qt/extensions_manager.hpp
index b50bcb1127..259e95a91b 100644
--- a/modules/gui/qt/extensions_manager.hpp
+++ b/modules/gui/qt/extensions_manager.hpp
@@ -30,6 +30,7 @@
#include <vlc_extensions.h>
#include "qt.hpp"
+#include <components/player_controler.hpp>
#include <QObject>
#include <QMenu>
@@ -78,7 +79,7 @@ public slots:
private slots:
void triggerMenu( int id );
void inputChanged( );
- void playingChanged( int );
+ void playingChanged(PlayerControler::PlayingState );
void metaChanged( input_item_t *p_input );
private:
--
2.19.1
More information about the vlc-devel
mailing list