- Fix ID being dropped when DownloadAction is serialized and
de-serialized as it's passed to DownloadService
- Properly set DownloadAction.id when building an action from
a DownloadState
- Make ID a required constructor argument. Else it's too easy
to not propagate it by accident.
PiperOrigin-RevId: 242457831
Remove MediaCodecSelector.DEFAULT_WITH_FALLBACK, as codec selectors
will need to be able to return a list of decoder infos even when not
using fallback in a later change. Instead signal that fallback should
be used via a renderer constructor.
Fallback is always disabled for audio.
PiperOrigin-RevId: 242454172
Adding a protected method for that allows to supply a customized
TrackOutputProvider to the ExtractorWrapper used by the ContainerMediaChunk
(e.g. for logging purposes).
The alternative would be to provide a TrackOutputProvider through the
ChunkSampleStream constructor, but the extra initialization taking place
in the ChunkSampleStream constructor would need to move somewhere else and
some methods of BaseMediaChunkOutput would need to move to the
TrackOutputProvider interface. This seems too much effort for niche
customization case.
PiperOrigin-RevId: 242448776
The position should be subtracted from the total content length
retrieved from the cache in this case, both for iteration and for
filling out counters.contentLength (for the latter, note not
doing it this way is inconsistent with what happens when dataSpec
length is set to a known value).
PiperOrigin-RevId: 242445034
It's a transient state whose only use is when passing a removed
download to onDownloadStateChanged. It's a bit strange to have it
as a proper state, since we end up asserting that it's an invalid
value in other places.
This change adds an explicit onDownloadRemoved, which allows
removal of the transient STATE_REMOVED, related assertions, and
uncertainty when dealing with an @State variable whether it's
necessary to handle it being STATE_REMOVED.
PiperOrigin-RevId: 242444128
This is the last cl 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: 242437229
The priority task manager only needs to listen to loading state changes and
is independent of the rest of DefaultLoadControl. This also fixes problems
where the player stops loading without consultin the LoadControl.
PiperOrigin-RevId: 242098374
This is the second cl 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: 241773765
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
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
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
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