Commit cb3432ff authored by Laurent Aimar's avatar Laurent Aimar

New event (voutListChanged) in input manager.

It will be used to properly attach/detach the fullscreen controller
independantly of embed vout.
parent 9decc181
......@@ -127,6 +127,7 @@ void InputManager::delInput()
emit teletextPossible( false );
emit AtoBchanged( false, false );
emit voutChanged( false );
emit voutListChanged( NULL, 0 );
/* Reset all InfoPanels but stats */
emit artChanged( NULL );
......@@ -154,7 +155,8 @@ void InputManager::customEvent( QEvent *event )
i_type != InfoChanged_Type &&
i_type != SynchroChanged_Type &&
i_type != CachingEvent_Type &&
i_type != BookmarksChanged_Type )
i_type != BookmarksChanged_Type &&
i_type != InterfaceAoutUpdate_Type )
return;
if( i_type == CachingEvent_Type )
......@@ -173,7 +175,8 @@ void InputManager::customEvent( QEvent *event )
i_type != NameChanged_Type &&
i_type != InfoChanged_Type &&
i_type != SynchroChanged_Type &&
i_type != BookmarksChanged_Type
i_type != BookmarksChanged_Type &&
i_type != InterfaceAoutUpdate_Type
)
&& ( i_input_id != ple->i_id ) )
return;
......@@ -241,6 +244,9 @@ void InputManager::customEvent( QEvent *event )
case BookmarksChanged_Type:
emit bookmarksChanged();
break;
case InterfaceAoutUpdate_Type:
UpdateAout();
break;
default:
msg_Warn( p_intf, "This shouldn't happen: %i", i_type );
}
......@@ -299,12 +305,15 @@ static int InputEvent( vlc_object_t *p_this, const char *,
event = new IMEvent( ItemTeletextChanged_Type, 0 );
break;
case INPUT_EVENT_STATISTICS:
event = new IMEvent( StatisticsUpdate_Type, 0 );
break;
case INPUT_EVENT_VOUT:
event = new IMEvent( InterfaceVoutUpdate_Type, 0 );
break;
case INPUT_EVENT_STATISTICS:
event = new IMEvent( StatisticsUpdate_Type, 0 );
case INPUT_EVENT_AOUT:
event = new IMEvent( InterfaceAoutUpdate_Type, 0 );
break;
case INPUT_EVENT_ITEM_META: /* Codec MetaData + Art */
......@@ -482,18 +491,37 @@ void InputManager::UpdateVout()
{
if( hasInput() )
{
bool b_old_video = b_video;
/* Get current vout lists from input */
int i_vout;
vout_thread_t **pp_vout;
if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )
{
i_vout = 0;
pp_vout = NULL;
}
/* */
emit voutListChanged( pp_vout, i_vout );
vlc_object_t *p_vout = (vlc_object_t*)vlc_object_find( p_input,
VLC_OBJECT_VOUT, FIND_CHILD );
b_video = p_vout != NULL;
if( p_vout )
vlc_object_release( p_vout );
/* */
bool b_old_video = b_video;
b_video = i_vout > 0;
if( !!b_old_video != !!b_video )
emit voutChanged( b_video );
/* Release the vout list */
for( int i = 0; i < i_vout; i++ )
vlc_object_release( (vlc_object_t*)pp_vout[i] );
free( pp_vout );
}
}
void InputManager::UpdateAout()
{
if( hasInput() )
{
/* TODO */
}
}
void InputManager::UpdateCaching()
{
float f_newCache = var_GetFloat( p_input, "cache" );
......
......@@ -48,6 +48,7 @@ enum {
ItemTeletextChanged_Type,
InterfaceVoutUpdate_Type,
StatisticsUpdate_Type, /*10*/
InterfaceAoutUpdate_Type,
MetaChanged_Type,
NameChanged_Type,
InfoChanged_Type,
......@@ -126,6 +127,7 @@ private:
void UpdateInfo();
void UpdateMeta();
void UpdateVout();
void UpdateAout();
void UpdateStats();
void UpdateCaching();
......@@ -182,6 +184,7 @@ signals:
void synchroChanged();
void bookmarksChanged();
void cachingChanged( float );
void voutListChanged( vout_thread_t **pp_vout, int i_vout );
};
class MainInputManager : public QObject
......
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