798 Commits

Author SHA1 Message Date
olly
ae12b76ac4 Add tests to ensure DefaultRenderersFactory reflection works
Also add explicit Lint.IfChange/ThenChange rules to make it
clearer what needs to be done when changing one of the code
paths that's accessed via reflection.

PiperOrigin-RevId: 233406709
2019-02-18 15:58:11 +00:00
andrewlewis
56944caa21 Allow registration of control overlays for ad viewability
Switch from passing an ad UI ViewGroup to passing an object that can also
provide information about controls overlays.

Also switch to using a dedicated overlay for ads instead of the overlay frame
layout, which apps have easy access to.

PiperOrigin-RevId: 233393500
2019-02-18 15:58:06 +00:00
olly
8401097ead Upgrade gradle plugin and friends
PiperOrigin-RevId: 233390513
2019-02-18 15:57:55 +00:00
aquilescanta
905927554a Fix Cast demo app's blaze build and enable proguarding
PiperOrigin-RevId: 233372668
2019-02-18 15:57:49 +00:00
andrewlewis
dec00997e3 Remove deprecated ImaAdsMediaSource and constructors
Given the change to require setPlayer on AdsLoaders, it seems like a good
opportunity to clean up deprecated ads-related symbols.

PiperOrigin-RevId: 233020171
2019-02-18 15:56:39 +00:00
andrewlewis
858415e3b1 Update test names for attach -> start renaming
PiperOrigin-RevId: 232676346
2019-02-18 15:56:18 +00:00
andrewlewis
0bf9ebf91e Switch to non-deprecated way of setting AdDisplayContainer
PiperOrigin-RevId: 232507469
2019-02-06 15:46:06 +00:00
olly
2ab91bf08a Update OkHttp and Cronet dependencies
PiperOrigin-RevId: 231644908
2019-01-30 20:32:18 +00:00
andrewlewis
55b5814842 Remove unused vpxInit methods
PiperOrigin-RevId: 231578828
2019-01-30 16:38:16 +00:00
olly
45433869e5 Rename ExtractorMediaSource to ProgressiveMediaSource
It better describes what the class does. More importantly, we've had
inconsistent class names since we added offline support, for which we
added ProgressiveDownloader ("ExtractorDownloader" doesn't make any
sense). We could really do with aligning the names for clarity.

(Sorry)

PiperOrigin-RevId: 231387268
2019-01-29 16:45:42 +00:00
olly
19144c4c73 Allow to disable libyuv dependency on LIBVPX
Goal: reduce binary size.
PiperOrigin-RevId: 231198579
2019-01-29 16:43:32 +00:00
andrewlewis
0cf43fc64e Update IMA to 3.10.6
This brings in a memory leak fix.

Issue: #4114
PiperOrigin-RevId: 230880521
2019-01-29 16:42:39 +00:00
olly
355b3d6334 Increase minSdkVersion to 16
The combination of pre-16 API levels accounting for ~0.5% of the device
population, and that the most important components in ExoPlayer (e.g.
the MediaCodec renderers) have always required API level 16, mean it's
very unlikely this will negatively impact on anyone.

PiperOrigin-RevId: 230701808
2019-01-29 16:41:45 +00:00
andrewlewis
e671dac9a2 Fix GVR dependency
PiperOrigin-RevId: 230213842
2019-01-21 13:24:54 +00:00
andrewlewis
310925ca12 Upgrade to GVR SDK 1.190.0
Change the dependency to the new monolithic GVR SDK target.

PiperOrigin-RevId: 229931549
2019-01-21 12:56:43 +00:00
tonihei
22413b8037 Add start position to MediaSource.createPeriod.
That's the same position set in MediaPeriod.prepare (where it may be removed
in the future).

Having the position at an earlier point is necessary to fix an
issue with lazy preparation in ConcatenatingMediaSource where the prepare
position was assumed to be known but MediaPeriod.prepare hasn't been called
yet.

Issue:#5350
PiperOrigin-RevId: 229756637
2019-01-17 17:26:24 +00:00
olly
2d30d66746 Fix release of DRM sessions
There were some edge cases in which we'd forget to release DRM
sessions. For example if we read a format and acquired a
pendingDrmSession (in onInputFormatChanged), then immediately
read another format and overwrote pendingDrmSession, we'd
forget to release the one that's been overwritten.

This change hopefully makes release much clearer. We keep a list
of all drm sessions we're currently holding. Whenever we update
either drmSession or pendingDrmSession, we release any other
sessions that are in the list.

PiperOrigin-RevId: 228905465
2019-01-14 23:57:45 +00:00
tonihei
e8a7cb2546 Remove player and isTopLevelSource parameters from MediaSource.prepare.
They are not longer needed anywhere, are error-prone (because of threading
requirements), and complicate testing and using MediaSources without a player.

PiperOrigin-RevId: 227871157
2019-01-08 07:38:00 +00:00
andrewlewis
0afd9b0d23 Update FakeAd overrides
These are part of published IMA SDK 3.10.2.

PiperOrigin-RevId: 227861713
2019-01-08 07:37:40 +00:00
andrewlewis
14027bc98e Treat AVERROR_INVALIDDATA as non-fatal
Also configure the FFmpeg context to ignore errors as far as possible (this
appears to have an effect only for certain decoders).

Issue: #5293
PiperOrigin-RevId: 227851397
2019-01-08 07:37:30 +00:00
olly
d834eeab6f Set MediaSessionConnector components separately
Also support preparation without a player, in line with PlayerView.

PiperOrigin-RevId: 227735260
2019-01-08 07:36:50 +00:00
tonihei
e4ad90efd0 Set Player separately in AdsLoader interface.
Passing the player through MediaSource.prepare is only needed for the AdsLoader
and complicates other usages of MediaSource. Providing the player directly to
the AdsLoader is also in line with the usage pattern of PlayerView and other
components.

Also rename methods to start/stop to better reflect their usage.

PiperOrigin-RevId: 227682112
2019-01-08 07:33:52 +00:00
andrewlewis
1e99224019 Remove AdsLoader listeners on releasing ImaAdsLoader
Issue: #4114
PiperOrigin-RevId: 227516509
2019-01-08 07:32:31 +00:00
olly
243b12f37e Remove stray word
PiperOrigin-RevId: 227500707
2019-01-08 07:32:10 +00:00
Oliver Woodman
be2636c365 Merge pull request #4993 from saschpe:icy
PiperOrigin-RevId: 226031838
2018-12-18 19:46:54 +00:00
aquilescanta
768f48e1d9 Update the Cast framework dependency
PiperOrigin-RevId: 225812585
2018-12-18 19:45:39 +00:00
olly
d5e53d11f7 Add Player.MetadataComponent for completeness
PiperOrigin-RevId: 225795581
2018-12-18 19:45:06 +00:00
eguven
28dca0b339 Add method to Requirements to get not met requirements
PiperOrigin-RevId: 225549778
2018-12-18 19:44:43 +00:00
olly
bbf222854a Remove unused interface method
PiperOrigin-RevId: 225528632
2018-12-14 15:42:45 +00:00
GiuseppePiscopo
b278b02816 chore(MediaSource): move getTag after removeEventListener 2018-12-03 18:21:37 +01:00
GiuseppePiscopo
8a359bb1fb feat(MediaSource): client code can get the tag of a MediaSource 2018-12-03 15:17:36 +01:00
andrewlewis
1093aaf185 Specify a version for the FFmpeg dependency
Issue: #5154
PiperOrigin-RevId: 223314749
2018-11-29 12:35:24 +00:00
tonihei
30e753ea1d Provide Cronet request and response data for subclasses.
Subclasses may want to analyze, log and react to the Cronet-specific
connection data.

Issue:#5134
PiperOrigin-RevId: 222809441
2018-11-26 16:40:27 +00:00
Oliver Woodman
56e4860cb0 Remove stray proguard files 2018-11-23 12:28:23 +00:00
olly
42cb2c0d62 Add test that DefaultDataSource is able to build an RtmpDataSource
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222387374
2018-11-22 12:45:29 +00:00
andrewlewis
a3c0469837 Update IMA SDK and Play Services Ads versions
Since version 17.0 play-services-ads requires specifying AD_MANAGER_APP=true in
AndroidManifest.xml, so add this in the IMA extension's manifest. See also
https://developers.google.com/ad-manager/mobile-ads-sdk/android/quick-start.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222087771
2018-11-20 17:34:51 +00:00
olly
f5af6e8f16 Document need to call MediaSessionCompat.setActive
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221078075
2018-11-14 18:03:15 +00:00
olly
9ca019b8f8 PlaybackNotificationManager should show play button in ENDED state
- This brings it in line with PlayerControlView. The play action is displayed
instead, and pressing it seeks to the default position of the current window.
- Do the same for MediaSessionConnector
- Add support for PlaybackPreparer consistent with PlayerControlView

Issue: #5072

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221076008
2018-11-14 18:01:34 +00:00
olly
afebaed0c5 Make support-media-compat an API dependency
The extension cannot be used without also using support-media-compat
(e.g. to instantiate a MediaSessionCompat). So it may as well be an
API dependency.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221072128
2018-11-14 17:58:18 +00:00
olly
eb6859e436 Align navigation implementation across UI components
This change also paves the way for splitting out functionality into a utility class.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221070262
2018-11-14 17:56:39 +00:00
olly
063f5704cd Simplify MediaSessionConnector
- Make MediaSessionConnector use a ControlDispatcher and add setControlDispatcher,
  setFastForwardIncrementMs and setRewindIncrementMs methods. This brings it in line
  with our other UI components, including PlayerControlView and
  PlayerNotificationManager.
- Collapsed DefaultPlaybackController into MediaSessionConnector, since I'm not
  sure there's a legitimate alternative implementation (note ControlDispatcher does
  provide some equivalent functionality e.g. to modify calls being made on the
  player).
- Pass the Player and ControlDispatcher to command receivers and custom actions,
  so they don't need their own references.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220822082
2018-11-14 17:53:18 +00:00
olly
8ec757ad2b Some MediaSessionConnector simplifications
- Simplify logic for dispatching to the rating callback
- Simplify CommandReceiver by removing getCommands. Simply calling
  receivers is simpler, and more flexible because it doesn't force
  implementations to define a static set of things that they handle
  up front.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220788423
2018-11-14 17:51:37 +00:00
andrewlewis
bce1fab03c Include channel count in capabilities check
Issue: #4690

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220640737
2018-11-14 17:46:39 +00:00
olly
f895be6b1f AudioFocusManager - Treat idle state consistently
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220500268
2018-11-07 20:31:33 +00:00
olly
15dda17905 Make TimelineQueueNavigator shuffle aware
Issue: #5065

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220468285
2018-11-07 17:57:42 +00:00
olly
2d606f26f7 Minor cleanup to mediasession extension
- Make units of time clear for seeking
- Remove option to specify supported repeat modes in default
  playback controller. It doesn't seem useful, given we can't
  control what the session is sent.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220464529
2018-11-07 17:57:42 +00:00
eguven
7a114cb374 Uncomment VisibleForTesting annotations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220432564
2018-11-07 17:57:42 +00:00
eguven
37f4540156 Move BaseGvrPlayerActivity to com.google.android.exoplayer2.ext.gvr
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219829614
2018-11-06 11:07:06 +00:00
aquilescanta
b0555315cb Move all messaging constants to ExoCastConstants
Also make ExoCastMessage#mediaItemAsJsonObject protected.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219780620
2018-11-02 15:58:57 +00:00
Oliver Woodman
2dfe7a7ad6 Misc fixes / stylistic consistency changes for merged pull requests 2018-10-31 20:37:59 +00:00