9146 Commits

Author SHA1 Message Date
olly
d77ce9eda0 Remove deprecated calls to external APIs
PiperOrigin-RevId: 322346067
2020-07-24 10:43:44 +01:00
ibaker
4fbd09693a Fix nullness error in Mp4Extractor
This only manifests when turning ParsableByteArray#data into a getData()
method but I'm fixing it beforehand to avoid introducing changes into a
big refactoring change.

#exofixit

PiperOrigin-RevId: 322342497
2020-07-24 10:43:35 +01:00
ibaker
e0b7263ce4 Remove SpannedSubject dependency from UtilTest
PiperOrigin-RevId: 322341513
2020-07-24 10:43:25 +01:00
christosts
34a887e2d3 Common module tests depend on core
PiperOrigin-RevId: 322325657
2020-07-24 10:43:16 +01:00
olly
132c9d15e3 UI module string cleanup
PiperOrigin-RevId: 322323784
2020-07-24 10:43:07 +01:00
ibaker
7ed729b175 Fix warning about int overflowing before being assigned to long
#exofixit

PiperOrigin-RevId: 322322340
2020-07-24 10:42:57 +01:00
olly
899a78fca9 StyledPlayerControlView: Some cleanup
PiperOrigin-RevId: 322317638
2020-07-24 10:42:48 +01:00
insun
63ca2b00fb Resolve styled controls crash on pre-API 21
When building a demo app without recent gradle (ex. blaze)
it crashes.

PiperOrigin-RevId: 322313886
2020-07-24 10:42:39 +01:00
olly
7b4d7d9aa4 Remove invalid documentation that causes javadoc to crash
PiperOrigin-RevId: 322311636
2020-07-24 10:42:30 +01:00
kimvde
34ed79e6d9 Remove nullness warnings in extractors
#exofixit

PiperOrigin-RevId: 322311309
2020-07-24 10:42:21 +01:00
kimvde
8dd564c9a8 Remove Mp4Extractor from nullness exclusion list
PiperOrigin-RevId: 322310474
2020-07-24 10:42:12 +01:00
claincly
73df8e4a26 Removes spherical stereo play back mode
- Removed corresponding playback examples in the resouce JSON files.
- Removed the spherical style declaration.
- Removed spherical stereo mode related Intent settings, and
- Removed code to play back media in spherical stereo mode

BUG=160460714
(grafted from 595fe17a480d5bc64d0198130150d8e8a5daa679)
PiperOrigin-RevId: 322206314
2020-07-24 10:42:03 +01:00
tonihei
08f62efb88 Remove experimental time limit on renderer loop.
PiperOrigin-RevId: 322172767
2020-07-24 10:41:54 +01:00
claincly
811921e618 Removes random ABR support in demo app
- Removed random ABR option from popup menu
- Remvoed intent parameter regarding random abr, default to
   AdaptiveTrackSelection. Removed logic for getting track selection
   mode from an intent
- Remvoed string definition regarding random ABR

PiperOrigin-RevId: 322167816
2020-07-24 10:41:45 +01:00
christosts
aed5aca3dd ActionFileUpgradeUtil: add more tests action files
Add test action files for DASH, HLS,  SmoothStreaming and Progressive.

PiperOrigin-RevId: 322166875
2020-07-24 10:41:36 +01:00
andrewlewis
9594aa45ff Move functionality from DemoApplication to DemoUtil
https://developer.android.com/reference/android/app/Application recommends
against subclassing application.

PiperOrigin-RevId: 322163812
2020-07-24 10:41:27 +01:00
tonihei
97cc355baf Fix bug in downloader proguard config.
The nested class names need to use a $ sign.

PiperOrigin-RevId: 322156862
2020-07-24 10:41:18 +01:00
olly
6eb706002a Migrate to Robolectric PAUSED looper mode: AudioFocusManagerTest
PiperOrigin-RevId: 322154193
2020-07-24 10:41:09 +01:00
olly
576ef82191 Remove explicit use of Robolectric PAUSED looper mode
It's now the default everywhere, so there's no need to specify it
explicitly.

PiperOrigin-RevId: 322153319
2020-07-24 10:41:00 +01:00
olly
302b5f2ba4 Remove unnecessary use of Robolectric LEGACY looper mode
CacheDataSourceTest2 works fine in PAUSED mode as well.

PiperOrigin-RevId: 322150471
2020-07-24 10:40:51 +01:00
bachinger
7c995a3cfa Fix javaDoc of onMediaItemTransition
PiperOrigin-RevId: 322145517
2020-07-24 10:40:42 +01:00
olly
df1536ab24 Migrate WorkManagerScheduler to non-deprecated WorkManager.getInstance
PiperOrigin-RevId: 322143769
2020-07-24 10:40:33 +01:00
olly
0cd15d9158 Proactively check listener arguments are non-null
PiperOrigin-RevId: 322143359
2020-07-24 10:40:24 +01:00
tonihei
953db7898e Make dependency on AndroidX appcompat optional for dialog builder.
The dependency is only used to create a dialog in
TrackSelectionDialogBuilder that is compatible with newer styling
options.

This dependendy adds over 500Kb to the apk (even if unused) and we
shoudn't force this on an app. Instead make the dependency optional by
automatically falling back to the platform version if the AndroidX one
doesn't exist.

Issue: #7357
PiperOrigin-RevId: 322143005
2020-07-24 10:40:15 +01:00
kimvde
ee222f7027 Remove AtomParsers from extractors nullness exclusion list
PiperOrigin-RevId: 322131697
2020-07-24 10:40:06 +01:00
aquilescanta
ecc834d704 Make DrmSessionManager.getExoMediaCryptoType cover placeholder sessions
getExoMediaCryptoType will only return null for drmInitData == null and
track types for which placeholder sessions are not used. This change
will allow renderers to abstract themselves from format.drmInitData.

PiperOrigin-RevId: 322131219
2020-07-24 10:39:57 +01:00
claincly
72728ba054 Remove Media Tunneling support in demo app
- Removed Tunneling option from popup menu
- Removed intent parameter regarding tunneling
- Removed string definition regarding tunneling

PiperOrigin-RevId: 322123578
2020-07-24 10:39:48 +01:00
christosts
b7b3f4ea45 Remove unused MEDIA_ITEM_TRANSITION_REASON_SKIP
PiperOrigin-RevId: 322120882
2020-07-24 10:39:39 +01:00
christosts
b249480060 Offline: store MIME type and keySetId
Replace `type` with (optional) `mimeType` and add `keySetId` in
DownloadRequest. The DownloadHelper infers the downloading method (DASH,
HLS, SmoothStreaming or Progressive) from the content's MIME type and
URI.

PiperOrigin-RevId: 322117384
2020-07-24 10:39:30 +01:00
ibaker
c669756f7d Add a missing deprecation suppression in CastPlayer
PiperOrigin-RevId: 322115322
2020-07-24 10:39:21 +01:00
christosts
63b965d3f0 Non-null MIME types infer to other content type
PiperOrigin-RevId: 322114754
2020-07-24 10:39:12 +01:00
andrewlewis
7fce04a67f Depend on the IMA extension in noExtensions variant
Also use the cronet extension in the demo app.

PiperOrigin-RevId: 322108530
2020-07-24 10:39:03 +01:00
andrewlewis
a8b64f9530 Remove extra MediaItem in demo app
PiperOrigin-RevId: 322094331
2020-07-24 10:38:53 +01:00
olly
9185b5177a Temporarily remove OPUS from sync samples optimization.
This is currently causing frames to be dropped when we seek.

PiperOrigin-RevId: 322009748
2020-07-24 10:38:44 +01:00
olly
21f5914e56 Re-add rawtypes suppression
PiperOrigin-RevId: 322008577
2020-07-24 10:38:35 +01:00
ibaker
3074365348 Suppress deprecation warning in CastPlayer
PiperOrigin-RevId: 321774583
2020-07-24 10:38:26 +01:00
olly
12559bbc8d DefaultAudioSink: Make PCM vs non-PCM code paths clearer
This change replaces a lot of individual isInputPcm branching with a single,
larger branch.

PiperOrigin-RevId: 321763040
2020-07-24 10:38:17 +01:00
insun
bcf218da60 Import translated strings
PiperOrigin-RevId: 321762840
2020-07-24 10:38:08 +01:00
olly
a6640ae377 Stop merging methods through AnalyticsCollector/AnalyticsListener
PiperOrigin-RevId: 321595514
2020-07-24 10:37:59 +01:00
tonihei
3b26c218e1 Deduplicate clear playlist code for stop(true) calls.
The logic to clear the playlist is currently duplicated in various
reset methods so that calls to player.stop(true) can clear the playlist.

This can be deduplicated by clearing the playlist as a seperate
operation that reuses the existing code.

PiperOrigin-RevId: 321578759
2020-07-24 10:37:50 +01:00
ibaker
161dea661f Assorted deprecation fixes/migrations/suppressions
These were missed on the first pass

PiperOrigin-RevId: 321553847
2020-07-24 10:37:41 +01:00
ibaker
b755df1338 Update PlayerWrapper methods to return void where possible
Suggested during the review of 437d1b6e9a

This keeps the Runnable -> Callable<Boolean> conversion encapsulated
inside SessionPlayerConnector which makes it clearer why it's needed.

PiperOrigin-RevId: 321553744
2020-07-24 10:37:32 +01:00
bachinger
c0204bfdc4 Throw when window uid changes for unexpected reasons
PiperOrigin-RevId: 321553397
2020-07-24 10:37:23 +01:00
ibaker
ab95e3f388 Migrate usages of deprecated SimpleCache constructors
I duplicated some methods in SimpleCacheTest to ensure we keep testing
the deprecated code paths for now.

PiperOrigin-RevId: 321548802
2020-07-24 10:37:14 +01:00
olly
363a2a3b45 DefaultRenderersFactory: Add setting to enable float output
This also renders https://github.com/google/ExoPlayer/pull/7625 redundant.

PiperOrigin-RevId: 321544195
2020-07-24 10:37:05 +01:00
insun
79c14cb801 Renamed PlayerActivity2 to InternalPlayerActivity and refactored
- Rename PlayerActivity2 to InternalPlayerActivity.
- Reduced code duplications.

PiperOrigin-RevId: 321515231
2020-07-24 10:36:56 +01:00
olly
26db5be49a DefaultAudioSink: Misc cleanup
- Move output channel workaround to a block that's only executed for PCM
- Remove redundant variable

PiperOrigin-RevId: 321460898
2020-07-24 10:36:47 +01:00
olly
6b4abf2643 Audio event consistency cleanup
PiperOrigin-RevId: 321440594
2020-07-24 10:36:38 +01:00
bachinger
cfef1378a7 Fix JavaDoc
PiperOrigin-RevId: 321436812
2020-07-24 10:36:29 +01:00
tonihei
bb787d662d Ensure onAdPlaybackStarted is only called after the session is created
We currently try to call onAdPlaybackStarted even if the ad session
is not created yet and if not, we never call the callback afterwards.

Make sure to update and create the current session before trying to
send onAdPlaybackStarted.

As a result, we can merge updateSessions into the existing
handleTimelineChanged and handleDiscontinuity calls as they always
need to be called together.

PiperOrigin-RevId: 321383860
2020-07-24 10:36:20 +01:00