- Listener based reporting of progress allows the content length
to be persisted into the download index (and notified via a
download state change) as soon as it's available.
- Moved contentLength back into Download proper. It should only
ever change once, so I'm not sure it belongs in the mutable part
of Download.
- Made a DownloadProgress class, for naming sanity.
PiperOrigin-RevId: 244242487
This replaces the deprecated usages of RobolectricTestRunner and
RuntimeEnvironent and fully migrates the tests to androidx.
PiperOrigin-RevId: 238011667
The combination of pre-16 API levels accounting for ~0.5% of the device
population, and that the most important components in ExoPlayer (e.g.
the MediaCodec renderers) have always required API level 16, mean it's
very unlikely this will negatively impact on anyone.
PiperOrigin-RevId: 230701808
createTrackSelections decides whether to create an adaptive or a fixed track seletion to create.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222231011
Some test specific things, like adding an extra listener or adding decoder
counters are currently handled by ExoHostedTest. They can be moved to the
classes actually using them to clean up ExoHostedTest.
This also adds more flexibility to further generic clean-up in onTestFinished.
Also, reorder player setup to what ExoPlayerTestRunner is doing.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219446276
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 is needed for implementing (optional) support for audio focus handling in a
later change.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206899837
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
- Made parts of DownloadActions public that were previously hidden.
This is necessary so that when an app is listening to the
DownloadManager, it can tell something about the tasks.
- Simplified DownloadActivity some more. The helpers may migrate
into their corresponding modules at some point, and also be
converted to return structured TrackGroupArrays rather than a
flat list of Formats.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195269824
This was adding a lot of code, and the multiple use cases
for Downloader was pretty confusing (in particular the
ordering of method calls was unclear). It's also not
performant (e.g. it requires loading/parsing manifest(s)
and initialization segments from disk).
In practice I think apps will need to keep a record of
what's offlined in their app's database (or equivalent),
which they can update by registering as a listener on
DownloadManager. This will be done for the demo app in
a subsequent change.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194932876
ProgressiveDownloader never implemented this properly, and we
don't use it in DownloadManager/DownloadService, both of which
use a polling model. A polling model is also what's used elsewhere,
for example to query the current playback position.
This is effectively doing the TODO in ProgressiveDownloader.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194214579
- This is needed to make DefaultTrackSelector properly thread
safe, and enable atomic changes to the selector that, for
example, disable a renderer and enable another one at the same
time.
- This change also saves/restores parameters and the start
position in PlayerActivity, resolving the ref'd issue.
Issue: #3915
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193913350
These don't seem to be needed anymore. All tests run without them in gradle
and Blaze.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191867518
This will allow SimpleExoPlayer to auto-register its own listener before the
drm session manager is used to set-up the renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190478174
- Change 'compile' configuration (deprecared) to using 'implementation'
and 'api' configurations instead.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187311778
In startReadWrite*() methods a new CachedContent is created if the there
isn't one already for the given key. If the span is release without
writing any content, this fix removes the added CachedContent.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183666821
This achieves two things:
1. All our tests use the same type of assertions.
2. The tests currently run as instrumentation test can be moved to
Robolectric without changing the assertions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182910542
This is in preparation for supporting non-extractor MediaSources for ads in
AdsMediaSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178377627
Start with DASH MediaSource. The number of injected arguments is getting
out-of-control.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175529031
MobileHarness allocates random devices for each test and repeats tests up to 5 times to
account for spurious test failures. Some of our tests automatically pass for SDK versions
below a certain threshold. Thus, even if such a version-guarded test would always fail,
the MobileHarness test is likely to succeed as it only needs one random allocation to a
device with a lower SDK version.
To prevent this behaviour and to make sure all tests are actually run, the mobile_test
target is split into multiple targets one for each minimum SDK version.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172447046
This change fixes various issues:
- MobileHarness sometimes allocated devices with SDK < 16. As we have no tests running
on these SDKs, a new dimension filter for the mobile_test target ensures that only
devices with SDK >= 16 are selected. A similar filter for SDK version is also added
to the ABR playback tests to ensure no old devices are selected.
- DRM specific tests are skipped for Api < 18, but were not able to run because the
DashTestRunner class tried to link to the MediaDrm constructor. Moved the
constructor to a seperate Builder class to allow execution on Api levels 16 and 17.
- DashWidevineOfflineTest also tried to access code for Api >= 18 without checking
the current level.
- Action implementations which are waiting for events did not ensure that they have a
nextAction to wait for. This caused NullPointerExceptions when this next action was
scheduled.
- DefaultDrmSession always restored the offline keys when a new license was requested,
even if the keys were already restored. These repeated slow calls to restoreKeys
resulted in high numbers of dropped buffers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171974859
Now this counter includes input buffers too, which are dropped as part of
skipping to keyframes for catch up.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171119930
Some action schedules (especially those for real media with potentially
long initial buffering times) don't wait until the playback started
before executing the rest of the schedule.
Added waitForPlaybackStateChanged(STATE_READY) to all applicable action schedules.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171009434
This allows more deterministic action schedules, especially for real media
which may take an arbitrary amount of time to rebuffer after seeking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171005231
This parameter is used by methods such as getNextWindowIndex
and getPreviousWindowIndex to determine the playback order.
Additionally, there are method to query the first and last
window index given the shuffle mode.
None of the timeline implementations nor the ExoPlayer
implementation supports shuffling so far.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166170229