The sample queues haven't been created when the first init call
occurs. In this case we need to set sourceId when we subsequently
create the queues.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204467538
1. Copy label into derived formats
2. If audio is the primary track type, copy additional fields from
the variant formats. This is probably a no-op in practice, since
I don't think variant formats have these fields set anyway, but
it seems like the right thing to do in case they ever are set in
the future.
Note: It's a bit strange to use createXContainerFormat rather than
createXSampleFormat, but in practice the methods used here are
better matched for what we're trying to do.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204467287
1. Prefer label and language values in the manifest to those in
the media. This is particularly helpful if the sample format
contains "und" as the language.
2. Copy label when deriving formats in HlsSampleStreamWrapper
3. When there's only one variant in HlsSampleStreamWrapper, use
the regular copyWithManifestFormatInfo. This allows more
information to be retained from the sample format.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204340008
This allows to iterate through the available segments of the playlist.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204100116
This allows to register a listener on an outer wrapping data source which
receives data transfer events from the wrapped source.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203358981
This wires up recent changes of passing a transfer listener to the MediaSource and
allowing DataSources to accept new listeners.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203280818
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