3732 Commits

Author SHA1 Message Date
andrewlewis
457d0ba1b9 Work around broken AAC decoders on Galaxy S6
Issue: #3249

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168844850
2017-09-15 23:49:34 +01:00
aquilescanta
b2bc4450df Run cbc1/cbcs tests from API 25 onwards
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168834998
2017-09-15 23:48:24 +01:00
aquilescanta
6592a6474e Improve documentation for SCTE35-related metadata
Also expose break_durations in microseconds instead of 90kHz.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168816992
2017-09-15 23:47:12 +01:00
olly
a3a2fb506c Provisioning: Fix some (admittedly quite theoretical) issues:
1. Only tell sessions that want provisioning when provisioning occurs.
2. Also propagate failure to provision to these sessions.
3. If a session responsible for provisioning is released, start
   provisioning using another session instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168713918
2017-09-15 23:44:38 +01:00
olly
a479afff5f Fix potential NPE/ThreadSafety issues with MediaDrm listener
- MediaDrmEventListener.onEvent is typically called on the
  app's main thread. mediaDrmHandler is instantiated on the
  playback thread. Hence mediaDrmHandler should be volatile
  to ensure visibility.
- Nulling mediaDrmHandler could result in a NPE in onEvent.
  Instantiate mediaDrmHandler (and don't null it again) to
  avoid this. MediaDrmHandler.handleMessage will correctly
  discard any events for sessions that are now closed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168707938
2017-09-15 23:43:18 +01:00
andrewlewis
58293abc11 Remove IMA dependency and add AdsMediaSource
AdsMediaSource lives in the core library so only ImaAdsLoader remains in
the ima extension. AdsMediaSource takes an AdsLoader implementation.

ImaAdsMediaSource is deprecated rather than removed for now.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168707921
2017-09-15 23:41:59 +01:00
olly
0ad39c642d Relax test termination for API level 23 and above
This allows test runs to continue when the activity
is paused (but not stopped), which is in line with
what we do in the demo app's PlayerActivity.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168699521
2017-09-15 23:40:43 +01:00
andrewlewis
f2aed7186e Workaround the skip ad button not being focused
Issue: #3258

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168669969
2017-09-15 23:39:19 +01:00
hoangtc
b3004ab1c3 Do not apply SampleStream skip-ahead for NoSampleRenderer.
Currently, to make transition to next media period seamless, after the renderer
has read until the end of the current SampleStream, we may send it the next
SampleStream so the renderer may read from the next SampleStream ahead of the
transition.
For NoSampleRenderer, we should avoid doing this: skipping ahead for such
renderer doesn't have any benefit (the renderer does not consume data from
SampleStream), and it will change the provided rendererOffsetUs while the
renderer is still rendering from the playing media period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168669800
2017-09-15 23:38:06 +01:00
tonihei
7d59383cc4 Add reason to onPositionDiscontinuity.
This allows listeners to easily determine the source of the discontinuity.
Reasons can be period transitions, seeks, and internal reasons.

Listeners still using the deprecated ExoPlayer.EventListener interface were
updated to Player.EventListener.

GitHub: #3252

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168549612
2017-09-15 23:36:46 +01:00
andrewlewis
872cbec9e1 Add TrimmingAudioProcessor for gapless
Remove gapless functionality that relies on MediaCodec, and implement this in
an AudioProcessor instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168547487
2017-09-15 23:35:33 +01:00
hoangtc
c9591d7617 Added support for No-Sample Renderer.
Currently our Renderer is always associated with and consume data from
some SampleStreams, which were constructed from the provided MediaSource.
There are use-cases, in which the users want to have simple Renderer
implementation that does not consume data from SampleStream at all, but
render using their custom logic at each rendering position - they mostly just
need ExoPlayer to keep track of the playback position and enable/disable the
renderer.
This CL adds support for such Renderer by adding a TRACK_TYPE_NONE.
Renderer of such type will be:
- Associated with null TrackSelection as the result of track-selection
operation.
- Associated with EmptySampleStream.

GitHub: #3212

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168545749
2017-09-15 23:34:21 +01:00
hoangtc
5019da3e7b Update ABR logic in AdaptiveTrackSelection for live streaming case
In live streaming, if the playback position is very close to live edge,
the buffered duration will never reach minDurationForQualityIncreaseMs,
which prevents switching from ever happening. So we will provide the
durationToLiveEdgeUs to AdaptiveTrackSelection in live streaming case,
so it can handle this edge case.

GitHub: #3017

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168535969
2017-09-15 23:33:10 +01:00
olly
39dbb9a7fc De-dupe ACTION_DOWN events
Issue: #3259

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168378650
2017-09-15 23:31:54 +01:00
aquilescanta
f257300d8e Add tv module for USB tuner support + demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168366847
2017-09-15 23:30:41 +01:00
olly
0adb4502f6 Ignore all-zero defaultKid
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168259911
2017-09-15 23:29:28 +01:00
tonihei
f9661b5373 Use Handler callback instead of sleep() to catch InteruptedException.
The sleep used to simulate data load times is ignoring InterruptedExceptions.
(This is intended and in line with SystemClock.sleep()). However, when a
Loader cancels an ongoing load, it uses interrupts. To be able to catch these
and to immediately return from the reading data source, a handler callback
is used instead of the sleep() method which allows interuptable waiting.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168212652
2017-09-15 23:28:13 +01:00
tonihei
c4bf83dd1a Support stop() in FakeExoPlayer and release media properly.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168209817
2017-09-15 23:26:56 +01:00
tonihei
c181057550 Fix bug in ActionSchedule.
When having a repeat() action and another subsequent action,
the next action should only be scheduled once (and not repeatedly).
Thus, the "next" pointer in the repeated action needs to be nulled
in the first iteration to prevent repeated scheduling of the next action.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168202212
2017-09-15 23:25:45 +01:00
tonihei
9a91482a1b Release streams in fake adaptive media period.
Releasing the media period should also release the sample streams
to allow resources to be cleaned up.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168201377
2017-09-15 23:24:28 +01:00
olly
75d5adce6f Update dependency versions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168194589
2017-09-15 23:23:16 +01:00
ojw28
9a02667130 Update README.md 2017-09-10 18:38:40 +01:00
ojw28
2fb09dbb79 Merge pull request #3253 from google/dev-v2-r2.5.2
r2.5.2
2017-09-10 18:29:42 +01:00
olly
4ce862adf2 Tweak and add READMEs + remove refs to V1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165578518
2017-09-10 18:12:14 +01:00
andrewlewis
b174bcc173 Update extension README with usage instructions
Issue: #3162

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165572088
2017-09-10 18:09:45 +01:00
olly
9b18130ecc Bump to 2.5.2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168155713
2017-09-10 16:53:16 +01:00
olly
340d0be40a Bump to 2.5.2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168155713
2017-09-10 16:48:39 +01:00
Oliver Woodman
2d2062bf64 Fix build for release 2017-09-09 01:05:09 +01:00
olly
4c1fd23d8e Add possibility of forcing a specific license URL in HttpMediaDrmCallback
Resubmit of https://github.com/google/ExoPlayer/pull/3136

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164971900
2017-09-09 01:04:51 +01:00
olly
24b4cb844b Fix attr inheritance in SimpleExoPlayerView
When creating PlaybackControlView inside SimpleExoPlayerView,
we want certain attributes to be passed through. This lets you
set control attributes on the SimpleExoPlayerView directly. We
don't want all attributes to be propagated though; only our own
custom ones.

Not sure if there's a cleaner way to do this. Pragmatically this
solution seems ... ok :)?

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167619801
2017-09-09 00:57:18 +01:00
olly
a5302be664 Destroy EGLSurface during DummySurface cleanup
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168020525
2017-09-09 00:50:44 +01:00
olly
09a8c7cd6e Enable rtmp in external demo app with extensions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168007345
2017-09-09 00:50:35 +01:00
olly
ab94bd8b3b Pick up rtmpClient fix
Issue: #3156

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167718081
2017-09-09 00:50:19 +01:00
olly
cdcdea2f98 DecryptionException cleanup + add missing header
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167711928
2017-09-09 00:49:52 +01:00
olly
613950143c Workaround for SurfaceView not being hidden properly
This appears to be fixed in Oreo, but given how harmless
the workaround is we can probably just apply it on all
API levels to be sure.

Issue: #3160

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167709070
2017-09-09 00:49:21 +01:00
olly
8719d41e34 Fix position reporting during ads when period has non-zero window offset.
Reporting incorrect positions for ad playbacks was causing IMA to
think the ad wasn't playing, when in fact it was.

Issue: #3180

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167702032
2017-09-09 00:49:13 +01:00
olly
d187d294e5 Don't use MediaCodec.setOutputSurface on Nexus 7 with qcom decoder
Issue: #3236

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167581198
2017-09-09 00:48:36 +01:00
olly
2853bf8575 Upgrade gradle plugin / wrapper
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167579719
2017-09-09 00:48:28 +01:00
olly
8676c4a0f4 Rewrite logic for enabling secure DummySurface
Issue: #3215

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167505797
2017-09-09 00:48:21 +01:00
olly
61ee1f6a27 Be robust against unexpected EOS in WebvttCueParser
Issue: #3228

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167504122
2017-09-09 00:48:15 +01:00
olly
5ceccac63d Additional secure DummySurface device exclusions
Merge: https://github.com/google/ExoPlayer/pull/3225

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167502127
2017-09-09 00:48:08 +01:00
andrewlewis
3d38e62205 Adding missing license header in IMA build.gradle
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167496569
2017-09-09 00:47:18 +01:00
andrewlewis
a73601f36f Allow EXIF tracks to be exposed
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167493800
2017-09-09 00:47:13 +01:00
olly
65b14baab8 Update moe eqiuvalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167488837
2017-09-09 00:46:57 +01:00
Oliver Woodman
92185aa33c Minor cleanup to AspectRatioFrameLayout 2017-09-09 00:46:50 +01:00
olly
5cb78fa4c7 Fix typo
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167474040
2017-09-09 00:46:44 +01:00
anjalibh
acd16d6eea HDR 10 bits: Use a separate sampler for U and V dithering.
Using the same sampler introduced some minor horizontal scratches.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167347995
2017-09-09 00:46:12 +01:00
olly
d942775068 Allow more aggressive switching for HLS with independent segments
We currently switch without downloading overlapping segments, but
we do not actually switch more aggressively. This change fixes
this. Note there's an implicit assumption made that if one media
playlist declares independent segments, the others will too. This
is almost certainly true in practice, and if it's not the penalty
isn't too bad (the player may try and switch to a higher quality
variant one segment's worth of buffer too soon).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167120992
2017-09-09 00:46:06 +01:00
andrewlewis
2d4efffd12 Fix ContentDataSource bytesRemaining calculation
The bytesRemaining didn't always take into account any skipped bytes, which
meant that reaching the end of the file was not correctly detected in read().

Issue: #3216

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167016672
2017-09-09 00:45:58 +01:00
andrewlewis
e70df7c220 Use UTF-8 everywhere
UTF-8 is the default charset on Android so this should be a no-op change, but
makes the code portable (in case it runs on another platform).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167011583
2017-09-09 00:45:51 +01:00