[vlc-devel] commit: Missed this, connect mediainfo-stats also inputmanager for statsupdate. (Ilkka Ollakka )

git version control git at videolan.org
Thu Oct 16 14:46:57 CEST 2008


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Oct 16 15:45:23 2008 +0300| [631f3415cfe366c2f004898615367edd19c1dfb8] | committer: Ilkka Ollakka 

Missed this, connect mediainfo-stats also inputmanager for statsupdate.

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

 modules/gui/qt4/dialogs/mediainfo.cpp |   19 ++++---------------
 modules/gui/qt4/dialogs/mediainfo.hpp |    2 +-
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/modules/gui/qt4/dialogs/mediainfo.cpp b/modules/gui/qt4/dialogs/mediainfo.cpp
index ccebec7..a5c12a0 100644
--- a/modules/gui/qt4/dialogs/mediainfo.cpp
+++ b/modules/gui/qt4/dialogs/mediainfo.cpp
@@ -112,7 +112,8 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
         update( p_item, true, true );
 
     if( stats )
-        ON_TIMEOUT( updateOnTimeOut() );
+        CONNECT( THEMIM->getIM(), statisticsUpdated( input_item_t*),
+                this, updateStats( input_item_t*));
 
     readSettings( "Mediainfo", QSize( 600 , 480 ) );
 }
@@ -160,21 +161,9 @@ void MediaInfoDialog::update( input_thread_t *p_input )
     vlc_object_release( p_input );
 }
 
-void MediaInfoDialog::updateOnTimeOut()
+void MediaInfoDialog::updateStats( input_item_t *p_input)
 {
-    /* Timer runs at 150 ms, dont' update more than 2 times per second
-    i_runs++;
-    if( i_runs % 4 != 0 ) return;*/
-
-    /* Get Input and clear if non-existant */
-    input_thread_t *p_input = THEMIM->getInput();
-
-    if( p_input && !p_input->b_dead )
-    {
-        vlc_object_hold( p_input );
-        update( input_GetItem(p_input), false, false);
-        vlc_object_release( p_input );
-    }
+    update( p_input, false, false);
 }
 
 void MediaInfoDialog::update( input_item_t *p_item,
diff --git a/modules/gui/qt4/dialogs/mediainfo.hpp b/modules/gui/qt4/dialogs/mediainfo.hpp
index a9ee843..b161042 100644
--- a/modules/gui/qt4/dialogs/mediainfo.hpp
+++ b/modules/gui/qt4/dialogs/mediainfo.hpp
@@ -86,7 +86,7 @@ public slots:
     void update( input_item_t *, bool, bool );
 
 private slots:
-    void updateOnTimeOut();
+    void updateStats( input_item_t *);
     void close();
     void clear();
     void saveMeta();




More information about the vlc-devel mailing list