*** Reason for rollback ***
Added the missing initialization to Timeline.EMPTY.
*** Original change description ***
Automated g4 rollback of changelist 192742299.
*** Reason for rollback ***
Culprit for b/78018932.
*** Original change description ***
Auto-register analytics collector in SimpleExoPlayer.
This automatically registers and deregisters an analytics collector in
SimpleExoPlayer. Doing this also allows to write integration tests checking
whether the reported window indices and media period ids are correct.
***
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193006701
*** Reason for rollback ***
Culprit for b/78018932.
*** Original change description ***
Auto-register analytics collector in SimpleExoPlayer.
This automatically registers and deregisters an analytics collector in
SimpleExoPlayer. Doing this also allows to write integration tests checking
whether the reported window indices and media period ids are correct.
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192816182
Also add testing media to verify FLAC extension can play these sample rates.
Github: #3769.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192783193
I was considering putting this directly in DefaultHttpDataSource, however:
- We'd need to modify at least OkHttpDataSource as well. I'm not sure whether
Cronet follows this type of redirect automatically or not.
- HttpDataSource instances don't know how they're going to be used, so it's
probably correct that they behave like the underlying network stack.
Issue: #4108
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192745408
This automatically registers and deregisters an analytics collector in
SimpleExoPlayer. Doing this also allows to write integration tests checking
whether the reported window indices and media period ids are correct.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192742299
Allow trimming an arbitrary small number of samples (needing to trim up to two
samples actually seems to be common). For larger numbers of samples we do coarse
trimming by applying the edit list in the normal path, and don't use gapless
playback.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192736956
This fixes gapless playback of streams with encoder padding on devices where the
decoder could set the end of stream flag on a non-empty final buffer.
Issue: #3449
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192407924
Support parsing ID3 tags at the beginning of FLAC files, even though FLAC spec
does not require this.
GitHub: #4055.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192127929
In MatroskaExtractor TrueHD audio samples are joined into larger chunks. For
some streams the resulting chunked samples seem never to start with a syncframe.
This could result in playback of TrueHD streams getting stuck after seeking
because we could never read a syncframe at the start of a sample to determine
the sample size.
Instead of expecting to find a syncframe at the start of a sample, search for it
within the sample, to fix this issue.
Note: this means that we may search a few thousand bytes to find the sample
size, but the cost is only incurred for the first audio sample read.
Issue: #3845
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191775779
This field (formerly "id") is almost impossible to use so far. Having setters
in the factories allows to specify custom tags for all media sources.
Also added a ExoPlayer.getCurrentTag() method to retrieve the tag of the
currently playing media source in a convenient way.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191738754
This adds two options to the ClippingMediaSource which allow proper clipping
of live streams:
1. The clipping stays fixed relative to already created media periods. That
means that playback actually progresses through the clipped media and
eventually reaches the end of the clipping. The window is also marked
as non-dynamic to let playback end in this case.
2. Allow to specify a clipping duration relative to the default position to
be able to specify the duration of live stream which is to be played.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190911049
In Gradle 4.4, it is a bug to resolve a configuration before the lint task is
created ([see [] Therefore, to upgrade
gradle version, we need to change the "generateJavadoc" task to remove using
files() call during initialization phase, but change move this to doFirst()
instead.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190634090
Erroneous condition:
===================
If the track selection contains a subset of the available variants in the
master playlist, but only the selected variants return 404, the playlist
tracker will never propagate the error.
Fix:
====
The Chunk source will propagate the playlist load error if no more
alternative playlists are available (because all are already blacklisted).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190624484
This change enables feeding decoders from the closest sync frame
before a specified seek position, where-as previously we'd
always feed decoders from the start of the chunk. This avoids
decoding and discarding many audio samples during each seek. The
same benefit also applies to video chunks containing more than
one key-frame.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190539547
This will allow SimpleExoPlayer to auto-register its own listener before the
drm session manager is used to set-up the renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190478174
This adds callbacks for creating, releasing, and starting to read from media
periods.
Such events allow listeners to keep a list of active media periods. This is
useful to determine when no further events for a certain media period are
expected. It also allows listeners to associate renderer events unambigiously
with a reading media period.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190462717
This was only needed to ensure a ClippingMediaSource can provide samples from
a key frame before the clipping start time. Now the ClippingMediaSource will
not report negative timestamps, this workaround can be removed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190045302
Add logic to poll AudioTimestamp at different rates depending on when
playback starts and how the audio timestamp advances.
This fixes a pause about 500 ms after starting playback that occurs on some
devices and also makes our polling interval match the recommendations of the
AudioTrack documentation.
Issue: #3830
Issue: #3841
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189765200
This is achieved by automatically registering a listener for child sources in
compositions. The composite media source has the chance to correct the
reported window index and media period id in the MediaLoadData of the events.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189575414
DefaultAudioSink had a lot of code related to tracking the position of the
underlying AudioTrack, and working around issues with the position APIs.
Move this code to a separate class responsible for position tracking. This is in
preparation for improving the audio timestamp polling behavior.
This change is intended not to cause any behavior changes.
Issue: #3841
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189344743
Currently, we are treating all codecs starting with "mp4a" as AAC. However,
some codec strings starting with "mp4a" are not AAC format, as should be
treated differently.
GitHub: #3779
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189163517
This is achieved by moving the listener registration and the creation of the
event dispatcher into BaseMediaSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188461932
The value is increased to 50 seconds. With that the player can better handle
short network problems. This does NOT increase the maximum memory used as we
still apply the seperate DEFAULT_TARGET_BUFFER_BYTES.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188335603
Also remove logic for tracking the next output buffer in LibvpxVideoRenderer, as
this allowed many consecutive frames to be rendered that were actually late
after dropping to keyframe. It looks better to show frames at a consistent
100 ms rate.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188144739
This value can now be set in the DefaultBandwidthMeter instead. As a result
NO_VALUE can be removed from BandwidthMeter as we now always provide an
estimate.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187865341