5060 Commits

Author SHA1 Message Date
olly
91b324f6b9 Fix weird XingSeeker indexing
There are still things broken about the seeker, but this
cleans up some of the weird bits.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177315136
2017-12-12 21:28:22 +00:00
tonihei
63dbf56b6c Allow multiple video and audio debug listeners in SimpleExoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177184331
2017-12-12 21:28:05 +00:00
andrewlewis
c12349e2c9 Allow setting supported formats on AdsLoaders
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177175377
2017-12-12 21:27:53 +00:00
olly
9eed1150e0 Clean up some extrator SeekMap implementations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177173618
2017-12-12 21:27:31 +00:00
aquilescanta
a8d4ad94f4 Fix DefaultTrackSelector#Parameter withSelectUndeterminedTextLanguage
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177170994
2017-12-12 21:27:24 +00:00
olly
0e0300b802 Extractor cleanup
- Align class summary Javadoc
- Fix ErrorProne + Style warnings

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177165593
2017-12-12 21:26:36 +00:00
olly
7a03198028 Add some clarifications to MediaSource documentation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177141094
2017-12-12 21:26:07 +00:00
olly
1d96492c1e Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177063576
2017-12-12 21:25:47 +00:00
Pavel Stambrecht
ee05b60a19 Iso8601Parser improved to be able to parse timestamp offsets from UTC 2017-12-12 21:25:35 +00:00
Pavel Stambrecht
e175bf9e42 Iso8601Parser improved to be able to parse timestamp offsets from UTC 2017-12-12 21:25:29 +00:00
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
e2bba1567e Add Builder for ImaAdsLoader and allow early requestAds
Also fix propagation of ad errors that occur when no player
is attached.

Issue: #3548
Issue: #3556

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178767997
2017-12-12 19:19:27 +00:00