]> git.sesse.net Git - vlc/commitdiff
Detect the spu presence in the IM. Deactivate the teletext until any
authorJean-Baptiste Kempf <jb@ambre.(none)>
Sat, 29 Mar 2008 05:08:49 +0000 (22:08 -0700)
committerJean-Baptiste Kempf <jb@ambre.(none)>
Sat, 29 Mar 2008 05:08:49 +0000 (22:08 -0700)
good detection exist.

modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.hpp

index c3666191730fe0f548575e942e0bb3a3dcdbea34..8d9e7233e9903978ac570538c387dfbc745db688 100644 (file)
@@ -61,6 +61,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) :
 {
     i_old_playing_status = END_S;
     b_had_audio  = b_had_video = b_has_audio = b_has_video = false;
+    b_has_subs   = false;
     old_name     = "";
     artUrl       = "";
     p_input      = NULL;
@@ -312,13 +313,14 @@ void InputManager::UpdateTracks()
     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;
-
-    msg_Dbg( p_input, "I have audio-video: %i %i", b_has_audio, b_has_video );
+    var_Change( p_input, "spu-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
+    b_has_subs = val.i_int > 0;
 
     /* Update ZVBI status */
 #ifdef ZVBI_COMPILED
     /* Update teletext status*/
-    emit teletextEnabled( true );/* FIXME */
+    if( b_has_subs )
+        emit teletextEnabled( false );/* FIXME */
 #endif
 }
 
index e0d84ce9950b642997f2043e305bfd9eff3c5e16..b3ae1dea3b48774afda11206e47a29a1d0f4f861 100644 (file)
@@ -64,7 +64,7 @@ public:
     bool hasInput() { return p_input && !p_input->b_dead && !p_input->b_die; }
     bool hasAudio() { return b_has_audio; }
     bool hasVideo() { return b_has_video; }
-    bool b_has_audio, b_has_video, b_had_audio, b_had_video;
+    bool b_has_audio, b_has_video, b_had_audio, b_had_video, b_has_subs;
 
 private:
     intf_thread_t  *p_intf;