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

Commit c9ff2009 authored by Wei Jia's avatar Wei Jia
Browse files

RTSPSource: pause internally when buffering starts.

Bug: 28915794
Change-Id: I1a04bdfe306fdf0f82fefbe9eb2855184991c1c8
parent 4ecb8af1
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -2194,11 +2194,6 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) {
                mPausedForBuffering = true;
                onPause();
            }
            // fall-thru
        }

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

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

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

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