6800 Commits

Author SHA1 Message Date
olly
3ce0d89c56 Allow empty values in ICY metadata
Issue: #5876
PiperOrigin-RevId: 248119726
2019-05-15 20:03:39 +01:00
bachinger
cea3071b33 Fix rendering DVB subtitle on API 28.
Issue: #5862
PiperOrigin-RevId: 248112524
2019-05-15 20:03:25 +01:00
tonihei
035686e58c Fix Javadoc generation.
Accessing task providers (like javaCompileProvider) at sync time is not
possible. That's why the source sets of all generateJavadoc tasks is empty.

The set of source directories can also be accessed directly through the static
sourceSets field. Combining these allows to statically provide the relevant
source files to the javadoc task without needing to access the run-time task
provider.

PiperOrigin-RevId: 247938176
2019-05-15 20:02:58 +01:00
olly
48de1010a8 Allow line terminators in ICY metadata
Issue: #5876
PiperOrigin-RevId: 247935822
2019-05-15 20:02:34 +01:00
tonihei
bef386bea8 Increase gradle heap size
The update to Gradle 5.1.1 decreased the default heap size to 512MB and our
build runs into Out-of-Memory errors.

Setting the gradle flags to higher values instead.

See https://developer.android.com/studio/releases/gradle-plugin#3-4-0

PiperOrigin-RevId: 247908526
2019-05-15 20:00:24 +01:00
tonihei
1b9d018296 Fix Javadoc links.
PiperOrigin-RevId: 247630389
2019-05-15 20:00:06 +01:00
tonihei
6ead14880b Add setCodecOperatingRate workaround for 48KHz audio on ZTE Axon7 mini.
Issue:#5821
PiperOrigin-RevId: 247621164
2019-05-15 19:59:40 +01:00
tonihei
ac07c56dab Fix NPE in HLS deriveAudioFormat.
Issue:#5868
PiperOrigin-RevId: 247613811
2019-05-15 19:58:44 +01:00
andrewlewis
29add854af Update player accessed on wrong thread URL
PiperOrigin-RevId: 247418601
2019-05-15 19:55:30 +01:00
tonihei
ee5981c02d Ensure messages get deleted if they throw an exception.
If a PlayerMessage throws an exception, it is currently not deleted from the
list of pending messages. This may be problematic as the list of pending
messages is kept when the player is retried without reset and the message is
sent again in such a case.

PiperOrigin-RevId: 247414494
2019-05-15 19:55:20 +01:00
andrewlewis
85a86e434a Increase gapless trim sample count
PiperOrigin-RevId: 247348352
2019-05-15 19:55:07 +01:00
tonihei
0698bd1dbb Add option to clear all downloads.
Adding an explicit option to clear all downloads prevents repeated database
access in a loop when trying to delete all downloads.

However, we still create an arbitrary number of parallel Task threads for this
and seperate callbacks for each download.

PiperOrigin-RevId: 247234181
2019-05-15 19:54:27 +01:00
Oliver Woodman
8325e40018 Merge commit '2a0ead1b295c3ac2ad5e4ddc42913331a0616aa5' into dev-v2-r2.10.1 2019-05-15 19:53:35 +01:00
Oliver Woodman
3609a7ebba Merge commit 'faecef0befc4bb97c4c4a9316a94732dfd6aaec1' into dev-v2-r2.10.1 2019-05-15 19:51:49 +01:00
eguven
b626dd70c3 Add DownloadHelper.createMediaSource utility method
PiperOrigin-RevId: 245243488
2019-05-15 19:47:43 +01:00
Oliver Woodman
44293e8f45
Merge pull request #5833 from google/dev-v2-r2.10.0
r2.10.0
2019-05-06 10:29:21 -07:00
Oliver Woodman
7d430423d7 Merge pull request #5760 from matamegger:feature/hex_format_tags_in_url_template
PiperOrigin-RevId: 246733842
2019-05-05 11:44:11 -07:00
Oliver Woodman
2a0ead1b29 Merge pull request #5760 from matamegger:feature/hex_format_tags_in_url_template
PiperOrigin-RevId: 246733842
2019-05-05 19:42:42 +01:00
Oliver Woodman
d31f23f30e Merge branch 'release-v2' into dev-v2-r2.10.0 2019-05-05 18:44:35 +01:00
Oliver Woodman
03f518265b Merge branch 'release-v2' into dev-v2 2019-05-05 18:42:57 +01:00
olly
90cb157985 Update translations
PiperOrigin-RevId: 246729123
2019-05-05 18:24:21 +01:00
olly
8b2d436d7c Prevent CachedContentIndex.idToKey from growing without bound
PiperOrigin-RevId: 246727723
2019-05-05 18:24:04 +01:00
olly
f4968e1a8e Update translations
PiperOrigin-RevId: 246729123
2019-05-05 18:18:53 +01:00
olly
1ef49ed205 Fix broken Javadoc
PiperOrigin-RevId: 246728418
2019-05-05 18:18:34 +01:00
olly
b53ac32b8c Prevent CachedContentIndex.idToKey from growing without bound
PiperOrigin-RevId: 246727723
2019-05-05 18:18:15 +01:00
Oliver Woodman
ce37c79968 Fix Javadoc 2019-05-03 21:12:02 +01:00
olly
71d7e0afe2 Add a couple of assertions to DownloadManager set methods
PiperOrigin-RevId: 246491511
2019-05-03 19:44:54 +01:00
olly
116602d8c0 Minor download documentation tweaks
PiperOrigin-RevId: 246333281
2019-05-03 19:44:49 +01:00
olly
1292a35ec6 Add a couple of assertions to DownloadManager set methods
PiperOrigin-RevId: 246491511
2019-05-03 19:35:13 +01:00
olly
76184deb21 Minor download documentation tweaks
PiperOrigin-RevId: 246333281
2019-05-03 19:34:53 +01:00
aquilescanta
c33835b478 Fix SmoothStreaming links
NOTE: Streams are working on ExoPlayer but querying them from
other platforms yields "bad request".

The new links:
+ Match Microsoft's test server.
+ Allow querying from clients other than ExoPlayer, like curl.

PiperOrigin-RevId: 246289755
2019-05-02 13:14:30 +01:00
tonihei
241ce2df49 Post-submit fixes for eed5d957d8.
One wrong return value, a useless assignment, unusual visibility of private
class fields and some nullability issues.

PiperOrigin-RevId: 246282995
2019-05-02 13:14:05 +01:00
olly
9f9cf316bd Remove unnecessary logging
As justification for why we should not have this type of logging,
it would scale up to about 13K LOC, 1800 Strings, and 36K (after
pro-guarding - in the case of the demo app) if we did it through
the whole code base*. It makes the code messier to read, and in
most cases doesn't add significant value.

Note: I left the Scheduler logging because it logs interactions
with some awkward library components outside of ExoPlayer, so is
perhaps a bit more justified.

* This is a bit unfair since realistically we wouldn't ever add
  lots of logging into trivial classes. But I think it is fair
  to say that the deltas would be non-negligible.

PiperOrigin-RevId: 246181421
2019-05-02 13:13:59 +01:00
olly
214a372e06 Periodically persist progress to index whilst downloading
PiperOrigin-RevId: 246173972
2019-05-02 13:13:53 +01:00
olly
d215b81167 Rework DownloadManager to fix remaining TODOs
- Removed DownloadInternal and its sometimes-out-of-sync
  duplicate state
- Fixed downloads being in STOPPED rather than QUEUED state
  when the manager is paused
- Fixed setMaxParallelDownloads to start/stop downloads if
  necessary when the value changes
- Fixed isWaitingForRequirements

PiperOrigin-RevId: 246164845
2019-05-02 13:13:38 +01:00
aquilescanta
ad5948f3ed Fix SmoothStreaming links
NOTE: Streams are working on ExoPlayer but querying them from
other platforms yields "bad request".

The new links:
+ Match Microsoft's test server.
+ Allow querying from clients other than ExoPlayer, like curl.

PiperOrigin-RevId: 246289755
2019-05-02 13:06:10 +01:00
tonihei
5992699d91 Post-submit fixes for eed5d957d8.
One wrong return value, a useless assignment, unusual visibility of private
class fields and some nullability issues.

PiperOrigin-RevId: 246282995
2019-05-02 13:05:52 +01:00
olly
de7c62a915 Remove unnecessary logging
As justification for why we should not have this type of logging,
it would scale up to about 13K LOC, 1800 Strings, and 36K (after
pro-guarding - in the case of the demo app) if we did it through
the whole code base*. It makes the code messier to read, and in
most cases doesn't add significant value.

Note: I left the Scheduler logging because it logs interactions
with some awkward library components outside of ExoPlayer, so is
perhaps a bit more justified.

* This is a bit unfair since realistically we wouldn't ever add
  lots of logging into trivial classes. But I think it is fair
  to say that the deltas would be non-negligible.

PiperOrigin-RevId: 246181421
2019-05-02 13:05:32 +01:00
olly
ea0efa7464 Periodically persist progress to index whilst downloading
PiperOrigin-RevId: 246173972
2019-05-02 13:05:13 +01:00
olly
eed5d957d8 Rework DownloadManager to fix remaining TODOs
- Removed DownloadInternal and its sometimes-out-of-sync
  duplicate state
- Fixed downloads being in STOPPED rather than QUEUED state
  when the manager is paused
- Fixed setMaxParallelDownloads to start/stop downloads if
  necessary when the value changes
- Fixed isWaitingForRequirements

PiperOrigin-RevId: 246164845
2019-05-02 13:04:54 +01:00
Oliver Woodman
faecef0bef Merge pull request #5807 from zsmatyas:dev-v2
PiperOrigin-RevId: 246132620
2019-05-02 13:04:34 +01:00
olly
f8cd770d84 Migrate from is(Not)SameAs to is(Not)SameInstanceAs.
They behave identically, and the old names are being removed.

Open-source note: The new methods are available in Truth as of version 0.44.

END_PUBLIC

More information:
  go/issameas-lsc

Tested:
    TAP --sample ran all affected tests and none failed
    http://test/OCL:246024032:BASE:246042619:1556672975894:513e7746
PiperOrigin-RevId: 246101315
2019-05-02 13:04:11 +01:00
aquilescanta
6c1065c6d2 Prevent index out of bounds exceptions in some live HLS scenarios
Can happen if the load position falls behind in every playlist and
when we try to load the next segment, the adaptive selection logic
decides to change variant.

Issue:#5816
PiperOrigin-RevId: 245923006
2019-04-30 22:13:47 +01:00
olly
4a5b8e17de DownloadManager improvements
- Do requirements TODO
- Add useful helper method to retrieve not met requirements
- Fix WritableDownloadIndex Javadoc

PiperOrigin-RevId: 245922903
2019-04-30 22:13:41 +01:00
olly
6b34ade908 Rename DownloadThread to Task
This resolves some naming confusion that previously existed
as a result of DownloadThread also being used for removals.
Some related variables (e.g. activeDownloadCount) would refer
to both download and removal tasks, whilst others
(e.g. maxParallelDownloads) would refer only to downloads.
This change renames those that refer to both to use "task"
terminology.

This change also includes minor test edits.

PiperOrigin-RevId: 245913671
2019-04-30 22:13:35 +01:00
bachinger
618d97db1c Never set null as a session meta data object.
Issue: #5810
PiperOrigin-RevId: 245745646
2019-04-30 22:13:27 +01:00
tonihei
c480818249 Fix some random AndroidStudio warnings.
PiperOrigin-RevId: 245956915
2019-04-30 22:08:07 +01:00
tonihei
0bb32a8f09 Add IntDef for Player states.
PiperOrigin-RevId: 245925254
2019-04-30 22:07:47 +01:00
aquilescanta
f64011ae04 Prevent index out of bounds exceptions in some live HLS scenarios
Can happen if the load position falls behind in every playlist and
when we try to load the next segment, the adaptive selection logic
decides to change variant.

Issue:#5816
PiperOrigin-RevId: 245923006
2019-04-30 22:07:28 +01:00
olly
802ebc8db1 DownloadManager improvements
- Do requirements TODO
- Add useful helper method to retrieve not met requirements
- Fix WritableDownloadIndex Javadoc

PiperOrigin-RevId: 245922903
2019-04-30 22:07:09 +01:00