[vlc-devel] commit: Fixed initial snpshot/fullscreen state. (Laurent Aimar )
git version control
git at videolan.org
Sat Sep 6 00:11:52 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Sep 6 00:14:09 2008 +0200| [6341cc8847aa2f4da78632e73234947285455ee9] | committer: Laurent Aimar
Fixed initial snpshot/fullscreen state.
It fixes a regression introduced by fccf6aa0ca7e534a6546f6150943e0befa694126
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6341cc8847aa2f4da78632e73234947285455ee9
---
modules/gui/qt4/components/interface_widgets.cpp | 1 +
modules/gui/qt4/input_manager.cpp | 18 ++++--------------
modules/gui/qt4/input_manager.hpp | 3 ++-
3 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 27e9651..411d619 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -914,6 +914,7 @@ void ControlsWidget::updateInput()
{
/* Activate the interface buttons according to the presence of the input */
enableInput( THEMIM->getIM()->hasInput() );
+ enableVideo( THEMIM->getIM()->hasVideo() );
}
void ControlsWidget::setStatus( int status )
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 45c3176..5949bae 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -69,6 +69,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) :
p_input = NULL;
i_rate = 0;
i_input_id = 0;
+ b_video = false;
b_transparentTelextext = false;
}
@@ -117,6 +118,7 @@ void InputManager::delInput()
i_input_id = 0;
old_name = "";
artUrl = "";
+ b_video = false;
emit positionUpdated( -1.0, 0 ,0 );
emit statusChanged( END_S );
emit nameChanged( "" );
@@ -350,18 +352,6 @@ bool InputManager::hasAudio()
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()
{
UpdateTeletext();
@@ -380,10 +370,10 @@ void InputManager::UpdateVout()
if( hasInput() )
{
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 )
vlc_object_release( p_vout );
- emit voutChanged( b_vout );
+ emit voutChanged( b_video );
}
}
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index d372a95..0d0798d 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -71,7 +71,7 @@ public:
void delInput();
bool hasInput() { return p_input && !p_input->b_dead && vlc_object_alive (p_input); }
bool hasAudio();
- bool hasVideo();
+ bool hasVideo() { return hasInput() && b_video; }
QString getName() { return old_name; }
@@ -84,6 +84,7 @@ private:
QString artUrl;
int i_rate;
bool b_transparentTelextext;
+ bool b_video;
void customEvent( QEvent * );
void addCallbacks();
More information about the vlc-devel
mailing list