3547 Commits

Author SHA1 Message Date
strobe
c6bc30bab7 Add NEON-accelerated HDR conversion routines to VPX.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169919087
2017-09-26 14:03:50 +01:00
andrewlewis
06f7b6be6a Use IntDef for AudioTrack.startMediaTimeState
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169880369
2017-09-26 14:00:59 +01:00
olly
505d5cd0a4 Fix a few lint warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169830938
2017-09-26 13:59:23 +01:00
eguven
1f8a8dbfa3 Add version number to serialized DownloadAction data
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169681768
2017-09-26 13:57:32 +01:00
aquilescanta
4fb18453e1 Add a "forceLowestBitrate" option to DefaultTrackSelector
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169668371
2017-09-26 13:56:04 +01:00
aquilescanta
25a9177ce3 Deduplicate DefaultTrackSelector javadocs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169552239
2017-09-26 13:54:10 +01:00
hoangtc
324339b88f Tweak live-streaming track selection logic.
Follow-up on the update to ABR logic in AdaptiveTrackSelection for live
streaming case:
- Do not reset liveEdgeTimeUs when user seek to a different position.
- For HlsChunkSource, for non-independent segments, currently the
bufferedDuration calculate will subtract previousChunk's duration. So to make
it work with live-streaming ABR logic, we subtract timeToLiveEdgeUs a similar
amount to compensate for that operation.
- Minor update to DefaultSSChunkSource, only perform TrackSelection when needed
(after checking necessary conditions).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169531275
2017-09-26 13:48:23 +01:00
eguven
d71400d280 Add DashDownloadActionTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169522830
2017-09-26 13:45:42 +01:00
yqritc
455f9fb9f0 remove space 2017-09-21 16:01:32 +09:00
yqritc
cac16f1647 remove keep alive check for updating primary url to avoid redundant playlist loading 2017-09-21 14:18:59 +09:00
yqritc
ff2ece56dd fix primarySnapshotAccessAgeMs 2017-09-21 12:01:25 +09:00
olly
ce7aaab3c6 Handle bracket params on the end of SmoothStreaming URLs
Issue: #3230

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169421873
2017-09-20 19:29:17 +01:00
aquilescanta
6314a0ec82 Add support for Widevine encrypted HLS
This includes both cbcs and cenc. Will only work for streams that require a single
pssh.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169382884
2017-09-20 19:28:02 +01:00
olly
26d789e6d3 Tweak release notes for 2.5.3
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169374725
2017-09-20 11:59:01 +01:00
olly
67567ffa6c TsExtractor: Do less work if payload reader does not exist
There's no reason to perform the discontinuity check or skip
the adaptation field if we don't have a payload reader for
the packet.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169374609
2017-09-20 11:57:47 +01:00
olly
ed76882271 Bump version + release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169257339
2017-09-19 18:26:05 +01:00
olly
d346266dc9 Workaround Samsung tablet reboot playing adaptive secure content
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169256059
2017-09-19 18:23:28 +01:00
olly
89f66924d5 Use IntDef for MediaCodecRenderer internal states
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169254794
2017-09-19 18:22:03 +01:00
eguven
09248608c0 Notify span listeners even if index store fails in SimpleCache.removeSpan
This fixes infinite loop in LeastRecentlyUsedCacheEvictor.evictCache when index store fails.

Also made CachedContentIndex not final so it can be mocked and added a package protected SimpleCache
constructor so mock index can be injected.

Issue: #3260

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169249517
2017-09-19 18:20:34 +01:00
eguven
8a0e148041 Workaround a cipher issue in Android 4.3
[]

Issue: #2755

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169249093
2017-09-19 18:19:08 +01:00
aquilescanta
fed2a1a6ea Fix PTS wraparound in HLS+Webvtt
Issue:#2928

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169246424
2017-09-19 18:17:43 +01:00
olly
5b0e693419 Fix DefaultDashChunkSource.updateLiveEdgeTimeUs
Very subtle, but lastAvailableSegmentNum is shifted by
RepresentationHolder.segmentNumShift. When accessing the
index directly it's necessary to unshift. The easiest way
to do this is to call through the holder, which does this
for you.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169239928
2017-09-19 18:16:18 +01:00
eguven
9bdf1ee944 Check if the cache is already empty before trying to evict more span
This case may happen if the max span size is more than the max size the
evictor is configured.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169101093
2017-09-19 18:14:54 +01:00
aquilescanta
5e2c7d967a Fix 2 CEA decoder bugs
1- Avoid dropped buffers by using a PriorityQueue instead of a set.
2- Process the end of stream after non-EOS buffers.

Issue:#3250

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169077365
2017-09-19 18:13:31 +01:00
eguven
8d739067ec Add HlsDownloadTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169064003
2017-09-19 18:12:01 +01:00
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
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
olly
5a4155f09f Destroy EGLSurface during DummySurface cleanup
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168020525
2017-09-08 22:28:10 +01:00
olly
40d443dc02 Enable rtmp in external demo app with extensions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168007345
2017-09-08 22:26:54 +01:00
tonihei
ec38d0d8ab Check thread is still alive before sending message in Loader.
The release callback handler in Loader might not be alive
anymore. Catch this case to prevent warnings about sending
messages on dead threads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167996538
2017-09-08 22:25:37 +01:00