[vlc-commits] Qt: buffering slider option should be 0 when the cache is empty
Jonathan Calmels
git at videolan.org
Thu Jan 29 15:59:23 CET 2015
vlc | branch: master | Jonathan Calmels <jbjcalmels at gmail.com> | Thu Jan 29 14:46:12 2015 +0100| [9d679e90702e4bc38979a2c7b315069a08aacd2e] | committer: Jean-Baptiste Kempf
Qt: buffering slider option should be 0 when the cache is empty
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d679e90702e4bc38979a2c7b315069a08aacd2e
---
modules/gui/qt4/input_manager.cpp | 2 +-
modules/gui/qt4/styles/seekstyle.cpp | 2 +-
modules/gui/qt4/util/input_slider.cpp | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index bf6e5a5..62184e7 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -212,7 +212,7 @@ void InputManager::delInput()
emit encryptionChanged( false );
emit recordingStateChanged( false );
- emit cachingChanged( 1 );
+ emit cachingChanged( 0.0 );
}
/* Convert the event from the callbacks in actions */
diff --git a/modules/gui/qt4/styles/seekstyle.cpp b/modules/gui/qt4/styles/seekstyle.cpp
index 9c90d2c..f3a5f69 100644
--- a/modules/gui/qt4/styles/seekstyle.cpp
+++ b/modules/gui/qt4/styles/seekstyle.cpp
@@ -128,7 +128,7 @@ void SeekStyle::drawComplexControl( ComplexControl cc, const QStyleOptionComplex
}
/* draw buffering overlay */
- if ( slideroptions->buffering < 1.0 )
+ if ( slideroptions->buffering > 0.0 && slideroptions->buffering < 1.0 )
{
QRect innerRect = groove.adjusted( 1, 1,
groove.width() * ( -1.0 + slideroptions->buffering ) - 1, 0 );
diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index fe3cdc0..74faa41 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -60,7 +60,7 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static )
{
isSliding = false;
isJumping = false;
- f_buffering = 1.0;
+ f_buffering = 0.0;
mHandleOpacity = 1.0;
chapters = NULL;
mHandleLength = -1;
@@ -393,7 +393,7 @@ void SeekSlider::paintEvent( QPaintEvent *ev )
if ( QTime::currentTime() > bufferingStart.addSecs( 1 ) )
option.buffering = f_buffering;
else
- option.buffering = 1.0;
+ option.buffering = 0.0;
option.length = inputLength;
option.animate = ( animHandle->state() == QAbstractAnimation::Running
|| hideHandleTimer->isActive() );
More information about the vlc-commits
mailing list