Commit ba836c7e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - We DO need pulling for the stats in MediaInfo Dialog... Revert part of 23590.

parent d2b84199
......@@ -42,6 +42,7 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
{
p_item = _p_item;
b_cleaned = true;
i_runs = 0;
setWindowTitle( qtr( "Media information" ) );
resize( 600 , 480 );
......@@ -92,7 +93,9 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
/* Call update by hand, so info is shown from current item too */
if( THEMIM->getInput() )
update( input_GetItem(THEMIM->getInput()), true, true );
update( input_GetItem(THEMIM->getInput() ), true, true );
if( stats )
ON_TIMEOUT( updateOnTimeOut() );
}
MediaInfoDialog::~MediaInfoDialog()
......@@ -138,6 +141,23 @@ void MediaInfoDialog::update( input_thread_t *p_input )
vlc_object_release( p_input );
}
void MediaInfoDialog::updateOnTimeOut()
{
/* 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_yield( p_input );
update( input_GetItem(p_input), false, false);
vlc_object_release( p_input );
}
}
void MediaInfoDialog::update( input_item_t *p_item,
bool update_info,
bool update_meta )
......
......@@ -70,6 +70,7 @@ private:
bool mainInput;
bool stats;
bool b_cleaned;
int i_runs;
QTabWidget *IT;
InputStatsPanel *ISP;
......@@ -85,6 +86,7 @@ public slots:
void update( input_item_t *, bool, bool );
private slots:
void updateOnTimeOut();
void close();
void clear();
void saveMeta();
......
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