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

Commit 3ba7ed56 authored by Wei Jia's avatar Wei Jia Committed by Android (Google) Code Review
Browse files

Merge "Revert "NuPlayer: use kWhatPauseOnBufferingStart instead of...

Merge "Revert "NuPlayer: use kWhatPauseOnBufferingStart instead of kWhatBufferingStart in RTSPSource.""
parents 36672af5 e67ba383
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2142,7 +2142,11 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) {
                mPausedForBuffering = true;
                onPause();
            }
            // fall-thru
        }

        case Source::kWhatBufferingStart:
        {
            notifyListener(MEDIA_INFO, MEDIA_INFO_BUFFERING_START, 0);
            break;
        }
@@ -2160,7 +2164,11 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) {
                    onResume();
                }
            }
            // fall-thru
        }

        case Source::kWhatBufferingEnd:
        {
            notifyListener(MEDIA_INFO, MEDIA_INFO_BUFFERING_END, 0);
            break;
        }
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@ struct NuPlayer::Source : public AHandler {
        kWhatFlagsChanged,
        kWhatVideoSizeChanged,
        kWhatBufferingUpdate,
        kWhatBufferingStart,
        kWhatBufferingEnd,
        kWhatPauseOnBufferingStart,
        kWhatResumeOnBufferingEnd,
        kWhatCacheStats,
+2 −2
Original line number Diff line number Diff line
@@ -725,7 +725,7 @@ void NuPlayer::RTSPSource::startBufferingIfNecessary() {
        mBuffering = true;

        sp<AMessage> notify = dupNotify();
        notify->setInt32("what", kWhatPauseOnBufferingStart);
        notify->setInt32("what", kWhatBufferingStart);
        notify->post();
    }
}
@@ -741,7 +741,7 @@ bool NuPlayer::RTSPSource::stopBufferingIfNecessary() {
        mBuffering = false;

        sp<AMessage> notify = dupNotify();
        notify->setInt32("what", kWhatResumeOnBufferingEnd);
        notify->setInt32("what", kWhatBufferingEnd);
        notify->post();
    }