This allows to use a fake clock and an action schedule with timed delays
together.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167582860
The default implementation is just calling through to handler.postDelayed,
while the fake clock uses its internal time value to trigger the handler
calls at the correct time.
This is useful to apply a fake clock in situations where a handler is used to
post delayed messages.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167567914
In order to retrieve the data set, the track selection index was used, but
the data set is actually indexed by track group indices.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167566049
Currently FlacDecoder/FlacExtractor always perform resampling to 16bit. In some
case (with 24bit audio), this might lower the audio quality if the system
supports 24bit audio.
Since AudioTrack implementation supports resampling, we will remove the
resampling step, and return an output with the same bits-per-sample as the original stream.
User can choose to re-sample to 16bit in AudioTrack if necessary.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167494350
Using the same sampler introduced some minor horizontal scratches.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167347995
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
The bytesRemaining didn't always take into account any skipped bytes, which
meant that reaching the end of the file was not correctly detected in read().
Issue: #3216
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167016672
UTF-8 is the default charset on Android so this should be a no-op change, but
makes the code portable (in case it runs on another platform).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167011583
*** Reason for rollback ***
Doesn't work because trackOutputProvider can be null when extracting init data.
*** Original change description ***
Don't copy primary-track format to non-primary tracks
Copying non-primary-track formats to non-primary tracks
looks non-trivial (I tried; went down a dead-end), so
leaving that for now.
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166883654
1. Make LeanbackPlayerAdapter use a ControlDispatcher. This
allows apps to suppress control events in some circumstances,
and is in-line with our mobile controls.
2. Misc simplifications and cleanup to LeanbackPlayerAdapter.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166852816
Also workaround the non-repeatable queue and fix other minor issues.
Issue:#2283
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166848894
This mapping when we call into platform components also needs
to be applied when creating the MediaCrypto instance. The fix
is to stop propagating the UUID through all the createMediaCrypto
methods. This is unnecessary, since the eventual target already
knows its own UUID!
Issue: #3138
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166843372
Copying non-primary-track formats to non-primary tracks
looks non-trivial (I tried; went down a dead-end), so
leaving that for now.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166843123
Both cases were not supported so far. Added tests which all failed in the
previous code version and adapted the concatenated media sources to cope with
empty timelines and empty concatenations.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166480344
This includes an option to show and hide the shuffle mode button. When
pressing the button, the shuffle mode of the player is toggled.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166455759
findViewById is now defined using generics, which allows
the types to be inferred.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166355555
When hosted tests run into a timeout, the outer test method stops.
However, the hosted test itself may continue running and needs to be
forced-stopped to ensure it does not block any resources needed by
subsequent test methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166208204
This is mostly connecting the already stored shuffleMode with the timeline queries
for the playback order.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166199330
The media source is initialized with a DefaultShuffleOrder which can be changed at
any time. Whenever the list of media source is changed, the shuffle order is adapted
accordingly (either on the app thread if the player is not prepared yet, or on the
player thread). The shuffle order is then used to construct the timeline.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166198488