661 Commits

Author SHA1 Message Date
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
Oliver Woodman
38681411fb Merge branch 'customize-ads-rendering-settings-more' of https://github.com/ogaclejapan/ExoPlayer into ogaclejapan-customize-ads-rendering-settings-more 2018-10-31 20:16:23 +00:00
ojw28
3b7d0b7923
Merge pull request #5004 from pakerfeldt/status-message-invalidresponsecodeexception
Provide http status message to InvalidResponseCodeException
2018-10-31 20:01:56 +00:00
aquilescanta
140d5fc9a9 Fix naming in MediaItemTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219472219
2018-10-31 17:46:28 +00:00
aquilescanta
db832d691b Add equals and hashCode to MediaItem
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219470655
2018-10-31 17:44:47 +00:00
andrewlewis
1094da2b61 Fix player state transitions for postroll ads
Before this change, the player state would be STATE_ENDED then
STATE_BUFFERING (when the postroll ad was marked as played) then
STATE_ENDED again.

Queueing a final content media period with start point equal to
the content duration after a postroll ensures that the player
state doesn't change to STATE_ENDED transiently.

Switch from using C.TIME_END_OF_SOURCE to C.TIME_UNSET for media
periods that should not have an end point and are not followed
by an ad.

Content media periods before postrolls have end position
C.TIME_END_OF_SOURCE. If the postroll ad loads, its content
position is set to the content duration, which should be known
at the point of loading the postroll, then a final 'empty'
content media period with start position equal to its duration
is queued. If the postroll fails to load, this empty content
media period is queued up directly after the preceding content
media period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219443683
2018-10-31 13:54:15 +00:00
andrewlewis
4b9530c214 Let apps specify whether to focus skip button on ATV
Issue: #5019

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219267048
2018-10-31 13:52:36 +00:00
eguven
5de17b9adc Add support for playing spherical videos on Daydream
RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219119888
2018-10-31 13:42:19 +00:00
vigneshv
e1ba9b0086 vp9_extension: Enable fast loop filtering
Turn on flag to enable fast loop filtering. This improves
multi-threaded decode performance by starting loop filtering early
if there are free threads available to do so.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218239442
2018-10-24 18:34:29 +01:00
aquilescanta
4343dc6084 Remove the Uri suffix from MediaItem.DrmScheme.licenseServerUri
Makes it consistent with MediaItem.media.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218217648
2018-10-24 18:32:49 +01:00
cpaulino
0834d12843 Make VpxOutputBuffer public
Mimics the ExoV1 behavior.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217893212
2018-10-24 18:19:12 +01:00
olly
ca4b5d0a0d Make context non-optional for DefaultBandwidthMeter
- Added ability to override the DefaultBandwidthMeter network type.
- These methods currently only work properly if called before the
  meter is used, but the plan is for them to be handled in the same
  way as internally detected network changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217887019
2018-10-24 18:15:53 +01:00
tonihei
70ccbc6eb8 Fix review comments
See https://github.com/google/ExoPlayer/pull/5004
2018-10-24 11:47:36 +02:00
Patrik Åkerfeldt
8c5703e931 Provide http status message to InvalidResponseCodeException
When response code alone is not enough to distinguish error responses, the http status message is helpful.
2018-10-23 16:51:46 +02:00
ogaclejapan
23666e3ac8 Fix adUiElements variables even more robust 2018-10-23 11:44:53 +09:00
ogaclejapan
090a992332 Fix setMediaBitrateKbps naming from consistency point of view 2018-10-23 11:24:41 +09:00
ogaclejapan
cfcbd2114b Allow setting the ad UI elements to be rendered in ImaAdsLoader 2018-10-21 13:54:07 +09:00
ogaclejapan
861b81694d Allow setting the ad media bitrate in ImaAdsLoader 2018-10-21 13:23:53 +09:00
aquilescanta
80e9c84a9e Remove RemotePlayer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217708323
2018-10-18 23:39:51 +01:00
aquilescanta
50dd089794 Update the cast framework gradle dependency in the Cast extension
Issue:#4960

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217707957
2018-10-18 23:39:51 +01:00
cpaulino
cc914494d7 Rename libvpxJNI.so to libvpxV2JNI.so
Renamed to stop collision between the ExoV1 and ExoV2 implementation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217348150
2018-10-18 23:22:50 +01:00
tonihei
a8b851ce34 Add BasePlayer to avoid code duplication for common convenience methods.
A lot of methods just forward to other methods and there is no conceivable
way a player should implement it another way. Moving these methods to a
base player class allows to remove duplicated code across our player
implementations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215374192
2018-10-03 22:02:47 +01:00
olly
687756ed31 Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215261807
2018-10-03 21:59:44 +01:00
ojw28
a7f8226571
Merge pull request #4884 from hacker1024/patch-1
Call rating with extras
2018-10-01 20:36:44 +01:00
eguven
6cc049f6ef Increase supported libflac version to 1.3.2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215214894
2018-10-01 19:37:35 +01:00
tonihei
5c8dabade6 Add @Documented to @IntDef and @StringDef annotations.
This makes the annotations appear in the generated JavaDoc.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214952419
2018-10-01 19:22:34 +01:00
hacker1024
47ce263bee
Call rating with extras 2018-09-28 08:10:57 +10:00
aquilescanta
2a50621118 Use media item in the cast demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214750185
2018-09-27 17:46:27 +01:00
aquilescanta
776ad20a50 Add a MediaQueue abstraction to the cast extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214598078
2018-09-27 17:41:10 +01:00
eguven
c9ebaacae0 Use GlUtil class to share GL methods
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214582295
2018-09-26 13:05:17 +01:00
tonihei
b2e0a365d3 Add convenience methods player.next() and player.previous()
This simplifies code skipping items in a playlist programatically.

Issue:#4863

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214580742
2018-09-26 13:03:39 +01:00
andrewlewis
56f4717465 Update README for libvpx 1.7.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214227045
2018-09-24 15:31:25 +01:00
olly
bd3bf3fc8d Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213951977
2018-09-21 12:19:48 +01:00
andrewlewis
d0fb4b4729 Add IMA tests to presubmit
Also fix internal build by adding some methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213828434
2018-09-21 12:14:51 +01:00
andrewlewis
e90d36cb69 Fix ImaAdsLoaderTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213824217
2018-09-21 12:13:13 +01:00
sharjeel
1726f9e5fe Don't notify drop frames when maxDroppedFramesToNotify < 1
With default of value set to -1, every single dropped frame is reported because of expression: if (droppedFrames >= maxDroppedFramesToNotify) {  maybeNotifyDroppedFrames(); }

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213502573
2018-09-20 12:25:44 +01:00
tonihei
e25b7d2148 Add wrapper for Log messages to allow settig the log level.
Currently there is no way to disable (or reduce) the logcat output generated
by ExoPlayer.

Issue:#4665

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213421072
2018-09-20 12:12:21 +01:00