author | harlekin <harlekin> | 2002-07-03 14:44:22 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-03 14:44:22 (UTC) |
commit | e1e4956ec7ffa9a07f98b03e831f0f9627556a6c (patch) (side-by-side diff) | |
tree | c0545c6a22732f05804bda7704227132f64b7239 /noncore/multimedia/opieplayer2/mediaplayer.cpp | |
parent | 61770de77f2abe8012d44cce49d04489e4187644 (diff) | |
download | opie-e1e4956ec7ffa9a07f98b03e831f0f9627556a6c.zip opie-e1e4956ec7ffa9a07f98b03e831f0f9627556a6c.tar.gz opie-e1e4956ec7ffa9a07f98b03e831f0f9627556a6c.tar.bz2 |
much more code cleanup, make if look more like c++ code
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 52 |
1 files changed, 6 insertions, 46 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index e6d0525..87184ba 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp @@ -57,3 +57,2 @@ void MediaPlayer::setPlaying( bool play ) { mediaPlayerState->setPaused( FALSE ); -// loopControl->stop( FALSE ); return; @@ -68,3 +67,2 @@ void MediaPlayer::setPlaying( bool play ) { if ( playListCurrent != NULL ) { -// loopControl->stop( TRUE ); currentFile = playListCurrent; @@ -72,49 +70,11 @@ void MediaPlayer::setPlaying( bool play ) { - /* + audioUI->setTickerText( currentFile->file() ); - if ( currentFile == NULL ) { - QMessageBox::critical( 0, tr( "No file"), tr( "Error: There is no file selected" ) ); - mediaPlayerState->setPlaying( FALSE ); - return; - } - - if ( ((currentFile->file()).left(4) != "http") && !QFile::exists( currentFile->file() ) ) { - QMessageBox::critical( 0, tr( "File not found"), tr( "The following file was not found: <i>" ) + currentFile->file() + "</i>" ); - mediaPlayerState->setPlaying( FALSE ); - return; - } - - if ( !mediaPlayerState->newDecoder( currentFile->file() ) ) { - QMessageBox::critical( 0, tr( "No decoder found"), tr( "Sorry, no appropriate decoders found for this file: <i>" ) + currentFile->file() + "</i>" ); - mediaPlayerState->setPlaying( FALSE ); - return; - } - -// if ( !loopControl->init( currentFile->file() ) ) { -// QMessageBox::critical( 0, tr( "Error opening file"), tr( "Sorry, an error occured trying to play the file: <i>" ) + currentFile->file() + "</i>" ); -// mediaPlayerState->setPlaying( FALSE ); -// return; -// } -// long seconds = loopControl->totalPlaytime(); - long seconds = 120; - QString time; - time.sprintf("%li:%02i", seconds/60, (int)seconds%60 ); - QString tickerText; - if( currentFile->file().left(4) == "http" ) - tickerText= tr( " File: " ) + currentFile->name(); - else - tickerText = tr( " File: " ) + currentFile->name() + tr(", Length: ") + time; - - QString fileInfo = mediaPlayerState->curDecoder()->fileInfo(); - if ( !fileInfo.isEmpty() ) - tickerText += ", " + fileInfo; - audioUI->setTickerText( tickerText + "." ); - - - */ // alles nicht nötig, xine kümmert sich drum, man muss nur den return andio oder video gui geben + // alles nicht nötig, xine kümmert sich drum, man muss nur den return andio oder video gui geben - // loopControl->play(); + // Ob auch video 'v' : 'a' + // mediaPlayerState->setView( 'v' ); - // mediaPlayerState->setView( loopControl->hasVideo() ? 'v' : 'a' ); + // abspielen starten. } @@ -147,3 +107,3 @@ void MediaPlayer::startDecreasingVolume() { startTimer( 100 ); - // sollte volumeapplet machen + // da kommt demnächst osound denk ich mal // AudioDevice::decreaseVolume(); |