Commit df7724ac authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

qt4: input_manager: Remove duplicated checks

parent 28639b28
......@@ -443,7 +443,6 @@ void InputManager::UpdateNavigation()
vlc_value_t val; val.i_int = 0;
vlc_value_t val2; val2.i_int = 0;
if( hasInput() )
var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &val, NULL );
if( val.i_int > 0 )
......@@ -488,8 +487,6 @@ void InputManager::UpdateRate()
void InputManager::UpdateName()
{
assert( p_input );
/* Update text, name and nowplaying */
QString name;
......@@ -568,8 +565,6 @@ bool InputManager::hasVisualisation()
void InputManager::UpdateTeletext()
{
if( hasInput() )
{
const bool b_enabled = var_CountChoices( p_input, "teletext-es" ) > 0;
const int i_teletext_es = var_GetInteger( p_input, "teletext-es" );
......@@ -606,26 +601,15 @@ void InputManager::UpdateTeletext()
}
emit teletextActivated( b_enabled && i_teletext_es >= 0 );
}
else
{
emit teletextActivated( false );
emit teletextPossible( false );
}
}
void InputManager::UpdateEPG()
{
if( hasInput() )
{
emit epgChanged();
}
}
void InputManager::UpdateVout()
{
if( hasInput() )
{
/* Get current vout lists from input */
size_t i_vout;
vout_thread_t **pp_vout;
......@@ -648,19 +632,15 @@ void InputManager::UpdateVout()
for( size_t 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()
{
if(!hasInput()) return;
float f_newCache = var_GetFloat ( p_input, "cache" );
if( f_newCache != f_cache )
{
......@@ -724,10 +704,7 @@ const QString InputManager::decodeArtURL( input_item_t *p_item )
void InputManager::UpdateArt()
{
QString url;
if( hasInput() )
url = decodeArtURL( input_GetItem( p_input ) );
QString url = decodeArtURL( input_GetItem( p_input ) );
/* the art hasn't changed, no need to update */
if(artUrl == url)
......@@ -758,7 +735,6 @@ void InputManager::setArt( input_item_t *p_item, QString fileUrl )
inline void InputManager::UpdateStats()
{
assert( p_input );
emit statisticsUpdated( input_GetItem( p_input ) );
}
......@@ -770,7 +746,6 @@ inline void InputManager::UpdateMeta( input_item_t *p_item_ )
inline void InputManager::UpdateMeta()
{
assert( p_input );
emit currentMetaChanged( input_GetItem( p_input ) );
}
......@@ -782,19 +757,13 @@ inline void InputManager::UpdateInfo()
void InputManager::UpdateRecord()
{
if( hasInput() )
{
emit recordingStateChanged( var_GetBool( p_input, "record" ) );
}
}
void InputManager::UpdateProgramEvent()
{
if( hasInput() )
{
bool b_scrambled = var_GetBool( p_input, "program-scrambled" );
emit encryptionChanged( b_scrambled );
}
}
/* User update of the slider */
......
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