summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp20
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp14
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.h2
3 files changed, 24 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index be59d8d..0ab0124 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -83,31 +83,35 @@ void MediaPlayer::setPlaying( bool play ) {
// abspielen starten.
}
void MediaPlayer::prev() {
- if ( playList->prev() )
+ if ( playList->prev() ) {
play();
- else if ( mediaPlayerState->looping() ) {
- if ( playList->last() )
+ } else if ( mediaPlayerState->looping() ) {
+ if ( playList->last() ) {
play();
- } else
+ }
+ } else {
mediaPlayerState->setList();
}
+}
void MediaPlayer::next() {
- if ( playList->next() )
+ if ( playList->next() ) {
play();
- else if ( mediaPlayerState->looping() ) {
- if ( playList->first() )
+ } else if ( mediaPlayerState->looping() ) {
+ if ( playList->first() ) {
play();
- } else
+ }
+ } else {
mediaPlayerState->setList();
}
+}
void MediaPlayer::startDecreasingVolume() {
volumeDirection = -1;
startTimer( 100 );
// da kommt demnächst osound denk ich mal
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index aaa1a24..cda9be2 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -7,31 +7,39 @@ extern MediaPlayerState *mediaPlayerState;
XineControl::XineControl( QObject *parent, const char *name )
: QObject( parent, name ) {
libXine = new XINE::Lib();
connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) );
connect( this, SIGNAL( positionChanged( int position ) ), mediaPlayerState, SLOT( updatePosition( long p ) ) );
+ connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) );
}
XineControl::~XineControl() {
delete libXine;
}
void XineControl::play( const QString& fileName ) {
libXine->play( fileName );
mediaPlayerState->setPlaying( true );
+ // default to audio view until we know how to handle video
+ mediaPlayerState->setView('a');
+ // determines of slider is shown
+ mediaPlayerState->isStreaming = false;
// hier dann schaun welcher view
}
-void XineControl::stop() {
+void XineControl::stop( bool isSet ) {
+ if ( isSet) {
libXine->stop();
- mediaPlayerState->setPlaying( false );
}
+ // mediaPlayerState->setPlaying( false );
+}
+
+void XineControl::pause( bool isSet) {
-void XineControl::pause( bool ) {
libXine->pause();
}
int XineControl::currentTime() {
// todo: jede sekunde überprüfen
m_currentTime = libXine->currentTime();
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h
index 58ad8ec..e45f1df 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.h
+++ b/noncore/multimedia/opieplayer2/xinecontrol.h
@@ -10,13 +10,13 @@ class XineControl : public QObject {
public:
XineControl( QObject *parent = 0, const char *name =0 );
~XineControl();
public slots:
void play( const QString& fileName );
- void stop();
+ void stop( bool );
void pause( bool );
int currentTime();
// get length of media file and set it
void length();