[vlc-devel] commit: Detect the spu presence in the IM. Deactivate the teletext until any (Jean-Baptiste Kempf )

git version control git at videolan.org
Sat Mar 29 06:23:01 CET 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at ambre.(none)> | Fri Mar 28 22:08:49 2008 -0700| [12f8c376ddf570554a982e38f5f927f322962400]

Detect the spu presence in the IM. Deactivate the teletext until any
good detection exist.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=12f8c376ddf570554a982e38f5f927f322962400
---

 modules/gui/qt4/input_manager.cpp |    8 +++++---
 modules/gui/qt4/input_manager.hpp |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index c366619..8d9e723 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -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
 }
 
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index e0d84ce..b3ae1de 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -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;




More information about the vlc-devel mailing list