[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdemultimedia
From: Allen Winter <winter () kde ! org>
Date: 2009-01-30 13:53:07
Message-ID: 1233323587.786843.2718.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 918684 by winterz:
add a check for unistd.h to the buildsystem.
and include unistd.h in dragonplayer/src/app/videoWindow.cpp, for usleep.
M +1 -0 ConfigureChecks.cmake
M +2 -0 config.h.cmake
M +17 -12 dragonplayer/src/app/videoWindow.cpp
--- trunk/KDE/kdemultimedia/ConfigureChecks.cmake #918683:918684
@@ -42,6 +42,7 @@
# Linux has <endian.h>, FreeBSD has <sys/endian.h> and Solaris has neither.
check_include_files(endian.h HAVE_ENDIAN_H)
check_include_files(sys/endian.h HAVE_SYS_ENDIAN_H)
+check_include_files(unistd.h HAVE_UNISTD_H)
check_type_size("long" SIZEOF_LONG)
--- trunk/KDE/kdemultimedia/config.h.cmake #918683:918684
@@ -52,3 +52,5 @@
/* Compatibility with older version of xine */
/* #undef _x_ao_new_port */
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H 1
--- trunk/KDE/kdemultimedia/dragonplayer/src/app/videoWindow.cpp #918683:918684
@@ -8,7 +8,7 @@
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
- * by the membership of KDE e.V.), which shall act as a proxy
+ * by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
@@ -20,6 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************/
+#include <config.h>
#define DRAGONPLAYER_DEBUG_PREFIX "engine"
@@ -65,6 +66,10 @@
#include <windows.h>
#endif
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
using Phonon::AudioOutput;
using Phonon::MediaObject;
using Phonon::VideoWidget;
@@ -81,7 +86,7 @@
: QWidget( parent )
, m_cursorTimer( new QTimer( this ) )
, m_justLoaded( false )
- , m_adjustedSize( false)
+ , m_adjustedSize( false)
, m_xineStream( 0 )
, m_subLanguages( new QActionGroup( this ) )
, m_audioLanguages( new QActionGroup( this ) )
@@ -155,7 +160,7 @@
m_logo->show();
}
{
- KConfigGroup config = KGlobal::config()->group( "General" );
+ KConfigGroup config = KGlobal::config()->group( "General" );
m_aOutput->setVolume( config.readEntry<double>( "Volume", 1.0 ) );
}
}
@@ -362,7 +367,7 @@
return "Error";
}
-QMultiMap<QString, QString>
+QMultiMap<QString, QString>
VideoWindow::metaData() const
{
return m_media->metaData();
@@ -378,7 +383,7 @@
Phonon::State
VideoWindow::state() const
{
- return m_media->state();
+ return m_media->state();
}
qreal
@@ -420,7 +425,7 @@
m_media->pause(); //pausing first gives Phonon a chance to recognize seekable media;
m_media->seek( pos );
-}
+}
void
VideoWindow::showOSD( const QString &/*message*/ )
@@ -500,7 +505,7 @@
if( currentState == Phonon::LoadingState )
m_xineStream = 0;
-
+
if( currentState == Phonon::PlayingState && m_media->hasVideo() )
{
m_logo->hide();
@@ -514,9 +519,9 @@
( (QWidget*) mainWindow() )->adjustSize();
m_adjustedSize=true;
debug() << "adjusting size to video resolution";
- }
+ }
}
- emit stateChanged( currentState );
+ emit stateChanged( currentState );
}
void
@@ -610,7 +615,7 @@
DEBUG_BLOCK
Phonon::SubtitleDescription desc = Phonon::SubtitleDescription::fromIndex( channel );
debug() << "using index: " << channel << " returned desc has index: " << desc.index();
- if(desc.isValid())
+ if(desc.isValid())
m_controller->setCurrentSubtitle( desc );
}
@@ -767,7 +772,7 @@
menu.addAction( action( "play" ) );
menu.addAction( action( "fullscreen" ) );
menu.addAction( action( "reset_zoom" ) );
- if(isDVD())
+ if(isDVD())
{
menu.addAction( action( "toggle_dvd_menu" ) );
}
@@ -775,7 +780,7 @@
menu.exec( event->globalPos() );
}
-void
+void
VideoWindow::mouseDoubleClickEvent( QMouseEvent* )
{
if( mainWindow() ) //TODO: add full screen mode to kpart
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic