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
- HlsDownloader.loadManifest (previously called getHlsPlaylist)
suppressed errors for the offline case, where-as the DashUtil
equivalent method did not. This change makes them consistent
and moves both other to use ParsingLoadable.
- Enable GZIP for manifest loads in both cases.
- Use Uri rather than String to represent Uris. Previously the
strings were parsed into Uris quite deep in the code, which
isn't ideal if the parsing fails; you'd probably prefer the
error to occur early at the top level.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165181398
With this change, it becomes possible to depend on ExoPlayer
locally in settings.gradle by doing:
gradle.ext.exoplayerRoot = 'path/to/exoplayer/root'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')
You can optionally add a prefix onto ExoPlayer's module names
by adding:
gradle.ext.exoplayerModulePrefix = 'prefix'
Issue: #2851
Issue: #2974
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160277967
It's currently difficult to use ExoPlayer modules in other gradle
projects because they rely on constants and dependencies defined
in our own top level gradle file. This change moves the constants
into a separate file referenced directly from each module. It also
removes the need for the top level gradle file to declare a
dependency on com.novoda:bintray-release. This is now only needed
if "exoplayerPublishEnabled = true" is specified.
Issue: #2851
Issue: #2974
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160272072
This allows other tests to reuse the util classes without having to link to playbacktests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158214560
1. Remove tools:replace in manifest files. This attribute is only needed to establish priority when two manifests are merged and have the same attribute with different values.
As this is not happening here, the attributes can be removed.
2. Some BUILD files also define a deprecated manifest merge strategy different from the android default merge strategy. For consistency these are set to "android'.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158075128
This will cause the test to exercise the code path of
instantiating a DummySurface, rendering to it for 10
seconds, then re-targeting the real surface again. For
secure content tests the code path is only exercised if
DummySurface.SECURE_SUPPORTED is true. The logic for
checking this is within MediaCodecVideoRenderer itself,
rather than being part of the test.
Issue: #677
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157833026
(Relating to GitHub Issue #2577)
All getter, setter and callbacks have been added and value of repeatMode is
passed to getNextXXXIndex methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155071985
To inject custom renderers into SimpleExoPlayer, developers
currently need to extend SimpleExoPlayer and override the
renderer building methods. This is in contrast to the rest
of the library, where we use proper injection. This change
restores consistency. I think it's fine to make
SimpleExoPlayer final again, but if we find people extending
it for non-renderer purposes, we can revert that part of the
change.
ExoPlayerFactory now has analogous methods for the simple
and non-simple cases, which is a nice outcome.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154295726
Add methods to ExoPlayer for setting/getting the playback speed, using
SonicAudioProcessor.
Remove PlaybackParams support, as the AudioTrack timestamp does not work
reliably on Marshmallow. The platform also uses Sonic and performance
should be comparable between the Java and native versions on recent Android
runtimes.
In a later change, SonicAudioProcessor will be made public so it can
be used in conjunction with other processors.
Issue: #26
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151027121
Also renamed releaseResources->release to be consistent with the
rest of the library, and added some synchronization to ensure
correct usage.
Issue: #2139
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150753414
Builder class was renamed to DashTestRunner and DashHostedTest moved
into it as an inner class.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150307988
This will allow us to use the same class for Audio adaptation.
Issue:#1975
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150302561