A remove action will eventually just be the unique ID of the download
that should be removed. This is a step toward that goal.
PiperOrigin-RevId: 222832456
The input.getLength() check is invalid because the length may be
unknown (i.e. if the server doesn't include a Content-Length
response header when serving chunks).
Issue: #5063 (tangentially related only)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222406347
1. Pull up all subclasses of DownloadAction into DownloadAction
2. Add DownloaderFactory for Downloader instantiation, and DefaultDownloaderFactory
to replace the instantiation logic being removed from the DownloadAction
subclasses.
This change will upgrade existing action files gracefully (i.e. it does not
lose compatibility with the existing offline implementation, other than some
minor breaking changes to the API).
TODOs:
1. Move test methods from the XDownloadActionTest classes into DownloadActionTest.
This will be done in a subsequent CL. There's a lot of consolidation that can
be done here, including de-duplicating some of the test code added in this CL.
2. Look at merging DownloaderConstructorHelper into DefaultDownloaderFactory.
3. Use customCacheKey in DASH/HLS/SS Downloaders, for completeness.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222258983
This makes extractor selection a bit more efficient for some CMAF files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219795105
Currently there is no way to disable (or reduce) the logcat output generated
by ExoPlayer.
Issue:#4665
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213421072
This allows creating multiple HLS media sources from a single Factory, as
required by the interface.
Issue:#4814
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213297850
When a reset is pending the sample queues normally contain pre-seek
samples (which will be emptied when a pending load is canceled). The
position passed to discard will be a post-seek position. I don't
think anything bad happened in any of the cases being changed, but
discarding is unnecessary in such cases, and reasoning about such
cases is difficult.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212435556
If there's already a pending reset, we need only update the pending
reset position. We can currently end up calling cancelLoading more
than once on the loader for the same task, which is hard to reason
about (although I don't think anything actually broke in practice).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212432266
This provides the list of currently buffered media chunks and iterators over
the potential next chunks to the track selection. Having these two parameters
enables more advanced decision logic based on this data.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210551812
- Add @Deprecated on overrides of deprecated method.
- Suppress deprecation warnings where appropriate.
- Use non-deprecated alternatives where appropriate.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210092434
The response headers of the last load are available from the loading source
when creating media source events and can be easily forwarded.
Issue:#4361
Issue:#4615
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209900693
The doc can be improved by enumerating and linking all possible values from
the interface doc.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209772309
Also remove NonNull, since we assume NonNull by default. Except
where explicitly overriding a method with NonNull annotated args,
in which case we're still expected to use it.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209758204
They don't need to be accessed publicly and are can be moved into the
respective chunk sources. This is the same structure used for Dash.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209507217
The MediaPeriodId with index is only properly defined together with a
timeline containing the index. Changing it to the period uid allows to use
the MediaPeriodId independent of the corresponding timeline.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209430257
The reason for the change is that variable substititution requires
master playlist variable definitions at the moment of parsing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208997963
Also add support for parsing PlayReady DRM information
Issue:#4180
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208094290
For background on why doing this works, see below. I don't want to change
how we get our Cipher instance in non-test code, since PKCS7 always works
on Android. It's only when the tests are running on a non-Android host
machine that they can fail. An alternative would be to make it an androidTest,
but androidTests are slow.
------
Background:
"While Java considers PKCS5 and PKCS7 padding to be the "same" (and
one should always use the string "AES/CBC/PKCS5Padding" because
"AES/CBC/PKCS7Padding" will cause NoSuchAlgorithmException to be thrown
when initializing an AES block cipher using the Java crypto API), I
consider this a gross misnaming in the Java platform because the pure
technical definitions of these paddings are not the same."
Ref: https://stackoverflow.com/questions/10193567/java-security-nosuchalgorithmexceptioncannot-find-any-provider-supporting-aes-e
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207234518
Remove minLoadableRetryCount from HLS components in favor of
LoadErrorHandlingPolicy#getMinimumLoadableRetryCount.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206298419
The new method allows to add TransferListeners after the DataSource
has been created. Most implementations just forward to their wrapped
upstream DataSource. Implementation which directly read data implement
BaseDataSource instead.
Also removes the temporary default no-op implementation in DataSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206289986
All known instances use DataSource as generic type and thus code can be simplified
by removing the generic type altogether.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205798542
This allows to automatically forward bandwidth estimate events to
AnalyticsListeners.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205642752