From kde-commits Thu May 31 22:00:59 2012 From: Harald Sitter Date: Thu, 31 May 2012 22:00:59 +0000 To: kde-commits Subject: [dragon] src/app: dont seek before play, dont play in load, dont pause in seek Message-Id: <20120531220059.06CFEA60A9 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=133850184111495 Git commit a5a9a640c6adf1aeaa1698e9111b6135f7ca15f8 by Harald Sitter. Committed on 01/06/2012 at 00:00. Pushed by sitter into branch 'master'. dont seek before play, dont play in load, dont pause in seek WTF, srsly M +1 -12 src/app/videoWindow.cpp http://commits.kde.org/dragon/a5a9a640c6adf1aeaa1698e9111b6135f7ca15f8 diff --git a/src/app/videoWindow.cpp b/src/app/videoWindow.cpp index 62ab1a9..fa4c7f5 100644 --- a/src/app/videoWindow.cpp +++ b/src/app/videoWindow.cpp @@ -206,7 +206,6 @@ VideoWindow::load( const KUrl &url ) m_media->setCurrentSource( url ); m_justLoaded =3D true; m_adjustedSize=3Dfalse; - engine()->play(); = QApplication::restoreOverrideCursor(); = @@ -220,9 +219,9 @@ VideoWindow::play( qint64 offset ) QApplication::setOverrideCursor( Qt::WaitCursor ); = m_justLoaded =3D false; + m_media->play(); if( offset > 0 ) seek( offset ); - m_media->play(); kDebug() << "Does this media have Video stream? " << TheStream::hasVid= eo(); = QApplication::restoreOverrideCursor(); @@ -424,16 +423,6 @@ VideoWindow::isMuted() void VideoWindow::seek( qint64 pos ) { -// bool wasPaused =3D false; - - // If we seek to the end the track ended event is sent, but it is - // delayed as it happens in xine-event loop and before that we are - // already processing the next seek event (if user uses mouse wheel - // or keyboard to seek) and this causes the ui to think video is - // stopped but xine is actually playing the track. Tada! - // TODO set state based on events from xine only - - m_media->pause(); //pausing first gives Phonon a chance to recognize= seekable media; m_media->seek( pos ); } =20