-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/opieplayer2.pro | 12 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 9 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.h | 5 |
7 files changed, 22 insertions, 20 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 303834a..23f4329 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -253,3 +253,3 @@ void AudioWidget::sliderReleased() { void AudioWidget::setPosition( long i ) { - qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i); +// qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i); updateSlider( i, mediaPlayerState->length() ); @@ -292,3 +292,2 @@ void AudioWidget::setView( char view ) { static QString timeAsString( long length ) { - length /= 44100; int minutes = length / 60; @@ -301,3 +300,4 @@ void AudioWidget::updateSlider( long i, long max ) { time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); - +// qDebug( timeAsString( i ) + " / " + timeAsString( max ) ) ; + if ( max == 0 ) { diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 778cd1e..135c67c 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp @@ -111,2 +111,3 @@ char MediaPlayerState::view() { void MediaPlayerState::setIsStreaming( bool b ) { + if ( isStreaming == b ) { diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 79ba579..887c527 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h @@ -50,2 +50,5 @@ public: + bool isPaused; + bool isPlaying; + bool isStoped; bool streaming(); @@ -116,5 +119,2 @@ private: bool usePlaylist; - bool isPaused; - bool isPlaying; - bool isStoped; long curPosition; diff --git a/noncore/multimedia/opieplayer2/opieplayer2.pro b/noncore/multimedia/opieplayer2/opieplayer2.pro index 448dd34..d8cacd0 100644 --- a/noncore/multimedia/opieplayer2/opieplayer2.pro +++ b/noncore/multimedia/opieplayer2/opieplayer2.pro @@ -5,9 +5,9 @@ DESTDIR = $(OPIEDIR)/bin HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h mediadetect.h\ - videowidget.h audiowidget.h playlistwidget.h mediaplayer.h inputDialog.h \ - frame.h lib.h xinevideowidget.h \ + videowidget.h audiowidget.h playlistwidget.h mediaplayer.h inputDialog.h \ + frame.h lib.h xinevideowidget.h \ alphablend.h yuv2rgb.h SOURCES = main.cpp \ - playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp mediadetect.cpp\ - videowidget.cpp audiowidget.cpp playlistwidget.cpp mediaplayer.cpp inputDialog.cpp \ - frame.cpp lib.cpp nullvideo.c xinevideowidget.cpp \ + playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp mediadetect.cpp\ + videowidget.cpp audiowidget.cpp playlistwidget.cpp mediaplayer.cpp inputDialog.cpp \ + frame.cpp lib.cpp nullvideo.c xinevideowidget.cpp \ alphablend.c yuv2rgb.c yuv2rgb_mlib.c yuv2rgb_mmx.c @@ -17,2 +17,4 @@ DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lpthread -lopie -lxine -lxineutils +MOC_DIR=qpeobj +OBJECTS_DIR=qpeobj diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index cce445b..1dee422 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -174,3 +174,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) tabWidget = new QTabWidget( hbox6, "tabWidget" ); - tabWidget->setTabShape(QTabWidget::Triangular); +// tabWidget->setTabShape(QTabWidget::Triangular); @@ -428,2 +428,3 @@ void PlayListWidget::setDocument(const QString& fileref) { void PlayListWidget::setActiveWindow() { + qDebug("SETTING active window"); // When we get raised we need to ensure that it switches views diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 878cd4a..19a9172 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -82,3 +82,2 @@ void XineControl::play( const QString& fileName ) { position(); - } @@ -99,3 +98,3 @@ void XineControl::pause( bool isSet) { -int XineControl::currentTime() { +long XineControl::currentTime() { // todo: jede sekunde überprüfen @@ -112,4 +111,3 @@ void XineControl::length() { long XineControl::position() { - qDebug("<<<<<<<<<<<< xinecontrol setPostion>>>>>>>>>"); - m_position = (m_currentTime/m_length*100); + m_position = ( currentTime() ); mediaPlayerState->setPosition( m_position ); @@ -117,5 +115,6 @@ long XineControl::position() { emit positionChanged( emitPos ); + if(mediaPlayerState->isPlaying) // needs to be stopped the media is stopped QTimer::singleShot( 1000, this, SLOT( position() ) ); - qDebug("POSITION : " + m_position); +// qDebug("POSITION : %d", m_position); return m_position; diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h index 07ad309..295d2b4 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.h +++ b/noncore/multimedia/opieplayer2/xinecontrol.h @@ -52,3 +52,3 @@ public slots: void setFullscreen( bool ); - int currentTime(); + long currentTime(); void seekTo( long ); @@ -56,3 +56,2 @@ public slots: void length(); - long position(); @@ -62,3 +61,3 @@ private: MediaDetect mdetect; - int m_currentTime; + long m_currentTime; long m_position; |