We've found that in our production environment, the AAC stream's timestamp exceeds the 33bit limit from time to time, when it happens, `peekId3PrivTimestamp` returns a value that is greater than `TimestampAdjuster.MAX_PTS_PLUS_ONE`, which causes a overflow in `TimestampAdjuster.adjustTsTimestamp` (overflow inside `ptsToUs`) after playing for a while . When the overflow happens, the start time of the stream becomes negative and the playback simply stucks at buffering forever.
I fully understand that the 33bit is a spec requirement, thus I asked our stream provider to correct this mistake. But in the mean time, I'd also like ExoPlayer to handle this situation more error tolerance, as in other platforms (iOS, browsers) we see more tolerance behavior.
Also prevent skip when there's a pending reset, and add a
TODO to split/fix chunk discard and downstream format change
reporting.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176760955
Currently for a DASH ChunkSource that consists of multiple sub-streams, we
always use a CompositeSequenceableLoader, which only allows the furthest behind
loader or any loader that are behind current playback position to continue
loading.
This changes allow clients to have more flexibility when deciding the loading
strategy:
- They can construct a different kind of composite SequenceableLoader from
the sub-loaders, and use it by injecting a different CompositeSequeableLoaderFactory accordingly.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176363870
Add Builder pattern to HlsMediaSource and mark existing constructors as
deprecated.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175803853
This is a step toward retaining a back-buffer in a way that
works for all MediaSource implementations. It's not possible
to adjust the discardBuffer calls in ExoPlayerImplInternal
to discard up to (position - backBufferDurationUs). Next steps
are to:
1. Find an appropriate place to specify the back buffer value,
to be passed to the discardBuffer calls. I guess the
LoadControl is the appropriate place to define such values.
2. Enhance discardBuffer to support a toKeyframe argument to
pass through to discardTo.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175565363
This CL does not aim to introduce any functionality changes.
Issue:#3149
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174864875
This is the first CL in a series to add chunkless preparation support.
Also did a bit a tidying up in HlsSampleStreamWrappen and
HlsMasterPlaylistParserTest.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174461737
This also allows exposing multiple CC channels to any fMP4 extractor client.
Issue:#1661
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174458725
- When transitioning to a new period, the value of bufferedDurationUs
passed to TrackSelection.updateSelectedTrack was incorrectly set to
0. It should have been set to correctly reflect buffered media in
previous periods still being played out.
- This change fixes the issue described above, and also propagates the
playback position through to this method. The position of the next
load within the period can be calculated by adding the position and
bufferedDurationUs.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172736101
Also create helper method in HlsMasterPlaylist to allow the copying of
the playlist to another, but with the variants reordered based on a
passed comparator. Also added an implementation of HlsPlaylistParser
which will reorder the variants returned.
Follow-up on the update to ABR logic in AdaptiveTrackSelection for live
streaming case:
- Do not reset liveEdgeTimeUs when user seek to a different position.
- For HlsChunkSource, for non-independent segments, currently the
bufferedDuration calculate will subtract previousChunk's duration. So to make
it work with live-streaming ABR logic, we subtract timeToLiveEdgeUs a similar
amount to compensate for that operation.
- Minor update to DefaultSSChunkSource, only perform TrackSelection when needed
(after checking necessary conditions).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169531275
This includes both cbcs and cenc. Will only work for streams that require a single
pssh.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169382884
In live streaming, if the playback position is very close to live edge,
the buffered duration will never reach minDurationForQualityIncreaseMs,
which prevents switching from ever happening. So we will provide the
durationToLiveEdgeUs to AdaptiveTrackSelection in live streaming case,
so it can handle this edge case.
GitHub: #3017
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168535969
We currently switch without downloading overlapping segments, but
we do not actually switch more aggressively. This change fixes
this. Note there's an implicit assumption made that if one media
playlist declares independent segments, the others will too. This
is almost certainly true in practice, and if it's not the penalty
isn't too bad (the player may try and switch to a higher quality
variant one segment's worth of buffer too soon).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167120992
This parameter is used by methods such as getNextWindowIndex
and getPreviousWindowIndex to determine the playback order.
Additionally, there are method to query the first and last
window index given the shuffle mode.
None of the timeline implementations nor the ExoPlayer
implementation supports shuffling so far.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166170229
Also add sample streams that use METHOD=SAMPLE-AES. Note that some of
the streams provide alternative EXT-X-KEY's. Support for alternative
decryption methods will be added in a later CL.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166048858
Also instantiate the resulting list with a predicted size to minimize
list resizing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163332285
Creates a copy of this playlist which includes only the variants identified by the given variantUrls.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163212562