6675 Commits

Author SHA1 Message Date
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
olly
51914f8f82 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:06:49 +01:00
bachinger
44ad47746a Never set null as a session meta data object.
Issue: #5810
PiperOrigin-RevId: 245745646
2019-04-30 22:06:30 +01:00
tonihei
1fb128df36 Move playback session manager to core library.
This allows to use the session management capabilities for other analytics
purposes.

PiperOrigin-RevId: 245710588
2019-04-30 22:06:11 +01:00
olly
880f403181 Fix line break
PiperOrigin-RevId: 245448908
2019-04-30 22:05:51 +01:00
Zsolt Matyas
3e14ce1094 Code changes suggested by tonihei 2019-04-29 12:56:25 -07:00
Zsolt Matyas
2f356badd2 Handling XDS and TEXT modes
[Problem]
There are 3 services / modes transported on line 21:
- Captioning
- TEXT (generally not program related)
- XDS (eXtended Data Services)

Bytes belonging to the unsupported modes are interleaved with the
bytes of the captioning mode.
See Chapter 7, Chapter 8.5 and Chapter 8.6 of the CEA608 Standard for
more details.

[Solution]
Drop all bytes belonging to unsupported modes.

[Test]
- All streams containing only captioning services should not be influenced
- Test all 4 CEA 608 channels with live over-the-air content and
using all available TEXT and XDS streams.
2019-04-26 14:56:34 -07:00
Oliver Woodman
590140c1a6 Fix bad merge 2019-04-26 20:41:29 +01:00
Oliver Woodman
5eb36f86a2 Fix line break 2019-04-26 18:49:45 +01:00
Oliver Woodman
cb13f2df0f Merge branch 'dev-v2-r2.10.0' of https://github.com/google/ExoPlayer into dev-v2-r2.10.0 2019-04-26 18:48:06 +01:00
eguven
0128cebce1 Add simpler DownloadManager constructor
PiperOrigin-RevId: 245397736
2019-04-26 18:45:52 +01:00
eguven
e4f1f89f5c Downloading documentation
PiperOrigin-RevId: 245443109
2019-04-26 18:45:29 +01:00
tonihei
9463c31cde Update default min duration for playbacks with video to match max duration.
Experiments show this is beneficial for rebuffers with only minor impact
on battery usage.

Configurations which explicitly set a minimum buffer duration are unaffected.

Issue:#2083
PiperOrigin-RevId: 244823642
2019-04-26 18:45:07 +01:00
andrewlewis
f62fa434dd Log warnings when extension libraries can't be used
Issue: #5788
PiperOrigin-RevId: 245440858
2019-04-26 18:43:58 +01:00
olly
b55e17588b Link blog post from release notes
PiperOrigin-RevId: 245411528
2019-04-26 18:41:55 +01:00
olly
56520b7c73 Move DownloadManager internal logic into isolated inner class
There are no logic changes here. It's just moving code around and removing
the "internal" part of names where no longer required.

PiperOrigin-RevId: 245407238
2019-04-26 18:41:46 +01:00
olly
d187d9ec8f Post maxParallelDownload and minRetryCount changes
PiperOrigin-RevId: 245405316
2019-04-26 18:41:40 +01:00
olly
9d03ae4109 Add missing getters and clarify STATE_QUEUED documentation
PiperOrigin-RevId: 245401274
2019-04-26 18:41:30 +01:00
eguven
fc35d5fca6 Add simpler DownloadManager constructor
PiperOrigin-RevId: 245397736
2019-04-26 18:41:17 +01:00
eguven
c97ee9429b Allow content id to be set in DownloadHelper.getDownloadRequest
PiperOrigin-RevId: 245388082
2019-04-26 18:41:03 +01:00
tonihei
249f6a77ee Update gradle plugin (part 2).
PiperOrigin-RevId: 245218900
2019-04-26 18:39:28 +01:00
tonihei
7626ff72de Update gradle plugin.
This also removes the build warning about the experimental flag.

PiperOrigin-RevId: 245218251
2019-04-26 18:39:21 +01:00
eguven
4da14e46fa Add DownloadService SET_REQUIREMENTS action
PiperOrigin-RevId: 245014381
2019-04-26 18:38:56 +01:00
eguven
f7f6489f57 Add option to add entries in an ActionFile to DownloadIndex as completed
PiperOrigin-RevId: 244864742
2019-04-26 18:38:24 +01:00
tonihei
6155139856 Fix bug which logs errors twice if stack traces are disabled.
Disabling stack trackes currently logs messages twice, once with and once
without stack trace.

PiperOrigin-RevId: 244853127
2019-04-26 18:38:16 +01:00
tonihei
3d6407a58e Always update loading period in handleSourceInfoRefreshed.
This ensures we keep the loading period in sync with the the playing period in
PlybackInfo, when the latter changes to something new.

PiperOrigin-RevId: 244838123
2019-04-26 18:37:43 +01:00