Commit 343112c1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Should fix the hasVideo and hasAudio detection to enable the good buttons.

parent 94e24e9d
...@@ -81,11 +81,6 @@ void InputManager::setInput( input_thread_t *_p_input ) ...@@ -81,11 +81,6 @@ void InputManager::setInput( input_thread_t *_p_input )
if( p_input ) if( p_input )
{ {
vlc_object_yield( p_input ); vlc_object_yield( p_input );
vlc_value_t val;
var_Change( p_input, "video-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
b_has_video = val.i_int > 0;
var_Change( p_input, "audio-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
b_has_audio = val.i_int > 0;
emit statusChanged( PLAYING_S ); emit statusChanged( PLAYING_S );
addCallbacks(); addCallbacks();
} }
...@@ -293,6 +288,13 @@ void InputManager::UpdateMeta( void ) ...@@ -293,6 +288,13 @@ void InputManager::UpdateMeta( void )
emit artChanged( artUrl ); emit artChanged( artUrl );
} }
/* Has Audio, has Video Tracks ? */
vlc_value_t val;
var_Change( p_input, "audio-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
b_has_audio = val.i_int > 0;
var_Change( p_input, "video-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
b_has_video = val.i_int > 0;
/* Update ZVBI status */ /* Update ZVBI status */
#ifdef ZVBI_COMPILED #ifdef ZVBI_COMPILED
/* Update teletext status*/ /* Update teletext status*/
......
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