Commit 6341cc88 authored by Laurent Aimar's avatar Laurent Aimar

Fixed initial snpshot/fullscreen state.

It fixes a regression introduced by fccf6aa0
parent fccf6aa0
...@@ -914,6 +914,7 @@ void ControlsWidget::updateInput() ...@@ -914,6 +914,7 @@ void ControlsWidget::updateInput()
{ {
/* Activate the interface buttons according to the presence of the input */ /* Activate the interface buttons according to the presence of the input */
enableInput( THEMIM->getIM()->hasInput() ); enableInput( THEMIM->getIM()->hasInput() );
enableVideo( THEMIM->getIM()->hasVideo() );
} }
void ControlsWidget::setStatus( int status ) void ControlsWidget::setStatus( int status )
......
...@@ -69,6 +69,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) : ...@@ -69,6 +69,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) :
p_input = NULL; p_input = NULL;
i_rate = 0; i_rate = 0;
i_input_id = 0; i_input_id = 0;
b_video = false;
b_transparentTelextext = false; b_transparentTelextext = false;
} }
...@@ -117,6 +118,7 @@ void InputManager::delInput() ...@@ -117,6 +118,7 @@ void InputManager::delInput()
i_input_id = 0; i_input_id = 0;
old_name = ""; old_name = "";
artUrl = ""; artUrl = "";
b_video = false;
emit positionUpdated( -1.0, 0 ,0 ); emit positionUpdated( -1.0, 0 ,0 );
emit statusChanged( END_S ); emit statusChanged( END_S );
emit nameChanged( "" ); emit nameChanged( "" );
...@@ -350,18 +352,6 @@ bool InputManager::hasAudio() ...@@ -350,18 +352,6 @@ bool InputManager::hasAudio()
return false; return false;
} }
bool InputManager::hasVideo()
{
if( hasInput() )
{
vlc_value_t val;
var_Change( p_input, "video-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
return val.i_int > 0;
}
return false;
}
void InputManager::UpdateSPU() void InputManager::UpdateSPU()
{ {
UpdateTeletext(); UpdateTeletext();
...@@ -380,10 +370,10 @@ void InputManager::UpdateVout() ...@@ -380,10 +370,10 @@ void InputManager::UpdateVout()
if( hasInput() ) if( hasInput() )
{ {
vlc_object_t *p_vout = (vlc_object_t*)vlc_object_find( p_input, VLC_OBJECT_VOUT, FIND_CHILD ); vlc_object_t *p_vout = (vlc_object_t*)vlc_object_find( p_input, VLC_OBJECT_VOUT, FIND_CHILD );
bool b_vout = p_vout != NULL; b_video = p_vout != NULL;
if( p_vout ) if( p_vout )
vlc_object_release( p_vout ); vlc_object_release( p_vout );
emit voutChanged( b_vout ); emit voutChanged( b_video );
} }
} }
......
...@@ -71,7 +71,7 @@ public: ...@@ -71,7 +71,7 @@ public:
void delInput(); void delInput();
bool hasInput() { return p_input && !p_input->b_dead && vlc_object_alive (p_input); } bool hasInput() { return p_input && !p_input->b_dead && vlc_object_alive (p_input); }
bool hasAudio(); bool hasAudio();
bool hasVideo(); bool hasVideo() { return hasInput() && b_video; }
QString getName() { return old_name; } QString getName() { return old_name; }
...@@ -84,6 +84,7 @@ private: ...@@ -84,6 +84,7 @@ private:
QString artUrl; QString artUrl;
int i_rate; int i_rate;
bool b_transparentTelextext; bool b_transparentTelextext;
bool b_video;
void customEvent( QEvent * ); void customEvent( QEvent * );
void addCallbacks(); void addCallbacks();
......
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