Necessary for implementing scheme-independant resource management.
Example: A media source needs to have ownership of a crypto resource
while samples are in buffer (but not yet in the renderer).
PiperOrigin-RevId: 241698575
Most of our components that have Handler instances for calling
back to application code instantiate the Handler using Util.getLooper
in the constructor. This makes the two components that do
something else consistent with that model.
PiperOrigin-RevId: 241545575
If no track matches the preferred language or no preferred language is provided,
use the system Locale language as the next decision criterion.
PiperOrigin-RevId: 241322703
- This removes the need for Variant and Rendition to have a common
base class, allowing the url field to be marked as @Nullable in
Rendition but not in Variant.
- The addition of mediaPlaylistUrls is needed for the new StreamKey
indexing for HLS. It's also convenient in a couple of places (e.g.
HlsDownloader), where a list of all media playlist URLs is needed.
- Lots of places where HlsUrl was passed only needed the actual
URL (not the Format, which is the other piece of HlsUrl). Passing
just the URL is a little simpler, and resolves some of the naming
confusion.
Issue: #5596
Issue: #2600
PiperOrigin-RevId: 240970466
This is to make it possible to use equality of HlsUrl.url fields
to determine whether two HlsUrls point at the same media playlist.
This doesn't work currently because it's possible to mix absolute
and relative urls, which will not be equal until after the relative
url is resolved against the playlist baseUrl.
Issue: #5596
Issue: #2600
PiperOrigin-RevId: 240966503
Also make combination of language and role flags the default over the label,
as it's more readable and auto-translated into other languages.
PiperOrigin-RevId: 240801070
Custom factories currently need to copy most of the code in the
AdaptiveTrackSelection.Factory to make use of the same functionality.
Simplify this by allowing to overwrite the factory.
PiperOrigin-RevId: 240773271
This is the first of a series of cls that will convert DownloadManager
threading model as public methods post actions on an internal thread
which then do the work.
PiperOrigin-RevId: 240743400
Still skipping any renditions that have a null URL, which means that
closedCaptions in particular is always empty. This restriction will
be removed in a subsequent change, which will also remove muxedAudioFormat
and muxedAudioCaptions from HlsMasterPlaylist and instead derive them
from the Variant and Rendition information in HlsMediaPeriod.
Issue: #5596
Issue: #2600
PiperOrigin-RevId: 240623500
The one functional change here is to require subclasses to implement getForegroundNotification. It seems easier and less error prone to
force developers to implement it than it does to document the cases
in which they need to override it (which is most cases).
PiperOrigin-RevId: 240566737
Issue: #5596
This arguably made a worse problem than it solved, and also I think subtly broken HLS
downloads by changing which renditions HlsMasterPlaylist.copy would retain in some
cases. Reverting as a mini step toward removing smart logic from the HLS playlist parser.
*** Original commit ***
Expand check for muxed audio media tags to include uris that match variants
Issue:#5313
***
PiperOrigin-RevId: 240348969
If enabled, DefaultTrackSelector returns multiple groups with more than one
track. AdaptiveTrackSelection then decides on the order in which the tracks
are changed such that the BandwidthProvider for each selection can figure out
the allocated bandwidth.
PiperOrigin-RevId: 240150206
It's currently very difficult to actually set a reason for track selection
triggered by a SelectionOverride. It would require creating a new custom
TrackSelection.Factory where the reason gets injected somehow before the
override is specified on the player.
Simplify this whole procedure by allowing to set the reason directly and
forward this reason to all fixed selections created based on this override.
PiperOrigin-RevId: 240114942
3 ("11") is the reserved code for fscod in AC3. The spec says that "If the
reserved code is indicated, the decoder should not attempt to decode audio and
should mute."
We currently throw an exception as we try to access an array with an invalid
index. Now ignoring the track instead by invalidating the format.
Issue:#5638
PiperOrigin-RevId: 240106255
This allows to distinguish between regional variants and scripts.
We still need to normalize the language code itself to make track selection
independent of the whether 2 or 3 letter codes are used.
PiperOrigin-RevId: 239783115
Any seek map with non-zero offsets breaks playback with ICY metadata as
the metadata is no longer read from the correct position.
Issue:#5658
PiperOrigin-RevId: 239605839