diff --git a/src/libtomahawk/audio/AudioEngine_p.h b/src/libtomahawk/audio/AudioEngine_p.h index 1bf5b9b1c..b7c736626 100644 --- a/src/libtomahawk/audio/AudioEngine_p.h +++ b/src/libtomahawk/audio/AudioEngine_p.h @@ -32,7 +32,6 @@ public: public slots: void onStateChanged( AudioOutput::AudioState newState, AudioOutput::AudioState oldState ); -// void onAudioDataArrived( QMap< Phonon::AudioDataOutput::Channel, QVector< qint16 > > data ); private: QSharedPointer input; diff --git a/src/libtomahawk/audio/AudioOutput.cpp b/src/libtomahawk/audio/AudioOutput.cpp index 35371029e..f41cd6ce4 100644 --- a/src/libtomahawk/audio/AudioOutput.cpp +++ b/src/libtomahawk/audio/AudioOutput.cpp @@ -263,7 +263,7 @@ AudioOutput::currentTime() void AudioOutput::setCurrentTime( qint64 time ) { - // TODO : This is a bit hacky, but m_totalTime is only used to determine + // FIXME : This is a bit hacky, but m_totalTime is only used to determine // if we are about to finish if ( m_totalTime == 0 ) { m_totalTime = AudioEngine::instance()->currentTrackTotalTime(); @@ -275,6 +275,8 @@ AudioOutput::setCurrentTime( qint64 time ) // tDebug() << "Current time : " << m_currentTime << " / " << m_totalTime; + // FIXME pt 2 : we use temporary variable to avoid overriding m_totalTime + // in the case it is < 0 (which means that the media is not seekable) qint64 total = m_totalTime; if ( total <= 0 ) { total = AudioEngine::instance()->currentTrackTotalTime(); @@ -332,7 +334,7 @@ void AudioOutput::pause() { tDebug() << Q_FUNC_INFO; -// libvlc_media_player_pause( vlcPlayer ); + libvlc_media_player_set_pause ( vlcPlayer, 1 ); setState( Paused ); @@ -442,14 +444,12 @@ AudioOutput::vlcEventCallback( const libvlc_event_t* event, void* opaque ) break; case libvlc_MediaPlayerSeekableChanged: // tDebug() << Q_FUNC_INFO << " : seekable changed : " << event->u.media_player_seekable_changed.new_seekable; - //TODO, bool event->u.media_player_seekable_changed.new_seekable break; case libvlc_MediaDurationChanged: that->setTotalTime( event->u.media_duration_changed.new_duration ); break; case libvlc_MediaPlayerLengthChanged: // tDebug() << Q_FUNC_INFO << " : length changed : " << event->u.media_player_length_changed.new_length; - // that->setTotalTime( event->u.media_player_length_changed.new_length ); break; case libvlc_MediaPlayerNothingSpecial: case libvlc_MediaPlayerOpening: diff --git a/src/libtomahawk/utils/MediaStream.cpp b/src/libtomahawk/utils/MediaStream.cpp index fc9315852..c5c1335b9 100644 --- a/src/libtomahawk/utils/MediaStream.cpp +++ b/src/libtomahawk/utils/MediaStream.cpp @@ -164,8 +164,6 @@ MediaStream::readCallback ( void* data, const char* cookie, int64_t* dts, int64_ qint64 bufsize = 0; *bufferSize = 0; -// tDebug() << Q_FUNC_INFO << " ---- type : " << that->m_type; - if ( that->m_eos == true ) { return -1; } @@ -176,7 +174,6 @@ MediaStream::readCallback ( void* data, const char* cookie, int64_t* dts, int64_ else if ( that->m_type == IODevice ) { bufsize = that->m_ioDevice->read( that->m_buffer, BLOCK_SIZE ); *buffer = that->m_buffer; -// tDebug() << "readCallback(QIODevice) returning bufsize : " << bufsize; } if ( bufsize > 0 ) { @@ -199,8 +196,6 @@ MediaStream::readCallback ( void* data, const char* cookie, int64_t* dts, int64_ int MediaStream::readDoneCallback ( void *data, const char *cookie, size_t bufferSize, void *buffer ) { -// tDebug() << Q_FUNC_INFO; - Q_UNUSED(cookie); Q_UNUSED(bufferSize); @@ -217,8 +212,6 @@ MediaStream::readDoneCallback ( void *data, const char *cookie, size_t bufferSiz int MediaStream::seekCallback ( void *data, const uint64_t pos ) { - tDebug() << Q_FUNC_INFO; - MediaStream* that = static_cast < MediaStream * > ( data ); if ( that->m_type == Stream && static_cast < int64_t > ( pos ) > that->streamSize() ) {