Commit 4a50f0a7 authored by Srikanth Raju's avatar Srikanth Raju Committed by Jean-Philippe André

Qt: Call Lua status callbacks on playing status changes

Signed-off-by: default avatarJean-Philippe André <jpeg@videolan.org>
parent eeda6528
......@@ -47,6 +47,7 @@ ExtensionsManager::ExtensionsManager( intf_thread_t *_p_intf, QObject *parent )
menuMapper = new QSignalMapper( this );
CONNECT( menuMapper, mapped( int ), this, triggerMenu( int ) );
CONNECT( THEMIM->getIM(), statusChanged( int ), this, playingChanged( int ) );
CONNECT( THEMIM, inputChanged( input_thread_t* ),
this, inputChanged( input_thread_t* ) );
b_unloading = false;
......@@ -271,3 +272,20 @@ void ExtensionsManager::inputChanged( input_thread_t* p_input )
vlc_mutex_unlock( &p_extensions_manager->lock );
}
void ExtensionsManager::playingChanged( int state )
{
vlc_mutex_lock( &p_extensions_manager->lock );
extension_t *p_ext;
FOREACH_ARRAY( p_ext, p_extensions_manager->extensions )
{
if( extension_IsActivated( p_extensions_manager, p_ext ) )
{
extension_PlayingChanged( p_extensions_manager, p_ext, state );
}
}
FOREACH_END()
vlc_mutex_unlock( &p_extensions_manager->lock );
}
......@@ -79,6 +79,7 @@ public slots:
private slots:
void triggerMenu( int id );
void inputChanged( input_thread_t *p_input );
void playingChanged( int );
private:
static ExtensionsManager* instance;
......
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