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

Commit e30d6f15 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Restart HLS streaming from the bottom of the playlist if we miss the boat on the"

parents 14434ed6 323e3175
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -183,19 +183,19 @@ void SfDelegate::setOwner(ChromiumHTTPDataSource *owner) {

void SfDelegate::OnReceivedRedirect(
            net::URLRequest *request, const GURL &new_url, bool *defer_redirect) {
    MY_LOGI("OnReceivedRedirect");
    MY_LOGV("OnReceivedRedirect");
}

void SfDelegate::OnAuthRequired(
            net::URLRequest *request, net::AuthChallengeInfo *auth_info) {
    MY_LOGI("OnAuthRequired");
    MY_LOGV("OnAuthRequired");

    inherited::OnAuthRequired(request, auth_info);
}

void SfDelegate::OnCertificateRequested(
            net::URLRequest *request, net::SSLCertRequestInfo *cert_request_info) {
    MY_LOGI("OnCertificateRequested");
    MY_LOGV("OnCertificateRequested");

    inherited::OnCertificateRequested(request, cert_request_info);
}
@@ -208,7 +208,7 @@ void SfDelegate::OnSSLCertificateError(
}

void SfDelegate::OnGetCookies(net::URLRequest *request, bool blocked_by_policy) {
    MY_LOGI("OnGetCookies");
    MY_LOGV("OnGetCookies");
}

void SfDelegate::OnSetCookie(
@@ -216,7 +216,7 @@ void SfDelegate::OnSetCookie(
        const std::string &cookie_line,
        const net::CookieOptions &options,
        bool blocked_by_policy) {
    MY_LOGI("OnSetCookie");
    MY_LOGV("OnSetCookie");
}

void SfDelegate::OnResponseStarted(net::URLRequest *request) {
+22 −13
Original line number Diff line number Diff line
@@ -617,16 +617,24 @@ rinse_repeat:
            goto rinse_repeat;
        }

        if (!mPlaylist->isComplete()
                && mSeqNumber > lastSeqNumberInPlaylist
                && mNumRetries < kMaxNumRetries) {
        if (!mPlaylist->isComplete() && mNumRetries < kMaxNumRetries) {
            ++mNumRetries;

            if (mSeqNumber > lastSeqNumberInPlaylist) {
                mLastPlaylistFetchTimeUs = -1;
                postMonitorQueue(3000000ll);
                return;
            }

            // we've missed the boat, let's start from the lowest sequence
            // number available and signal a discontinuity.

            LOGI("We've missed the boat, restarting playback.");
            mSeqNumber = lastSeqNumberInPlaylist;
            explicitDiscontinuity = true;

            // fall through
        } else {
            LOGE("Cannot find sequence number %d in playlist "
                 "(contains %d - %d)",
                 mSeqNumber, firstSeqNumberInPlaylist,
@@ -635,6 +643,7 @@ rinse_repeat:
            mDataSource->queueEOS(ERROR_END_OF_STREAM);
            return;
        }
    }

    mNumRetries = 0;