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
*** Reason for rollback ***
Trying to forward fix instead.
*** Original change description ***
Automated g4 rollback of changelist 237051112.
*** Original change description ***
Add SimpleCache deletion functionality
This is needed now that index data may be stored outside
of the cache directory.
***
***
PiperOrigin-RevId: 239429430
*** Original change description ***
Add SimpleCache deletion functionality
This is needed now that index data may be stored outside
of the cache directory.
***
PiperOrigin-RevId: 239294713
When an error occurs we call stopInternal, and this clears the MediaPeriodQueue,
which in turn releases media period holders and notifies that media periods have
been released. AnalyticsCollector updates its information about media periods
using the media period release events, which means that if we post the source
error after stopInternal posts its events we can't determine what media period
the source error corresponds to.
Move error notifications before calling stopInternal, so that
AnalyticsCollector's model of the media period queue contains the loading period
at the point when it handles the error.
For consistency also move the other (non-source) error notifications to match
the new ordering.
PiperOrigin-RevId: 238559324
This simplifies the DownloadHelper code in the demo app and is generally
useful for more specific updates with SelectionOverrides.
PiperOrigin-RevId: 238228276
This replaces the deprecated usages of RobolectricTestRunner and
RuntimeEnvironent and fully migrates the tests to androidx.
PiperOrigin-RevId: 238011667
We may currently throw if the load completes before we finished preparation.
Don't throw and instead check for this condition in maybeThrowPrepareError.
PiperOrigin-RevId: 237237000
These are thrown for non-IOException encountered during loading. Also, they
are thrown from an unexpected position and retrying is likely to fail anyway
because the Extractor is left in an unrecoverable state.
PiperOrigin-RevId: 237043948
SQLiteException is a runtime exception, which makes it easy to
forget to handle it. This change converts SQLiteExceptions into
a checked exception, which is then handled appropriately.
PiperOrigin-RevId: 237038793
Currently a flags-only DecoderInputBuffer may hold only the end-of-stream
flag. This change makes flags-only buffer read any kind of flag set in
the next sample. If no sample is available RESULT_NOTHING_READ is
returned.
PiperOrigin-RevId: 237027581
nalPrefix.readUnsignedIntToInt() will throw if the unsigned output doesn't fit
in an int. Before this change, in the error case we'd retry reading from after
the NAL prefix position. Throw a ParserException so that reading an obviously
invalid NAL prefix will be treated as a fatal exception by the default load
error handling policy.
PiperOrigin-RevId: 236839690
The release needs to post to the MediaSource thread and also needs to post
back to the DownloadHelper thread to prevent sending updates after release has
been called. The point where we release the downloadHelper also needs to
dismiss the dialog in case the creation has already been queued before the
release.
PiperOrigin-RevId: 236652309