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

Commit 9dee2e59 authored by Leena Winterrowd's avatar Leena Winterrowd Committed by Lajos Molnar
Browse files

stagefright: httplive: Propagate target duration to LiveSession

LiveSession's switch-down monitor requires the 'targetDuration'
key to evaluate the switching threshold. Ensure that this key is
set in the access unit metadata.

Bug: 18821145
Change-Id: Ib30f3b4bd8185a77a06abd755822f96644968a21
parent 2a66207f
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1164,6 +1164,11 @@ const sp<ABuffer> &PlaylistFetcher::setAccessUnitProperties(
        accessUnit->meta()->setInt32("discard", discard);
        accessUnit->meta()->setInt32("discard", discard);
    }
    }


    int32_t targetDurationSecs;
    if (mPlaylist->meta()->findInt32("target-duration", &targetDurationSecs)) {
        accessUnit->meta()->setInt32("targetDuration", targetDurationSecs);
    }

    accessUnit->meta()->setInt32("discontinuitySeq", mDiscontinuitySeq);
    accessUnit->meta()->setInt32("discontinuitySeq", mDiscontinuitySeq);
    accessUnit->meta()->setInt64("segmentStartTimeUs", getSegmentStartTimeUs(mSeqNumber));
    accessUnit->meta()->setInt64("segmentStartTimeUs", getSegmentStartTimeUs(mSeqNumber));
    return accessUnit;
    return accessUnit;