[vlc-devel] commit: Qt: Call Lua status callbacks on playing status changes ( Srikanth Raju )

git version control git at videolan.org
Sun Feb 14 18:32:42 CET 2010


vlc | branch: master | Srikanth Raju <srikiraju at gmail.com> | Mon Feb  8 23:45:43 2010 +0530| [4a50f0a7d11cf0c01236ee7c4d34af418cbcca20] | committer: Jean-Philippe André 

Qt: Call Lua status callbacks on playing status changes

Signed-off-by: Jean-Philippe André <jpeg at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a50f0a7d11cf0c01236ee7c4d34af418cbcca20
---

 modules/gui/qt4/extensions_manager.cpp |   18 ++++++++++++++++++
 modules/gui/qt4/extensions_manager.hpp |    1 +
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/extensions_manager.cpp b/modules/gui/qt4/extensions_manager.cpp
index 37888ed..b1f451e 100644
--- a/modules/gui/qt4/extensions_manager.cpp
+++ b/modules/gui/qt4/extensions_manager.cpp
@@ -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 );
+}
diff --git a/modules/gui/qt4/extensions_manager.hpp b/modules/gui/qt4/extensions_manager.hpp
index 7659357..17f5af9 100644
--- a/modules/gui/qt4/extensions_manager.hpp
+++ b/modules/gui/qt4/extensions_manager.hpp
@@ -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;




More information about the vlc-devel mailing list