5664 Commits

Author SHA1 Message Date
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
olly
053a7bc0b9 Simplify DefaultDrmSession event handling
- Handling EVENT_PROVISION_REQUIRED is unnecessary because we handle
  it via NotProvisionedException, which was thrown on all API levels.
- Handling EVENT_KEY_EXPIRED during playback is unnecessary. All it
  does is cause an error to be thrown, but an error will be thrown
  anyway out of the MediaCodec when it tries to use the expired keys.
  It's currently a race condition where the error gets thrown from,
  where-as having it always be thrown from one place is preferable.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219172021
2018-10-31 13:50:51 +00:00
olly
7eeeb40d24 Add options for controlling audio track selection
Issue: #3314

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219158729
2018-10-31 13:49:08 +00:00
olly
069e3cbf7d Clean up DefaultTrackSelectorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219139356
2018-10-31 13:47:26 +00:00
olly
038238430b Re-enable codec re-use
Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219130576
2018-10-31 13:45:45 +00:00
olly
4824f352de Decouple input format and codec format
This paves the way to cleanly fix the first two issues
listed in [] onDisabled will null inputFormat,
but nulling of codecFormat will remain tied to the codec
being released.

Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219125458
2018-10-31 13:44:03 +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
olly
194d0f3331 Add a bit of structure DefaultTrackSelector, for sanity
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219109829
2018-10-31 13:38:51 +00:00
eguven
ed32e2a7f7 Add TrackSelectionUtil.getAverageBitrate method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218877191
2018-10-31 13:37:06 +00:00
aquilescanta
9ea678c5e6 Add ExoCastMessage
ExoCastMessage contains all player management messages that the sender app can
send to the receiver app. ExoCastMessages can be serialized as JSON strings.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218846977
2018-10-31 13:35:22 +00:00
olly
ede62e97b2 Fix track selection when forceLowestBitrate is enabled:
- Only use bitrate when comparing two tracks if their bitrates are
  actually different.
- For audio, prefer to use bitrate over selection flags.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218660886
2018-10-31 13:33:32 +00:00
olly
4fe14c7693 Minor cleanup to BandwidthMeter/DefaultBandwidthMeter
- Improve variable naming
- In the edge case that bytes are transferred in a sample that
  has 0 elapsed time, carry the bytes forward into the next
  sample. If we don't do this then the estimate will be calculated
  as though those bytes were never transferred. In practice I
  suspect this very rarely occurs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218551208
2018-10-31 13:31:43 +00:00
olly
1b6801c091 Simplify setting of codec operating rate
Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218540967
2018-10-31 13:29:57 +00:00
andrewlewis
706ce49bd3 Fix handling of MP3s with appended data
Issue: #4954

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218357113
2018-10-24 18:44:35 +01:00
olly
66a6921c26 Remove non-addEventListener ways of adding an event listener
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218347641
2018-10-24 18:43:05 +01:00
olly
d56b7ad811 Clean up codec reinitialization
Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218346327
2018-10-24 18:41:22 +01:00
olly
66c508651a Cleanup codec init, flush and release
Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218332277
2018-10-24 18:39:41 +01:00
olly
2fc122745a Give EventDispatcher more predictable behavior
If EventDispatcher.removeListener is called to remove a listener,
and if the call is made from the same thread that said listener
handles events on, then it should be guaranteed that the listener
will not be subsequently invoked on that thread.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218331427
2018-10-24 18:37:59 +01:00
tonihei
2d63be0962 Swap google() and jcenter() in docs and gradle config.
This seems to be more stable in case Bintray has issues updating the ExoPlayer
sources.

Issue:#4997

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218327350
2018-10-24 18:36:18 +01: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
tonihei
5ce2f1763d Check if source has been prepared before releasing it.
In ConcatenatingMediaSource, the source may be removed before it started
preparing (this may happen if lazyPreparation=true). In this case, we
shouldn't call releaseSource as the preparation didn't start.

Issue:#4986

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218141658
2018-10-24 18:30:51 +01:00
eguven
ea49d39a4d Add VR string and icon
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218137830
2018-10-24 18:29:10 +01:00
andrewlewis
4170c79a4b Add ACCESS_NETWORK_STATE permission for MH tests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218058185
2018-10-24 18:27:31 +01:00
olly
62759e8dd6 Cleanup VR video player sample app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218003875
2018-10-24 18:25:51 +01:00
olly
f3b4575436 Temporarily disable codec reuse
There are multiple subtle issues with the current implementation:

1. setOperatingRate can cause a codec initialization even if the
   renderer is disabled. This is not supposed to happen.
2. If the codec is released whilst the renderer is disabled, the
   renderer can instantiate a new codec using the old format when
   it's enabled again, only to immediately have to reconfigure or
   release it if the actual format to be played is different.
3. Codec reuse does not take into account renderer configuration.
   The specific case where this is problematic is if the video
   renderer is re-enabled with a different tunneling session id.
   The reused codec is then not configured correctly.

Also moved availableCodecInfos reset into releaseCodec for sanity.

Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217924592
2018-10-24 18:24:12 +01:00
andrewlewis
bb5a9ef8ad Remove extra blank line
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217907544
2018-10-24 18:22:31 +01:00
olly
42c9b244ee Make context non-optional in AudioFocusManager
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217897796
2018-10-24 18:20:54 +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
tonihei
6977fdbc1d Properly reset period id and start position in ExoPlayerImpl.
This is a no-op change as the respective values are not used so far but
the change makes the current state cleaner and is less error-prone.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217892421
2018-10-24 18:17:33 +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
4c6507e7a0 Remove deprecated MediaSource.prepareSource.
This method only ensured backward compatibility while the new version was not
public yet. Now ExoPlayer 2.9.0. is public, this workaround can be removed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217881691
2018-10-24 18:14:09 +01:00
olly
bf57d44023 Update VR video player sample app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217874381
2018-10-24 18:12:29 +01:00
eguven
8f3c3e2841 Add GlUtil createBuffer overload which doesn't copy values
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217846755
2018-10-24 18:10:43 +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
Yuki312
9d114b1ccb fix checkIdleRequirement 2018-10-23 17:13:26 +09: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
olly
1ef3efaa90 Automated g4 rollback of changelist 217356705.
*** Reason for rollback ***

Photos regression is resolved by []

*** Original change description ***

Automated g4 rollback of changelist 217189082.

*** Reason for rollback ***

Broke photos (b/117818304)

*** Original change description ***

Add ExoPlayer.setForegroundMode

Issue: #2826

***

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217773278
2018-10-18 23:39:51 +01:00
olly
3805717026 Decouple dummySurface lifespan from codec lifespans
I don't think there's any particular reason for releasing
dummySurface when we release the codec. It seems to make
more sense to decouple the two, and treat a dummySurface as
a resource that should be released on reset.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217711788
2018-10-18 23:39:51 +01: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
olly
1c6abc8b03 Set output on surface in all states
setSurface only sets the output surface on the codec if the
renderer is enabled or started. This was fine in the past
because the codec was always null in other states, however
the recent codec reuse work means this is no longer the case.

The output surface should always be set if the codec is
non-null. If setting the surface requires releasing the codec
instance, we should only instantiate the new instance if
enabled or started. This is in line with what onDisabled does
if flushing requires releasing the codec

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217676434
2018-10-18 23:39:51 +01:00
olly
05a98a7b79 Code shrinking doesn't like Class.super.defaultMethodName
Just not doing it seems simplier and more obviously correct
than suppressing the warnings in our proguard file.

Issue: #4890

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217675527
2018-10-18 23:39:51 +01:00
eguven
86fdcb08d8 Fix documentation confusion in MediaChunkIterator subclasses
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217505571
2018-10-18 23:39:51 +01:00
falhassen
423a954e1b Automated g4 rollback of changelist 217189082.
*** Reason for rollback ***

Broke photos (b/117818304)

*** Original change description ***

Add ExoPlayer.setForegroundMode

Issue: #2826

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217356705
2018-10-18 23:39:31 +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