summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-08-03 14:19:05 (UTC)
committer llornkcor <llornkcor>2002-08-03 14:19:05 (UTC)
commitaa06a62511cabebeaad1d3dda34b30640f967dea (patch) (side-by-side diff)
treea6887240b094f46de46b743135a2e918ba3254ad
parentd3c13036415713932f1706e46fa7c99ef38188df (diff)
downloadopie-aa06a62511cabebeaad1d3dda34b30640f967dea.zip
opie-aa06a62511cabebeaad1d3dda34b30640f967dea.tar.gz
opie-aa06a62511cabebeaad1d3dda34b30640f967dea.tar.bz2
audiowidget now shows time and slider moves.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp1
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h6
-rw-r--r--noncore/multimedia/opieplayer2/opieplayer2.pro12
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp9
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.h5
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
@@ -252,5 +252,5 @@ void AudioWidget::sliderReleased() {
void AudioWidget::setPosition( long i ) {
- qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i);
+// qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i);
updateSlider( i, mediaPlayerState->length() );
}
@@ -291,5 +291,4 @@ void AudioWidget::setView( char view ) {
static QString timeAsString( long length ) {
- length /= 44100;
int minutes = length / 60;
int seconds = length % 60;
@@ -300,5 +299,6 @@ void AudioWidget::updateSlider( long i, long max ) {
time.setText( timeAsString( i ) + " / " + timeAsString( max ) );
-
+// qDebug( timeAsString( i ) + " / " + timeAsString( max ) ) ;
+
if ( max == 0 ) {
return;
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
@@ -110,4 +110,5 @@ char MediaPlayerState::view() {
// slots
void MediaPlayerState::setIsStreaming( bool b ) {
+
if ( isStreaming == b ) {
return;
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
@@ -49,4 +49,7 @@ public:
~MediaPlayerState();
+ bool isPaused;
+ bool isPlaying;
+ bool isStoped;
bool streaming();
bool fullscreen();
@@ -115,7 +118,4 @@ private:
bool isShuffled;
bool usePlaylist;
- bool isPaused;
- bool isPlaying;
- bool isStoped;
long curPosition;
long curLength;
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
@@ -4,11 +4,11 @@ CONFIG = qt warn_on release
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
TARGET = opieplayer2
@@ -16,4 +16,6 @@ INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lpthread -lopie -lxine -lxineutils
+MOC_DIR=qpeobj
+OBJECTS_DIR=qpeobj
INCLUDEPATH += $(OPIEDIR)/include
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
@@ -173,5 +173,5 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
tabWidget = new QTabWidget( hbox6, "tabWidget" );
- tabWidget->setTabShape(QTabWidget::Triangular);
+// tabWidget->setTabShape(QTabWidget::Triangular);
QWidget *pTab;
@@ -427,4 +427,5 @@ 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
char origView = mediaPlayerState->view();
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
@@ -81,5 +81,4 @@ void XineControl::play( const QString& fileName ) {
length();
position();
-
}
@@ -98,5 +97,5 @@ void XineControl::pause( bool isSet) {
}
-int XineControl::currentTime() {
+long XineControl::currentTime() {
// todo: jede sekunde überprüfen
m_currentTime = libXine->currentTime();
@@ -111,12 +110,12 @@ void XineControl::length() {
long XineControl::position() {
- qDebug("<<<<<<<<<<<< xinecontrol setPostion>>>>>>>>>");
- m_position = (m_currentTime/m_length*100);
+ m_position = ( currentTime() );
mediaPlayerState->setPosition( m_position );
long emitPos = (long)m_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
@@ -51,9 +51,8 @@ public slots:
void pause( bool );
void setFullscreen( bool );
- int currentTime();
+ long currentTime();
void seekTo( long );
// get length of media file and set it
void length();
-
long position();
@@ -61,5 +60,5 @@ private:
XINE::Lib *libXine;
MediaDetect mdetect;
- int m_currentTime;
+ long m_currentTime;
long m_position;