580 Commits

Author SHA1 Message Date
aquilescanta
aa9eb5abc9 Remove generics from DRM components
PiperOrigin-RevId: 301798563
2020-03-20 12:48:50 +00:00
bachinger
510f5edd1d Remove cast media item
PiperOrigin-RevId: 301224632
2020-03-19 00:48:22 +00:00
olly
0d230d517a Miscellaneous cleanup related to recent changes
PiperOrigin-RevId: 300067561
2020-03-11 16:26:41 +00:00
bachinger
a5f0eb1e10 replace extension with mime type
This change uses mime types in a functionally equivalent way to how we used the extension hint so far.

Using a mimeType instead of the extension has some advantages. Most importantly mimeTypes are used by the cast SDK with which we want to achieve interoperability in the cast extension.

Using a mimeType instead of the extension hint further appears to be a bit more clear (which might be opinionated). Further mime types are a well known and widely used concept to identify file type on the internet and it provides asterix based generalizations (audio/*, */*) which could express the media type OTHER that ExoPlayer is using internally (no usage of asterix required so far though).

PiperOrigin-RevId: 300058945
2020-03-11 16:26:23 +00:00
bachinger
041a0696b7 remove UriBundle
PiperOrigin-RevId: 299361095
2020-03-10 10:20:47 +00:00
krocard
1f4156ce6d Restore the demo list position on start
It's quite anoying to have to search in the list
the last item played everytime the demo is restarted.

Fix that by saving and restoring it.

PiperOrigin-RevId: 299109261
2020-03-10 10:19:53 +00:00
bachinger
4517829610 add DefaultMediaSourceFactory and use it in PlayerActivity
PiperOrigin-RevId: 298879027
2020-03-10 10:19:27 +00:00
bachinger
d1bbd3507a add media item to create media sources
This change adds the createMediaSource(MediaItem mediaItem) method to the MediaSourceFactory interface. It doesn't deprecate createMediaSource(Uri uri) to keep the cl smaller. Deprecation and removing calls to the deprecated method from within the library and extension follow in a separate CL.

PiperOrigin-RevId: 298352442
2020-03-10 10:17:03 +00:00
olly
c6a6e0d6f3 Migrate various call sites to Format.Builder
PiperOrigin-RevId: 297562889
2020-02-27 17:15:34 +00:00
olly
7e6a1418e3 Demo apps: Annotate @NonNull where necessary
Because we now annotate not-null by default in ExoPlayer
library modules, we're seeing warnings in the demo apps where
we override a method and don't explicitly specify an equivalent
@NotNull annotation.

It's probably confusing to use not-null by default for the
demo apps, so this change uses @NonNull where necessary to fix
the warnings.

PiperOrigin-RevId: 296000044
2020-02-25 21:21:54 +00:00
olly
54283746be Fix lint errors
PiperOrigin-RevId: 295953956
2020-02-25 21:21:29 +00:00
christosts
1f905434d2 Add 60fps test assets in demo app
PiperOrigin-RevId: 295946028
2020-02-25 21:21:21 +00:00
olly
7a849e11f7 Fix demo app download notification
PiperOrigin-RevId: 294503035
2020-02-11 22:10:44 +00:00
aquilescanta
278e1aff4d Revert accidental change in media.exolist.
PiperOrigin-RevId: 294193213
2020-02-11 17:11:43 +00:00
aquilescanta
ac8a2e80e1 Prepare and release DrmSessionManager in Renderers
Issue: #6951
PiperOrigin-RevId: 294187695
2020-02-11 17:11:35 +00:00
andrewlewis
0dd8e6a7c1 Add GL demo app
Demonstrates rendering to a GLSurfaceView while applying a GL shader.

Issue: #6920
PiperOrigin-RevId: 293551724
2020-02-11 17:08:53 +00:00
bachinger
4bb6036cf6 add playback state changed listener
This change deprecates Player.onPlayerStateChanged(boolean pwr, int state). It removes deprecation for trivial cases. I'll remove other deprecated usages (mostly in ui module) in follow-up CLs to not bloat this CL.

PiperOrigin-RevId: 292917872
2020-02-11 17:07:03 +00:00
ibaker
d64388a075 Ensure the demo app requests local-file permissions for subtitle files
Currently we only do this for the main sample URI, not for subtitles.
So pairing a web-based video file with a local subtitle file on a fresh
install just throws a 'permission denied' exception.

PiperOrigin-RevId: 290794091
2020-01-24 11:10:21 +00:00
tonihei
cf7b908e94 Fix demo app NPE when selecting unsupported samples.
PiperOrigin-RevId: 290027772
2020-01-16 13:51:58 +00:00
olly
d7643acd52 Deprecate DownloadService state change methods
As discovered whilst investigating #6798, there are cases
where these methods are not correctly. They were added as
convenience methods that could be overridden by concrete
DownloadService implementations, but since they don't work
properly it's preferable to require application code to
listen to their DownloadManager directly instead.

Notes:

- The original proposal to fix #6798 stored the state change
events in memory until they could be delivered. This approach
is not ideal because the events still end up being delivered
later than they should be. We also want to fix the root cause
in a different way that does not require doing this.
- This change does not fix #6798. It's a preparatory step.

Issue: #6798
PiperOrigin-RevId: 289418555
2020-01-13 19:57:36 +00:00
bachinger
36fa9d5a43 add top-level playlist API
Design doc: https://docs.google.com/document/d/11h0S91KI5TB3NNZUtsCzg0S7r6nyTnF_tDZZAtmY93g/edit

Issue: #6161, #5155
PiperOrigin-RevId: 286020313
2019-12-18 18:52:51 +00:00
bachinger
74faa3aa9f rename setMediaItem to setMediaSource
PiperOrigin-RevId: 284514142
2019-12-09 16:30:56 +00:00
aquilescanta
d1d43d62e6 Add demo app support for attaching DrmSessions to clear content
Issue:#4867
PiperOrigin-RevId: 284262626
2019-12-09 16:30:32 +00:00
olly
aa2e9ffc10 Fix casting to not need warning suppression
Also remove getRendererCapabilities arg that's now always null.

PiperOrigin-RevId: 283966795
2019-12-06 19:20:06 +00:00
olly
cb873dd1ee Use play and pause convenience methods
PiperOrigin-RevId: 283949259
2019-12-06 19:19:18 +00:00
aquilescanta
61c43c30ac Make DownloadHelper pass DrmSessionManager to MediaSources
PiperOrigin-RevId: 283795201
2019-12-05 10:20:32 +00:00
olly
d12c7235f9 Bump targetSdkVersion to 29 for demo apps only
PiperOrigin-RevId: 283324612
2019-12-04 09:58:47 +00:00
ibaker
35237e658f Add SSA test file to the demo app
I wrote this myself

PiperOrigin-RevId: 281942685
2019-11-22 15:10:24 +00:00
kimvde
a7d962bf27 Downgrade targetSdkVersion back to 28
- The upgrade to version 29 made Robolectric version 4.3 fail.
- Upgrading Robolectric to 4.3.1 requires Java 9, which requires manual
  configuration in Android Studio.

PiperOrigin-RevId: 281753915
2019-11-22 15:09:54 +00:00
olly
5abb4ff8c1 Fix broken Enc/Clear playlist in media.exolist.json
- DRM properties need to be on individual playlist items.

PiperOrigin-RevId: 281718153
2019-11-22 15:09:24 +00:00
olly
f6853e4751 Bump targetSdkVersion to 29
- Enabling legacy storage for our demo app so that playing
  slideloaded media is still easy.
- Apps are still free to specify a lower targetSdkVersion

PiperOrigin-RevId: 281537041
2019-11-22 15:09:09 +00:00
kimvde
9b2917a9ae Add Java FLAC extractor
Seeking, live streams support and exposure of vorbis and ID3 data
are not part of this commit.

Issue: #6406
PiperOrigin-RevId: 281083332
2019-11-18 17:55:28 +00:00
bachinger
cd2c1f2f24 Playlist API: Add setMediaItem() and prepare()
PiperOrigin-RevId: 278867153
2019-11-15 05:11:45 +00:00
olly
0a27d7b482 Don't use DRM prior to API level 18
PiperOrigin-RevId: 278660557
2019-11-15 05:11:26 +00:00
olly
f51f7bd405 Fix SurfaceControl demo app layout
The fixes sizes could end up being wider than the screen (e.g on Pixel 3a)

PiperOrigin-RevId: 278642828
2019-11-05 18:36:14 +00:00
olly
02a83a5377 Delete unused theme
PiperOrigin-RevId: 278638978
2019-11-05 18:35:56 +00:00
ibaker
15f8d8668e Select exolist-specified subtitles by default
If a sample has a subtitle file listed, it makes sense to show it by
default.

PiperOrigin-RevId: 277934597
2019-11-05 16:17:08 +00:00
ibaker
07e93c15f9 Add support for subtitle files in the demo app
issue:#5523
PiperOrigin-RevId: 277927555
2019-11-05 16:16:53 +00:00
andrewlewis
656556b828 Clean up naming for GLSurfaceViews
PiperOrigin-RevId: 277896757
2019-11-05 16:15:29 +00:00
andrewlewis
a3d1ab6900 Add explicit dependency on appcompat for demo app
The demo app was using this via its dependency on the material library,
but it's preferable to list dependencies explicitly (otherwise the build
would break if we removed the material dependency).

PiperOrigin-RevId: 277316175
2019-10-30 08:51:50 +00:00
olly
7ccbc4c436 Remove VR code
- Leaving GvrAudioProcessor for now.
- Removing GvrPlayerActivity because it was never released. Also removing
  related UI classes. These were released, but it's unlikely anyone would
  have been using them directly.

PiperOrigin-RevId: 275822516
2019-10-30 08:47:06 +00:00
bachinger
e6e2dcc58d Rollback of 36f8bd78f7
*** Original commit ***

Rollback of 4ad4e3e4fc

*** Original commit ***

Rollback of 3b22db33ba

*** Original commit ***

add top-level playlist API to ExoPlayer

Public design doc:
https://docs.google.com/document/d/11...

***

PiperOrigin-RevId: 275813737
2019-10-30 08:46:42 +00:00
krocard
6841d40bc7 Demo app: Do not allow tunneling on API < 21
Without this patch, enabling tunneling on an API < 21 device
would result in an method not existing exception and the
app would crash.

PiperOrigin-RevId: 275428851
2019-10-18 17:42:50 +01:00
bachinger
0c0a67bb93 Fail at preparation when trying to download live content.
PiperOrigin-RevId: 275293735
2019-10-18 17:42:11 +01:00
bachinger
36f8bd78f7 Rollback of 4ad4e3e4fc
*** Original commit ***

Rollback of 3b22db33ba

*** Original commit ***

add top-level playlist API to ExoPlayer

Public design doc:
https://docs.google.com/document/d/11h0S91KI5TB3NNZUtsCzg0S7r6nyTnF_tDZZAtmY93g

Issue: #6161

***

***

PiperOrigin-RevId: 275276158
2019-10-18 17:42:03 +01:00
krocard
9af8511aef Introduce tunneling checkbox in test app
It makes observing differences without and with tunneling
much faster than recompiling.

PiperOrigin-RevId: 275216567
2019-10-17 11:52:42 +01:00
olly
7dede17d97 Make GvrPlayerActivity call its subclass to instantiate a player
It's more explicit and simpler than having the subclass call up into
the activity.

PiperOrigin-RevId: 274881350
2019-10-15 23:08:38 +01:00
olly
a2900992c3 Remove dead code
PiperOrigin-RevId: 274848191
2019-10-15 23:08:30 +01:00
olly
34c531764e Remove filter for intents that aren't handled
PiperOrigin-RevId: 274834663
2019-10-15 23:08:15 +01:00
bachinger
ce6252151a disable download button for live content in demo app
PiperOrigin-RevId: 274585052
2019-10-15 23:07:07 +01:00