Commit a878f3ac authored by Damien Fouilleul's avatar Damien Fouilleul

qt4: a few stability fixes when working as a dialogs provider, needs a lot more ...

parent 9924f657
...@@ -261,6 +261,8 @@ MainInputManager::~MainInputManager() ...@@ -261,6 +261,8 @@ MainInputManager::~MainInputManager()
void MainInputManager::updateInput() void MainInputManager::updateInput()
{ {
if( VLC_OBJECT_INTF == p_intf->i_object_type )
{
vlc_mutex_lock( &p_intf->change_lock ); vlc_mutex_lock( &p_intf->change_lock );
if( p_input && p_input->b_dead ) if( p_input && p_input->b_dead )
{ {
...@@ -282,6 +284,17 @@ void MainInputManager::updateInput() ...@@ -282,6 +284,17 @@ void MainInputManager::updateInput()
QPL_UNLOCK; QPL_UNLOCK;
} }
vlc_mutex_unlock( &p_intf->change_lock ); vlc_mutex_unlock( &p_intf->change_lock );
}
else {
/* we are working as a dialogs provider */
playlist_t *p_playlist = (playlist_t *) vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist )
{
p_input = p_playlist->p_input;
emit inputChanged( p_input );
}
}
} }
void MainInputManager::stop() void MainInputManager::stop()
......
...@@ -54,7 +54,7 @@ struct intf_sys_t ...@@ -54,7 +54,7 @@ struct intf_sys_t
#define QPL_UNLOCK vlc_mutex_unlock( &THEPL->object_lock ); #define QPL_UNLOCK vlc_mutex_unlock( &THEPL->object_lock );
#define THEDP DialogsProvider::getInstance() #define THEDP DialogsProvider::getInstance()
#define THEMIM MainInputManager::getInstance( NULL ) #define THEMIM MainInputManager::getInstance( p_intf )
#define qfu( i ) QString::fromUtf8( i ) #define qfu( i ) QString::fromUtf8( i )
#define qtr( i ) QString::fromUtf8( _(i) ) #define qtr( i ) QString::fromUtf8( _(i) )
......
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