798 Commits

Author SHA1 Message Date
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
Sascha Peilicke
95eff3b747 Add Shoutcast Metadata Protocol (ICY) extension
Based on the OkHttp extension.

Resolves #3735
2018-10-22 23:22:41 +02: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
tonihei
585806de24 Clarify doc of components which only allow a main thread player.
ExoPlayer can be run on a background thread, but some components (UI and IMA)
only support players on the main thread. This adds some documentation and
assertions for that.

To simplify assertions, this also moves the getApplicationLooper method from
ExoPlayer to Player.

Issue:#4439

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213280359
2018-09-17 17:56:36 +01:00
tonihei
d1df41a39e Fix window index comparison.
To check the validity of a window index it needs to be compared with a greater
or equal sign to the window count.

Issue:#4822

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213234403
2018-09-17 17:50:20 +01:00
tonihei
1284f9ea4d Add Nullable to message payload.
Not having this annotation may cause Kotlin implementations to fail.

Issue:#4802

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212980643
2018-09-17 17:47:11 +01:00
tonihei
77a529f0ed Add static Util.EMPTY_BYTE_ARRAY
This prevents repeated instantiation of empty arrays.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211941723
2018-09-12 14:57:01 +01:00
tonihei
d0161ad18b Fix all error-prone, style, optional suggestion, etc. issues.
This fixes or suppresses all reported issues by the code review linter tools.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210107759
2018-08-28 16:37:14 +01:00
olly
3196bc40db Fix CronetDataSource redirect logic
- Remove usage of deprecated postBody field
- Transform POST to GET on redirect, as in DefaultHttpDataSource

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210092576
2018-08-24 16:14:51 +01:00
olly
924a76d532 Clean up use of deprecated APIs
- Add @Deprecated on overrides of deprecated method.
- Suppress deprecation warnings where appropriate.
- Use non-deprecated alternatives where appropriate.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210092434
2018-08-24 16:12:44 +01:00
andrewlewis
9c36773602 Fix playback of postrolls with multiple ads
At the point of starting to play a postroll, source info refreshes for future
postroll ads in the same ad group would cause a seek that incorrectly identified
the media period to play as the content media period. Fix the logic in
getAdGroupIndexForPositionUs to address this.

Also handle empty postroll ad breaks by resetting the expected ad group index
when we send content complete.

Issue: #4710
Issue: #4681

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210071054
2018-08-24 16:02:38 +01:00
tonihei
2a9d5c21e2 Clarify doc for Player.getDuration and add Player.getContentDuration.
Similar to getBufferedPosition and getCurrentPosition, getDuration should
mention that it also returns the duration of the current ad.

And, also similar to getContentBufferedDuration and getContentPosition, a
new method getContentDuration simplifies querying the content duration while
playing an ad.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209914696
2018-08-24 15:58:01 +01:00
tonihei
4bf5e4991c Improve IntDef javadoc.
The doc can be improved by enumerating and linking all possible values from
the interface doc.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209772309
2018-08-24 15:53:30 +01:00
eguven
14c7c2995c Add android.permission.FOREGROUND_SERVICE
Apps targeting P or later now must request this permission in order to
use foreground services.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209762160
2018-08-24 15:51:58 +01:00
olly
e2ebb78b63 Don't apply dependency check in non-app modules
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209757391
2018-08-24 15:45:57 +01:00
andrewlewis
38ea53fcdc Revert discarding empty ad breaks
The previous change was too aggressive as it would clear future ad breaks.

Still clear the pending content position so the real content position is
reported after an empty ad break.

Issue: #4681
Issue: #4622

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209752306
2018-08-24 15:41:19 +01:00