This allows to use this queue in the track selection in the future.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202954871
In the future, this allows to register the BandwidthMeter (managed by the player)
as a listener to all media transfers related to this media source.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202643946
From the spec:
If the EXT-X-INDEPENDENT-SEGMENTS tag appears in a Master
Playlist, it applies to every Media Segment in every Media
Playlist in the Master Playlist.
----
This requires propagation of attributes from the master
playlist to the media playlists. This CL only includes
independent segments, but other inheritable attributes
will be supported in following changes. Other inheritable
attributes include variable substitution definitions and
session keys.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202628422
This url is readily available when creating media source events (from the
data source) but so far not published to external listeners. This change
adds a new field to LoadEventInfo which corresponds to DataSource.getUri().
Issue:#2054
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202459049
Also moved shared code to SegmentDownloadAction between its subclasses.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202294880
Both values are helpful for event reporting, but are only available while
the data source is open. Similar to bytesLoaded, they need to be reported
through the Chunk.
Issue:#2054
Issue:#4361
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201664907
The helper method only reported DATA_TYPE_UNKNOWN even if the actual type
is known.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=200067296
If a MediaPeriod uses a Loadable, then there are typically
reference chains of the form:
LoadingThread[GCroot]->Loadable->MediaPeriod->Player
Where the player is the MediaPeriod callback. When the
player is released, this reference chain prevents the
player from being GC'd until Loadable cancellation
completes, which may not always be fast. This in turn
will typically prevent the application's activity from
being GC'd, since it'll normally be registered as a
listener on the player (directly or indirectly via
something like a view).
This change mitigates the issue by removing references
that the MediaPeriod holds back to the player. The
MediaPeriod will still not be eligible for GC, but the
player and application activity will be, which in most
cases will be most of the leak (in terms of size).
Issue: #4249
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199143646
This simplifies Loadable implementations, and also removes the
possibility of an incorrect Loadable implementation causing the
wrong Loader.Callback method being called (perviously, for the
correct method to be called, we relied on isLoadCanceled being
implemented correctly).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198871133
This allows injection of custom implementations and configuration of
DefaultHlsPlaylistTracker without modifying the HlsMediaSource interface.
Issue:#2844
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198846607
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
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
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 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
Also convert them to exposing periods and track groups, like
regular MediaSources do. This gets us much closer to being
able to use standard track selection components during offline
initialization. The helper is responsible for reverse mapping
selected tracks onto physical streams when generating the
download action. This is trivial except for the HLS case, which
is a TODO for now.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195500826
This may be preferable for using custom binary data,
and it's still easy to store Strings if needed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195486817
- Made parts of DownloadActions public that were previously hidden.
This is necessary so that when an app is listening to the
DownloadManager, it can tell something about the tasks.
- Simplified DownloadActivity some more. The helpers may migrate
into their corresponding modules at some point, and also be
converted to return structured TrackGroupArrays rather than a
flat list of Formats.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195269824
Currently it's possible to copy a master playlist with a URL
that was never present in the original. This change prevents
this, and also moves the key more in line with DASH/SS.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195065286
A single master version prevents app developers from providing
custom download functionality (because they can't increment the
version). It's also error prone to expect someone modifying the
DASH action to remember to update the ActionFile master version.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194981886
This was adding a lot of code, and the multiple use cases
for Downloader was pretty confusing (in particular the
ordering of method calls was unclear). It's also not
performant (e.g. it requires loading/parsing manifest(s)
and initialization segments from disk).
In practice I think apps will need to keep a record of
what's offlined in their app's database (or equivalent),
which they can update by registering as a listener on
DownloadManager. This will be done for the demo app in
a subsequent change.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194932876
- When calculating the downloaded percentage in DASH, there was no
way to disambiguate between 0 of 0 segments being downloaded because
there are no cached indexes (i.e. 0% downloaded) and 0 of 0 segments
being downloaded because the index defines 0 segments (i.e. 100%
downloaded).
- Also replace use of NaN with a named constant.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194453202
When we play downloaded content, we rely on the manifest filters
to produce a manifest that contains only the content that was
downloaded. It makes sense just to use the same filters during
download too, so we don't have to worry about any implementation
differences.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194380704
ProgressiveDownloader never implemented this properly, and we
don't use it in DownloadManager/DownloadService, both of which
use a polling model. A polling model is also what's used elsewhere,
for example to query the current playback position.
This is effectively doing the TODO in ProgressiveDownloader.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194214579
This removes a fair chunk of code. The line delta would
be more negative if it not for adding all the /* x= */
comments in DashDownloadActionTest!
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194136689