This is required for buffering to work properly across
playlist transitions. It's also much simpler, since
specifying the buffering policy becomes independent of
the type of media being played (i.e. the source).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126051755
- Always continue loading if we've got less than the minimum
amount of media in the buffer.
- Use LoadControl in ExtractorSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125679669
- The main goal of this change is to remove the need for
discardSamplesForDisabledTracks() in continueBuffering
in HlsTrackStreamWrapper and ExtractorSampleSource. As
a result we'll also save one Allocation per disabled
track.
- Another benefit of this change is that Allocator.trim
calls can no longer be dropped. This could previously
happen on player release if the playback thread's
Looper quit before delivery of onLoadCanceled which
performed the trim in the case that a load needed to be
canceled at the time of the release.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123957434
- Use same constant for unknown/unset microsecond times/durations.
- Change constant values to be nowhere near the "normal" range.
- Misc cleanup.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=119944019
Play movies has an Allocator that attempts to allocate a single
huge byte[] up front to minimize the risk of GC pauses. This abstraction
will be required to keep that when updating them to the new Exo.
The key change here is that nextLoadPositionUs is set to -1
if we're not loading but don't have a next chunk ready to
load. This ensures that "missing chunks" in one stream don't
prevent chunks in another stream from loading. This occurs
in SmoothStreaming with TTML subtitles, where the chunks are
sparse.