312 Commits

Author SHA1 Message Date
tonihei
cd4571161a Add builders for SimpleExoPlayer and ExoPlayer.
The current ExoPlayerFactory is growing too big and usage becomes increasingly
complicated because it's not possible to set individual components without
specifying many other defaults.

Adding new builder classes makes building easier and more future-proof.

PiperOrigin-RevId: 263339078
2019-08-15 14:41:51 +01:00
olly
fb0481c520 Bump annotations dependency + update release notes
PiperOrigin-RevId: 261353271
2019-08-02 19:04:56 +01:00
olly
90ab05c574 Add DRM samples to Cast demo app
PiperOrigin-RevId: 261312509
2019-08-02 17:15:08 +01:00
aquilescanta
79b86de619 Use per-media source DRM in the Cast demo app
PiperOrigin-RevId: 261125341
2019-08-01 20:39:14 +01:00
aquilescanta
46855884f5 Fix samples' text in Cast demo app
PiperOrigin-RevId: 260553467
2019-07-29 21:29:04 +01:00
olly
961adb7e36 Cast: Add MediaItemConverter
For now this just moves some code from the demo app to the extension.
Eventually the goal would be to have CastPlayer playlist methods take
MediaItem, have CastPlayer convert them internally to MediaQueueItem
for sending to the Cast SDK, and also allow reverse conversion so we
can reconstruct MediaItems from the Cast SDK's queue.

PiperOrigin-RevId: 260548020
2019-07-29 21:28:45 +01:00
aquilescanta
06f9481505 Support different drm schemes in playlists in the demo app
This CL changes PlayerActivity's VIEW_LIST action intent contract:
Each media item configuration is provided by indexing the entries.
For example, the URI of the first item is passed as "uri_0", the
second one is "uri_1", etc. Optionally, the extra parameters, like
the extensions, are passed as "extension_1", where the intent extras
with matching indices, refer to the same media sample.

The VIEW action's contract remains unchanged.

PiperOrigin-RevId: 260518118
2019-07-29 21:28:26 +01:00
olly
d77d661e52 Default viewport constraints to match primary display
PiperOrigin-RevId: 260479923
2019-07-29 21:27:46 +01:00
olly
596be3b71b Cast: Simplify MediaItem/Sample to a single MediaItem class
PiperOrigin-RevId: 260021990
2019-07-26 16:34:20 +01:00
olly
223cc5f179 Cast extension: Remove unused parts of MediaItem
PiperOrigin-RevId: 259586520
2019-07-23 23:18:08 +01:00
olly
2c318d7b84 Cast: Remove obsolete flavor dimension
PiperOrigin-RevId: 259582498
2019-07-23 23:17:50 +01:00
aquilescanta
e5b3c32c98 Remove DrmSessionManager from Renderer creation in the main demo app
PiperOrigin-RevId: 259529691
2019-07-23 23:17:11 +01:00
aquilescanta
2a8cf2f5ef Plumb DrmSessionManager into HlsMediaSource
PiperOrigin-RevId: 259520431
2019-07-23 23:16:33 +01:00
Oliver Woodman
0e7f015020 Merge pull request #6042 from Timbals:dev-v2
PiperOrigin-RevId: 258812820
2019-07-18 19:40:36 +01:00
aquilescanta
510f1883b0 Plumb DrmSessionManager into ProgressiveMediaSource
PiperOrigin-RevId: 257777513
2019-07-14 16:24:59 +01:00
aquilescanta
b9ab0cf137 Plumb DrmSessionManager into SsMediaSource
PiperOrigin-RevId: 257624043
2019-07-14 16:23:19 +01:00
aquilescanta
91750b8009 Plumb DrmSessionManager into DashMediaSource
PiperOrigin-RevId: 257576791
2019-07-14 16:22:22 +01:00
bachinger
49a2e5a5cb add manifest to Timeline.Window
- Remove manifest argument from callbacks of Player.EventListener and
  SourceInfoRefreshListener. Instead make it accessible through
  Player.getCurrentManifest() and Timeline.Window.manifest.
- Fix all MediaSource implementation to include the manifest in the
  Timeline instead of passing it to the SourceInfoRefreshListener.
- Refactor ExoPlayerTestRunner, FakeTimeline, FakeMediaSource to
  reflect these changes and make tests pass.

PiperOrigin-RevId: 257359662
2019-07-14 16:20:45 +01:00
Oliver Woodman
47bc70d480 Merge pull request #6119 from eneim:patch-1
PiperOrigin-RevId: 256147742
2019-07-02 17:49:05 +01:00
olly
7798c07f64 Remove ExoCast
PiperOrigin-RevId: 255964199
2019-07-02 17:48:22 +01:00
aquilescanta
0ddd3c2bd0 Implement DecryptableSampleQueueReader.isReady
PiperOrigin-RevId: 254746146
2019-07-02 17:43:00 +01:00
Nam Nguyen Hoai
a5fd774647
Update TrackSelectionDialog.java
Fix a super tiny typo.
2019-07-02 18:04:08 +09:00
tonihei
3bff79f56f Wrap MediaCodec exceptions in DecoderException and report as renderer error.
We currently report MediaCodec exceptions as unexpected exceptions instead of
as renderer error. All such exceptions are now wrapped in a new DecoderException
to allow adding more details to the exception.

PiperOrigin-RevId: 252054486
2019-06-14 16:33:47 +01:00
aquilescanta
3490bea339 Simplify re-creation of the CastPlayer queue in the Cast demo app
PiperOrigin-RevId: 251617354
2019-06-06 17:35:44 +01:00
eguven
e4feaa68f2 Add VR player demo
PiperOrigin-RevId: 251460113
2019-06-06 17:35:06 +01:00
eguven
2c4eb1cd9b Demo app change.
PiperOrigin-RevId: 250248268
2019-05-30 15:22:58 +01:00
olly
3afdd7ac5a Put @Nullable annotation in the right place
PiperOrigin-RevId: 249828748
2019-05-30 15:10:55 +01:00
aquilescanta
3314391932 Add basic DRM support to CastPlayer's demo app
PiperOrigin-RevId: 249624829
2019-05-30 15:09:52 +01:00
eguven
4ca670bed3 Use MediaSourceFactory interface to simplify DownloadHelper
PiperOrigin-RevId: 248367983
2019-05-15 20:13:59 +01:00
tonihei
7d1ce3b13e Change legacy support UI dependency to more specific ViewPager dependency.
PiperOrigin-RevId: 247902405
2019-05-15 18:11:21 +01:00
olly
95495328cf ...Androidx Migration...
PiperOrigin-RevId: 247499141
2019-05-15 18:09:49 +01:00
tonihei
7d5558881d Fix two ad insertion related bugs in DefaultPlaybackSessionManager.
1. A content session after an ad has been played was not re-marked as active,
   leading to new ad session being marked as active too early.
2. Switching from content to post-roll ended the content session because
   the return value of getAdGroupTimeUs of C.TIME_END_OF_SOURCE was not
   handled. Using the nextAdGroupIndex instead.

PiperOrigin-RevId: 246977327
2019-05-15 18:07:49 +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
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
eguven
708cad6b28 Add DownloadHelper.createMediaSource utility method
PiperOrigin-RevId: 245243488
2019-04-26 18:33:02 +01:00
eguven
03313fb5e2 Add option to add entries in an ActionFile to DownloadIndex as completed
PiperOrigin-RevId: 244864742
2019-04-26 18:30:27 +01:00
olly
748a29e8f5 Further improve DownloadService action names & methods
- We had buildAddRequest and sendNewDownload. Converged to
  buildAddDownload and sendAddDownload.
- Also fixed a few more inconsistencies, and brought the
  action constants into line as well.

PiperOrigin-RevId: 244274041
2019-04-18 23:45:49 +01:00
olly
e9413b0d41 Simplify DownloadManager constructors
PiperOrigin-RevId: 244223870
2019-04-18 23:23:33 +01:00
eguven
f9f009645d Add missing DownloadService build*Intent and startWith* methods
PiperOrigin-RevId: 244196081
2019-04-18 23:22:35 +01:00
olly
d656782bd4 Don't start download if user explicitly deselects all tracks
PiperOrigin-RevId: 244003817
2019-04-18 15:15:01 +01:00
tonihei
e62da368d2 Use player.retry in demo app instead of manual position tracking.
We currently do manual position tracking while the player is in error mode.
This is to allow an initial seek to the new position when trying to re-prepare.

Instead, we can just use our player.retry method and remove the tracking code.

PiperOrigin-RevId: 243819580
2019-04-18 15:12:26 +01:00
eguven
5856e75781 Rename DownloadAction to DownloadRequest
PiperOrigin-RevId: 243806888
2019-04-16 16:41:29 +01:00
olly
77b78b96df DownloadTracker shouldn't depend on DefaultDownloadIndex
- It can work with any DownloadIndex
- Also simplify things to not require that it's registered
  as a DownloadManager listener by someone else

PiperOrigin-RevId: 243697352
2019-04-16 15:28:20 +01:00
olly
9c759a867b Prepare SimpleCache for 2.10.0 release
- Expose constructors that take DatabaseProvider. Deprecate those
  that do not.
- Expose Cache.getUid. This will likely be used for naming of the
  tables accessed by DefaultDownloadIndex .

PiperOrigin-RevId: 243637786
2019-04-16 15:28:01 +01:00
olly
7b84a1ead7 DownloadManager.getCurrentDownloads: Return list instead of array
- Allows enforcing immutability, which in a future CL will allow
  avoiding allocating a new array/list on every call.
- Also some left over doc cleanup from the DownloadState rename.

PiperOrigin-RevId: 243627352
2019-04-16 15:27:03 +01:00
olly
b84c51434f Deprecate ActionFile and simplify upgrading
PiperOrigin-RevId: 243085292
2019-04-13 01:40:24 +01:00
eguven
8688bd2d88 Rename DownloadState to Download
PiperOrigin-RevId: 242839480
2019-04-13 01:38:25 +01:00
olly
d3b63a97ad Remove DownloadAction serialization
Implement Parcelable instead, which is a more intented way of
passing structured data via Intents.

PiperOrigin-RevId: 242646441
2019-04-13 01:36:46 +01:00
olly
18dcad9b8d Simplify DownloadState to contain its DownloadAction
This makes sense now that DownloadAction is only for downloading,
and not also for removal.

PiperOrigin-RevId: 242561575
2019-04-13 01:36:07 +01:00