Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8985420 authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am b1e7bee2: am 040301ca: Start sending out buffering updates earlier (after...

am b1e7bee2: am 040301ca: Start sending out buffering updates earlier (after preparation has completed) instead of only after playback has started.

Merge commit 'b1e7bee2' into kraken

* commit 'b1e7bee2':
  Start sending out buffering updates earlier (after preparation has completed) instead of only after playback has started.
parents fac110dc b1e7bee2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -444,6 +444,8 @@ void AwesomePlayer::onBufferingUpdate() {
        notifyListener_l(MEDIA_BUFFERING_UPDATE, percentage * 100.0);

        postBufferingEvent_l();
    } else {
        LOGE("Not sending buffering status because duration is unknown.");
    }
}

@@ -552,8 +554,6 @@ status_t AwesomePlayer::play_l() {
        seekAudioIfNecessary_l();
    }

    postBufferingEvent_l();

    if (mFlags & AT_EOS) {
        // Legacy behaviour, if a stream finishes playing and then
        // is started again, we play from the start...
@@ -1225,6 +1225,8 @@ void AwesomePlayer::onPrepareAsyncEvent() {
    mFlags |= PREPARED;
    mAsyncPrepareEvent = NULL;
    mPreparedCondition.broadcast();

    postBufferingEvent_l();
}

status_t AwesomePlayer::suspend() {