5060 Commits

Author SHA1 Message Date
hoangtc
d3d4b33cac Blacklist Moto E(4) from setOutputSurface.
GitHub: #4134.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196562078
2018-05-18 14:26:49 +01:00
eguven
eb151a79e6 Small DownloadManager fixes
Fix suppressing initial "state changed to paused" listener invocations
for new added tasks that are immediately started.

Notify listeners for loaded actions queued state if they are not started
immediately.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196542693
2018-05-18 14:25:21 +01:00
tonihei
b3c3717007 Prevent NPE in PlayerNotificationManager.
The app can set the player to null while messages from the player are still
in flight. This may cause NPEs.

Issue:#4238

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196504077
2018-05-18 14:23:55 +01:00
Pedro Machado
2c55f58938 Fixed nullability issues 2018-05-14 17:51:49 +01:00
Pedro Machado
edd237e196 Saving current subtitle cues on SimpleExoPlayer 2018-05-14 15:44:29 +01:00
olly
1af9334188 Add option to keep content visible in PlayerView when player is reset
Issue: #2843

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196349533
2018-05-12 18:58:21 +01:00
andrewlewis
f848d0e339 Remove stray space
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196323463
2018-05-12 18:57:20 +01:00
tonihei
74df3766f9 Include checkerframework annotatons with compileOnly and remove lint exclusion
The lint error suppression only works locally and not for external developers
who still see the lint error and need to suppress it themselves.

This changes 'implementation' to 'compileOnly' in gradle to prevent the
dependency from being exported. Also removes the local lint suppression.

Issue:#4234

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196251407
2018-05-12 18:56:12 +01:00
hoangtc
0fce0a0bcb Refactor DummySurfaceThread, move code to generate SurfaceTexture to new class
This makes way for reusing EGLSurfaceTexture in other places, such as metadata
and frame retriever.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196240576
2018-05-12 18:55:07 +01:00
andrewlewis
36d24c7aaa Catch all errors in loadAd
Issue: #4231

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196180271
2018-05-12 18:52:57 +01:00
olly
d6d7c41065 Expose manifests/playlists from download helpers
This is useful to get hold of the manifest to then obtain DRM init data in
the download flow for protected content (without having to download the
manifest again).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196168938
2018-05-12 18:51:47 +01:00
andrewlewis
b779b1599f Support setting some DefaultTimeBar attributes
Issue: #4207

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196059445
2018-05-12 18:50:39 +01:00
olly
f7d4fa8829 Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196024195
2018-05-12 18:49:30 +01:00
Sebastian Roth
8d5cab8acf
[extension-ffmpeg] repeatable build instructions
Ensure the build instructions are repeatable once the ffmpeg repository is checked out.
2018-05-11 16:53:41 +08:00
ojw28
9adf9542e1
Merge pull request #4175 from cdotchen/FixDefaultTimeBar
Fix timebar scrubber notify wrong start position
2018-05-09 13:52:32 -07:00
Oliver Woodman
18a679fe07 Update release notes 2018-05-09 13:27:37 -07:00
tonihei
81c3769880 Add missing @Nullable to equals implementations.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195947382
2018-05-09 21:23:45 +01:00
ojw28
a962f2d4d8
Merge pull request #4156 from ValveSoftware/dev-v2
OkHttp extension - response headers instead of request in InvalidResponseCodeException
2018-05-09 13:11:22 -07:00
Justin Yorke
d709df8e1a
Merge remote-tracking branch 'upstream/dev-v2' into dev-v2 2018-05-08 13:28:46 -07:00
Oliver Woodman
d9d13630a9 Merge branch 'release-v2' into dev-v2 2018-05-08 00:01:17 -07:00
olly
94ffbee7e5 Fix demo app playlist playbacks
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195752969
2018-05-08 02:06:39 +01:00
olly
483cf77120 Revert retention of audio decoders
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195752931
2018-05-08 02:05:40 +01:00
olly
b7399c7559 Fix bug in Aes128DataSource
Open was not calling through to upstream.open. This was not problematic for
reading, because DataSourceInputStream.read would open the upstream if it's
not open already. It was however a problem for calling getUri() between
calling open and the first call to read, which would end up calling
upstream.getUri() on the not-yet-opened upstream.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195689472
2018-05-07 19:18:05 +01:00
olly
590edf5288 Fix checker-framework build issues
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195689456
2018-05-07 19:17:07 +01:00
olly
4b22aa7519 Update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195689103
2018-05-07 19:15:57 +01:00
olly
6e8867c39e Fix broken notification (missing line in onStartCommand)
Also only listen to requirements when actually necessary, else we can
put the service into the foreground when it needn't be there.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195597750
2018-05-07 07:26:01 +01:00
olly
7afdf84a9d Fix DownloadService notification flicker
This type of flicker was visible (at least on my S8) whenever starting
the demo app process (from being properly killed) when other notifications
(e.g. completed download notification) was present.

This change passes whether the service was started as foreground through
the intent, and only applies the show-notification-on-stop hack if it
was. It's only necessary to start as foreground if your app is not already
in the foreground, so it's not necessary to do this from activity/ui
components.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195594930
2018-05-07 07:25:02 +01:00
olly
983fe9cc9f Add DownloadManager.Listener.onInitialized
If an app wants to reconcile its own state with that of a DownloadManager,
it's helpful to know when the DownloadManager has finished restoring any
previously persisted tasks.

Also suppress initial "state changed to paused" listener invocations for
tasks that are immediately started.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195594881
2018-05-07 07:23:58 +01:00
olly
b9aaf1ebab Improve offline support in the demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195593235
2018-05-07 07:22:53 +01:00
olly
f2cef12367 Reorder DownloadManager methods into a more natural order
- Start before stop
- Release near bottom
- Private after public

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195570480
2018-05-07 07:21:49 +01:00
olly
c5e8f6ff9e Fix probable race condition in DownloadManager
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195570401
2018-05-07 07:20:47 +01:00
olly
5adfd7e9d9 Simplify OkHttp extension build.gradle
The lint workaround and org.json exclusion aren't needed any more.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195557066
2018-05-07 07:19:42 +01:00
olly
9de27560ae Fix Javadoc errors
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195555915
2018-05-07 07:18:38 +01:00
olly
051da40dc3 Misc cleanup
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195552434
2018-05-07 07:17:33 +01:00
olly
dbd768fbd7 Fix selection item
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195544030
2018-05-07 07:16:27 +01:00
olly
17b4e020f4 Tweak sample chooser
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195511490
2018-05-07 07:15:21 +01:00
olly
4e42c547ac Small cleanup
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195504064
2018-05-07 07:13:50 +01:00
olly
416d6c9eeb Move download helpers into core library
Also convert them to exposing periods and track groups, like
regular MediaSources do. This gets us much closer to being
able to use standard track selection components during offline
initialization. The helper is responsible for reverse mapping
selected tracks onto physical streams when generating the
download action. This is trivial except for the HLS case, which
is a TODO for now.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195500826
2018-05-07 07:12:46 +01:00
andrewlewis
4ee1daef0e Make download action custom data a byte[]
This may be preferable for using custom binary data,
and it's still easy to store Strings if needed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195486817
2018-05-07 07:10:46 +01:00
andrewlewis
9e122cbaf9 Use non-deprecated AdsMediaSource constructor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195468987
2018-05-07 07:09:41 +01:00
andrewlewis
2a06e00201 Expose ad load errors via MediaSourceEventListener
The old event listener on AdsMediaSource is deprecated, in favor of
reporting in the normal way (via MediaSourceEventListener).

Add AdLoadException with information on what ad/ads failed to load.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195426144
2018-05-07 07:08:33 +01:00
olly
0edc832d67 Get all track key objects into a consistent state
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195421908
2018-05-07 07:07:27 +01:00
hoangtc
b8206a70e6 Support handling metadata queries for MetadataRetriever.
- Support handling metadata queries (a.k.a get TrackGroupArray, which contains
Format and associated Metadata) from MetadataRetriever.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195401204
2018-05-07 07:06:25 +01:00
andrewlewis
a0b15595f4 Cancel and interrupt downloads
Upstream components may incorrectly clear the interrupted flag and not
propagate an exception when the caching thread is interrupted due to
cancellation. Pass a settable flag down to CacheUtil.cache and check it
frequently so it's not necessary to rely on the interrupted flag.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195371244
2018-05-07 07:05:20 +01:00
andrewlewis
d5034ca889 Set interrupted flag when throwing InterruptedIOE
This avoids the interrupted flag being lost if the exception
is handled as an IOException.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195366244
2018-05-07 07:04:09 +01:00
olly
d4d1fd64b3 Clean up DownloadManagerTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195364299
2018-05-07 07:03:05 +01:00
olly
08e56394c5 Rename DownloadManager.DownloadListener -> DownloadManager.Listener
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195362765
2018-05-07 07:02:00 +01:00
andrewlewis
c13722992f Misc nit fixes for downloader
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195358542
2018-05-07 07:00:30 +01:00
olly
e697322620 Tidy up naming
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195351640
2018-05-07 06:59:27 +01:00
olly
fdbea33a14 Improve track naming when sampleMimeType unset
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195346555
2018-05-07 06:58:23 +01:00