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
The media source is initialized with a DefaultShuffleOrder which can be changed at
any time. This shuffle order is then used within the corresponding timeline.
The isRepeatOneAtomic flag is extended to also suppress shuffling (now called
isAtomic only).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166197184
Make getMediaFormat protected so that subclasses can set additional MediaFormat
keys. For example, if the decoder output needs to be read back via an
ImageReader as YUV data it is necessary to set KEY_COLOR_FORMAT to
COLOR_FormatYUV420Flexible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166195211
This just implements a reverse order which is different from the original order but
still deterministic for simplified testing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166194311
The implementation in the abstract base class takes care to forward the queries
to the correct methods given the shuffle mode and a given shuffle order.
All concatenated timeline implementations use an unshuffled order so far. The
handling of the shuffle orders will follow in other changes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166191165
In addition, let unit test assert window indices for both shuffle modes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166191069
This functionality is most likely needed by UI modules which currently need
to obtain the timeline, the current repeat and shuffle modes and are only then
able to query the next/previous window index using this information.
Adding these methods simplifies these cumbersome requests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181202
This allows to test the expected behaviour of timeline with different shuffle modes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181091
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
The shuffle mode is saved using a message on the playback thread.
After setting the shuffle mode, the same media period holder verification
as for repeat mode changes gets executed.
Note: the shuffle mode is not used yet to change the playback order.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166060231
- This is soon becoming mandatory.
- It also looks like future versions of com.android.tools.build
are being distributed via Google's Maven repository.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166058299
Changes to the player's shuffle mode are forwarded to the media session.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166057425