3808 Commits

Author SHA1 Message Date
ojw28
d3fd2d1b87 Update ISSUE_TEMPLATE 2017-12-12 21:25:20 +00:00
olly
23a7f2d994 Force wrapping of HLS ID3 timestamp
Merge of https://github.com/google/ExoPlayer/pull/3495

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177057183
2017-12-12 21:25:10 +00:00
tonihei
1861aea2b3 Add throws IllegalSeekPositionException doc to seekTo(windowIndex, positionMs).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177011497
2017-12-12 21:24:39 +00:00
aquilescanta
c1c892f5ec Support undefined text track language when preferred is not available
Also slightly improve language normalization/documentation.

For this CL, it is assumed that null and "und" languages are different
entities. Once we fully tackle language tag normalization, we can decide
whether to normalize the "undefined" language.

Issue:#2867
Issue:#2980

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177008509
2017-12-12 21:23:25 +00:00
tonihei
ce557b11fc Add final to boolean used within Runnable.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176997767
2017-12-12 21:21:45 +00:00
tonihei
86d91a59a0 Remove race condition when stopping FakeExoPlayer.
A message to stop the playback and to quit the playback thread was posted in release().
The stop message removed all other already queued messages which might include
the second message to quit the thread. That led to infinite waiting in the
release method because the playback thread never got the quit signal.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176997104
2017-12-12 21:21:38 +00:00
andrewlewis
6c1f562230 Switch from currentTimeMillis to elapsedRealtime
currentTimeMillis is not guaranteed to be monotonic and elapsedRealtime is
recommend for interval timing.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176853118
2017-12-12 21:21:05 +00:00
andrewlewis
b19512fb20 Propagate the player error to ExoPlayerTestRunner
In a test run where no exceptions were thrown on the main thread and the test
did not time out, exceptions from onPlayerError were not correctly propagated to
the test thread (handleException would be called with null).

Fix ExoPlayerTestRunner.onPlayerError to propagate the actual exception from the
player.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176825907
2017-12-12 21:20:29 +00:00
simophin
cf3ab9051d Guard against out-of-range timestamp
We've found that in our production environment, the AAC stream's timestamp exceeds the 33bit limit from time to time, when it happens, `peekId3PrivTimestamp` returns a value that is greater than `TimestampAdjuster.MAX_PTS_PLUS_ONE`, which causes a overflow in `TimestampAdjuster.adjustTsTimestamp` (overflow inside `ptsToUs`) after playing for a while . When the overflow happens, the start time of the stream becomes negative and the playback simply stucks at buffering forever.

I fully understand that the 33bit is a spec requirement, thus I asked our stream provider to correct this mistake. But in the mean time, I'd also like ExoPlayer to handle this situation more error tolerance, as in other platforms (iOS, browsers) we see more tolerance behavior.
2017-12-12 21:20:10 +00:00
olly
d5b79f3a43 Update gradle wrapper
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176693785
2017-12-12 21:18:44 +00:00
hoangtc
f2a78adc21 Parse DASH manifest's publish time.
Parse DASH manifest's publishTime node as defined by ISO/IEC 23009-1:2014,
section 5.3.1.2.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176525922
2017-12-12 21:18:20 +00:00
olly
fa5cc5be51 Bump target API level to 27
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176366693
2017-12-12 20:49:32 +00:00
olly
5c0e1f3e8a Use MediaSourceTestRunner in additional source tests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176366471
2017-12-12 20:49:14 +00:00
aquilescanta
7903166886 Allow human readable strings as DRM intent extras.
Issue:#3478

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176351086
2017-12-12 20:48:50 +00:00
andrewlewis
c3b92f8456 Add support for Dolby Atmos
Issue: #2465

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176341309
2017-12-12 20:47:48 +00:00
tonihei
82ce68009c Move MockitoUtils to testutils and use it for all Mockito set-ups.
In particular this allows to have the workaround for
https://code.google.com/p/dexmaker/issues/detail?id=2 in one place only.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176340526
2017-12-12 20:47:13 +00:00
aquilescanta
2ad87f4f5b Add time unit and javadocs to fields in DashManifest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176335667
2017-12-12 20:46:38 +00:00
aquilescanta
dc425a942c Use consistent case for sideloaded
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176333544
2017-12-12 20:46:29 +00:00
hoangtc
09f3055bad Add Builder to SingleSampleMediaSource.
Add Builder pattern to SingleSampleMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176332964
2017-12-12 20:46:14 +00:00
olly
1b7c950d1e Add MediaSourceTestRunner for MediaSource tests.
- MediaSourceTestRunner aims to encapsulate some of the logic
  currently used in DynamicConcatenatingMediaSourceTest, so it
  can be re-used for testing other MediaSource implementations.
- The change also fixes DynamicConcatenatingMediaSourceTest to
  execute calls on the correct threads, and to release handler
  threads at the end of each test.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176117535
2017-12-12 20:45:07 +00:00
olly
14299e0643 Simplify LoopingMediaSourceTest setup
This test seems to obtain a timeline from a prepared
FakeMediaSource, but that's identical to the timeline
passed into that source to start with :).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176117133
2017-12-12 20:44:59 +00:00
tonihei
bb4be4314a Add simplified FakeTimeline constructor.
This is helpful for tests which don't care about detailled timeline set-ups
besides the number of windows.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176097369
2017-12-12 20:44:38 +00:00
hoangtc
1f70d3cdd7 Add Builder to ExtractorMediaSource.
Add Builder pattern to ExtractorMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176088810
2017-12-12 20:44:19 +00:00
olly
f5a3a27726 Deduplicate ExtractorMediaPeriod discontinuity reporting
This change makes sure progress is being made before reporting
a discontinuity. Else in cases like having no network and
playing a live stream, we allow the discontinuity to be read
each time an internal retry occurs, meaning it gets read
repeatedly. This does no harm, but is noisy and unnecessary.

We should also not allow skipping whilst there is a pending
reset or discontinuity notification, just like we don't allow
reads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175953064
2017-12-12 20:42:49 +00:00
andrewlewis
820a445944 Add support for float output for FfmpegAudioRenderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175940553
2017-12-12 20:42:34 +00:00
andrewlewis
108900cf52 Add support for float output in DefaultAudioSink
Also switch from using MIME types to C.ENCODING_* encodings in DefaultAudioSink.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175936872
2017-12-12 20:41:27 +00:00
andrewlewis
d49fc54968 Use ArrayDeque for playback parameters checkpoints
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175837754
2017-12-12 20:40:01 +00:00
hoangtc
57868092ea Add Builder pattern to HlsMediaSource.
Add Builder pattern to HlsMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175803853
2017-12-12 20:39:39 +00:00
olly
4bb5cda5f1 Some test cleanup
The purpose of this change isn't to fix anything. It's just to
simplify things a little bit. There will be following CLs that
make some changes to get things onto correct threads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175800354
2017-12-12 20:39:16 +00:00
tonihei
76ba1890aa Add method to FakeMediaSource to trigger source info refresh.
This allows to remove the LazyMediaSource used within
DynamicConcatenatingMediaSourceTest and also allows to write test which
simulates dynamic timeline or manifest updates.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175680371
2017-12-12 20:39:09 +00:00
tonihei
eea8cd169c Replaced the duplicated EMPTY track group array with the one already defined
in TrackGroupArray.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175670266
2017-12-12 20:38:47 +00:00
tonihei
77b48691aa Suppress reference equality warning in EventLogger.
We deliberately compare the track group returned by the track selection
with the track group in the parameter to check if the track selection is
referring to this particular track group.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175660909
2017-12-12 20:38:25 +00:00
hoangtc
8d81698d2a Continue adding Builder to MediaSource.
Add Builder pattern to SsMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175659618
2017-12-12 20:38:13 +00:00
aquilescanta
25dd8aa1f8 Fix cenc mode support and add support for the .mp4a extension.
Also add encrypted HLS internal sample streams.

Issue:#1661

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175577648
2017-12-12 20:37:08 +00:00
aquilescanta
79a9155438 Add support for 608/708 captions in HLS+fMP4
This also allows exposing multiple CC channels to any fMP4 extractor client.

Issue:#1661

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174458725
2017-12-12 20:36:11 +00:00
hoangtc
5bf4c249a2 Notify TrackSelection when it's enabled and disabled.
Add onEnable() and onDisable() call-backs to TrackSelection. This allows
TrackSelection to perform interesting operations (like subscribe to
NetworkStatus) and clean up after itself.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175558485
2017-12-12 20:31:58 +00:00
arnaudberry
877c89a0e1 Make it possible to extend DashManifestParser to parse revision-id.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175554723
2017-12-12 20:30:51 +00:00
hoangtc
bff221b85e Introduce Builder pattern to create MediaSource.
Start with DASH MediaSource. The number of injected arguments is getting
out-of-control.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175529031
2017-12-12 20:26:55 +00:00
tonihei
566170f308 Add javadoc to ExoPlayerTestRunner.
Someone must have forgotten to do this when rewriting this class.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175296249
2017-12-12 20:26:29 +00:00
andrewlewis
1b66908f7d Update version strings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176989632
2017-11-27 13:58:16 +00:00
ojw28
e7c60a2a23
Merge pull request #3493 from google/dev-v2-r2.6.0
r2.6.0
2017-11-23 17:22:35 +00:00
Oliver Woodman
3562fe1c69 SampleStream fixes 2017-11-22 20:38:53 +00:00
Oliver Woodman
75b9062583 Send discontinuity at adjustments after shuffle/repeat mode changes. 2017-11-22 18:06:14 +00:00
Oliver Woodman
56c1c3f6a7 Revert "Make ExtractorMediaSource timeline dynamic until duration is set"
This reverts commit b688a562508e74721841aaaa770e9dc47bd378dd.
2017-11-22 17:59:36 +00:00
olly
74569bba45 Don't do work after track selection when in ended state
This causes the player to report that it's started loading
when in the ended state.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176371892
2017-11-21 13:57:46 +00:00
olly
fa3052d36b Report additional position discontinuities
- Properly report internal discontinuities
- Add DISCONTINUITY_REASON_SEEK_ADJUSTMENT to distinguish
  seek adjustments from other internal discontinuity events

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176367365
2017-11-21 13:57:16 +00:00
olly
b688a56250 Make ExtractorMediaSource timeline dynamic until duration is set
We (eventually - albeit possibly infinitely far in the future)
expect a timeline update with a window of known duration. This
also stops live radio stream playbacks transitioning to ended
state when their tracks are disabled.

As part of this fix, I found an issue where getPeriodPosition
could return null even when defaultPositionProjectionUs is 0,
which is not as documented.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176492024
2017-11-21 13:48:27 +00:00
olly
d51944f4b3 Remove unnecessary dependency
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176487991
2017-11-21 13:48:18 +00:00
andrewlewis
60555e2c4b Improve robustness of ImaAdsLoader
Remove an assertion that there was a call to pause content between two
content -> ad transitions.

Also, only use the player position for resuming an ad on reattaching if the
player is currently playing an ad, in case IMA pauses content before the player
actually transitions to an ad.

Issue: #3430

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176365842
2017-11-21 13:46:32 +00:00
Oliver Woodman
1439b4a3ef Mini cleanup 2017-11-21 13:46:18 +00:00