When the player state is changed from an event listener callback, we may
get recursive listener notifications. These recursions can produce a wrong
order, skip or duplicate updates, and send different notifications to
different listeners.
This change serializes listener notifications by clustering all update data
in a helper data class and adding the updates to a queue which can be handled
in a loop on the outer layer of the recursion.
As playWhenReady updates also reference the current playbackInfo, we need to
redirect the listener notifcations for setPlayWhenReady to the same queue.
Issue:#4276
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198031431
Use PixelCopy API for the first SurfaceCapturer implementation. This supports
devices from API 24+.
Github: #3609.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197732711
Some module/extensions couldn't use the static test so far because all files
needed to be put on the blacklist. To ensure the test it set up for all
modules, this fixes at least one file for each of the modules.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197731449
Currently, the sample queues are lazily enabled when they are first read from.
This causes problems when the player tries to discard buffer and the
HlsSampleStreamWrapper assumes the sample queue is disabled even though it's
actually enabled but hasn't been read from.
This change moves setting the sample queue index of the sample stream back into
HlsSampleStreamWrapper. It enables the sample queues at track selection if the
queues are already built, or immediately after they have been built for
chunkless preparation.
Issue:#4241
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197415741
The ACCESS_NETWORK_STATE permission is only included indirectly which doesn't
work in all build systems.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197399274
InstrumentationTestCase has been deprecated, and it does not offer some useful
features, such as targeting SDK version level for tests, or skipping tests if
necessary.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197141082
A new playback nonce is created for each playback of the same item. Thus we
need to inject the nonce dynamically into the data source factory.
This CL adds the DataSource which does the actual insertion into the request
URLs and a MediaSource which listens to new media periods, to request the
nonce and to configure the data source factory for this media period to use
this nonce.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197134217
This CL allows failure if a playlist load fails with a non-blacklistable
error. For example, loss of internet connection.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197006579
For TTML, if the font size is expressed in %, the font size should be relative
to the cellResolution of the document which we did not support before. This CL
adds support for handling this correctly.
Note that this still does not support font size using c unit.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196985694
SparseIntArray.get(key) defaults to zero for missing keys (the null check was
left over from when a Map was used).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196957452
Also update TrackSelectionView with nullness annotations.
Issue: #4263
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196849706
If the caption line has no text (empty line or only line break), we should not
display its background.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196823319
Currently, ExoPlayer only supports seeking for FLAC files with a SEEKTABLE.
This CL adds support seeking for cases when the FLAC files do not have a
SEEKTABLE by searching for individual frames within the file using binary
search.
Github: #1088.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196816398
Due to a bug, for each TTML node, when applying its style to the encompassed
regions, it applies child nodes's styling several time for each region (the
number of time is equal to the number of region). This leads to a styling issue
if there are multiple regions in a node displayed at the same time in TTML file.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196810046
The sample size from the stsd box takes precedence over the sample size in the
stsz box.
Also remove assumption that C.INDEX_UNSET is -1 in ChunkIterator (which is a
no-op change).
Issue: #4228
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196661751
Added FlacBinarySearchSeeker, which supports seeking in a FLAC stream by searching for individual frames within the file using binary search.
Github: #1808.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196587198
Fix suppressing initial "state changed to paused" listener invocations
for new added tasks that are immediately started.
Notify listeners for loaded actions queued state if they are not started
immediately.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196542693
The app can set the player to null while messages from the player are still
in flight. This may cause NPEs.
Issue:#4238
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196504077
The lint error suppression only works locally and not for external developers
who still see the lint error and need to suppress it themselves.
This changes 'implementation' to 'compileOnly' in gradle to prevent the
dependency from being exported. Also removes the local lint suppression.
Issue:#4234
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196251407
This makes way for reusing EGLSurfaceTexture in other places, such as metadata
and frame retriever.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196240576
This is useful to get hold of the manifest to then obtain DRM init data in
the download flow for protected content (without having to download the
manifest again).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196168938
Open was not calling through to upstream.open. This was not problematic for
reading, because DataSourceInputStream.read would open the upstream if it's
not open already. It was however a problem for calling getUri() between
calling open and the first call to read, which would end up calling
upstream.getUri() on the not-yet-opened upstream.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195689472