464 Commits

Author SHA1 Message Date
andrewlewis
ee02c6789a Support seeking based on MLLT metadata
Issue: #3241

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217252254
2018-10-18 23:20:54 +01:00
olly
bfd67992f4 Add ExoPlayer.setForegroundMode
Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217189082
2018-10-18 23:19:09 +01:00
andrewlewis
81a9293072 Project start position for preroll ad to content transitions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=216675981
2018-10-15 09:30:06 +01:00
andrewlewis
8dedbd5748 Fix release notes Markdown syntax
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215868785
2018-10-15 09:24:50 +01:00
tonihei
76a1569e79 Update release notes to better describe Java 8 change.
Apps need to set the target compatibility to VERSION_1_8 to enable the
automatic desugaring if they haven't done so already.

Issue:#4907

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215733070
2018-10-15 09:21:13 +01:00
tonihei
d4b87cdc23 Fix updates of loading period and buffered positions in PlaybackInfo.
This makes the following changes to improve consistency among the PlaybackInfo
values:
 1. Update buffered position and total buffered duration after loading period
    is set as both values are affected by a loading period update.
 2. Add copyWithPosition to allow updating the position without resetting the
    loading period.
 3. Forward the total buffered duration to playing position updates
    as it may have changed with the new playing position.

Issue:#4899

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215712328
2018-10-15 09:17:34 +01:00
Oliver Woodman
7849a5eb52 Subrip cleanup 2018-10-03 22:19:13 +01:00
tonihei
43c01562d1 Fix positioning of subtitles.
SubtitleView forwards the cue box position to SubtitlePainter. This should be
the position relative to the canvas of the SubtitleView. Currently, however,
we forward the position relative to the parent of SubtitleView. That causes
problems if SubtitleView has a non-zero offset position to its parent.

Issue:#4788

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215535281
2018-10-03 22:07:25 +01:00
tonihei
4386d5d466 Replace DefaultBandwidthMeter with CountryAndNetworkTypeBandwidthMeter.
This removes the experimental bandwidth meter and uses it as the new default.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215404065
2018-10-03 22:05:52 +01:00
tonihei
46731cdd1d Fix prepare position of DeferredMediaPeriods for windows with non-zero offset.
If we prepare a deferred media period before the actual timeline is available,
we either prepare with position zero (= the default) or with a non-zero
initial seek position.

So far, the zero (default) position got replaced by the actual default position
(including any potential non-zero window offset) when the timeline became known.

However, a non-zero initial seek position was not corrected by the non-zero
window offset. This is fixed by this change.

Related to that, we always assumed that the deferred media period will the
first period in the actual timeline. This is not true if we prepare with an
offset (either because of an initial seek position or because of a default
window position). So, we also determine the actual first period when the
timeline becomes known.

Issue:#4873

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215213030
2018-10-01 19:34:29 +01:00
tonihei
827ea63657 Fix issue with stale createPeriod events in ConcatenatingMediaSource.
If a source is removed from the playlist, the player may still call createPeriod
for a period of the removed source as long as the new timeline hasn't been handled
by the player. These events are stale and can be ignored by using a dummy media
source. The stale media period will be released when the player handles the updated
timeline.

Issue:#4871

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214787090
2018-09-27 17:51:22 +01:00
andrewlewis
a394ab7be3 Update release notes for 2.9.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214784773
2018-09-27 17:49:52 +01:00
aquilescanta
e50214a5a1 Add constructor for adding payload reader factory flags
Issue:#4861

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214772527
2018-09-27 17:48:10 +01:00
tonihei
b2e0a365d3 Add convenience methods player.next() and player.previous()
This simplifies code skipping items in a playlist programatically.

Issue:#4863

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214580742
2018-09-26 13:03:39 +01:00
aquilescanta
083350b7db Do not retry failed loads whose error is FileNotFoundException
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214277073
2018-09-26 13:02:02 +01:00
olly
c934ce744d Don't request session sharing on CDMs that don't support it
Issue: #4834

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214258163
2018-09-24 15:34:43 +01:00
olly
34c37596dd Allow configuration of DefaultLoadControl back buffer
Issue: #4857

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214254231
2018-09-24 15:33:06 +01:00
andrewlewis
a0ab96623a Compensate for trimmed audio in buffer time check
After a period transition the first buffer queued has the sum of previous period
durations added to its source presentation timestamp. These durations take into
account gapless edits, but the check on the timestamp was based on the submitted
frame count, not the frame count after trimming.

This change fixes an issue where audio/video would gradually drift apart due to
accumulated error in the audio track position, which could lead to freezing due
to the audio renderer stopping being ready and switching to the standalone media
clock.

Issue: #4559

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213819908
2018-09-21 12:11:34 +01:00
tonihei
e25b7d2148 Add wrapper for Log messages to allow settig the log level.
Currently there is no way to disable (or reduce) the logcat output generated
by ExoPlayer.

Issue:#4665

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213421072
2018-09-20 12:12:21 +01:00
aquilescanta
c9e4f6b429 Make HlsMediaSource.Factory take a factory of trackers instead of an instance
This allows creating multiple HLS media sources from a single Factory, as
required by the interface.

Issue:#4814

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213297850
2018-09-20 12:10:53 +01:00
andrewlewis
dc807c11a1 Fix some release notes formatting
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213245186
2018-09-17 17:51:56 +01:00
tonihei
d1df41a39e Fix window index comparison.
To check the validity of a window index it needs to be compared with a greater
or equal sign to the window count.

Issue:#4822

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213234403
2018-09-17 17:50:20 +01:00
olly
6f6f381beb Fix audio and text track selection in the multi-renderer case
If we can select a track that has a strictly higher score than a
selection already made for a renderer of the same type, we should
prefer it.

Issue: #4711

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212835895
2018-09-13 18:44:53 +01:00
olly
b4dfed874d Enable GZIP for SingleSampleMediaSource
Issue: #4771

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212623142
2018-09-12 15:32:14 +01:00
olly
a5a7e988e3 Clip DASH periods to their durations
Issue: #4185

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212619419
2018-09-12 15:30:47 +01:00
tonihei
b1d48179e8 Add support to change shuffle order after playlist creation.
This allows to update the shuffle order after the ConcatenatingMediaSource
has been created. ShuffleOrder objects should be immutable to ensure thread
safety and thus there is no way to do this currently.

Issue:#4791

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212443146
2018-09-12 15:24:23 +01:00
tonihei
21c5b0bf67 Add missing AudioSink discontinuity for stream changes.
When the stream is changed in the audio renderer, the timestamps of the
samples can no longer be expected to match the calculations in the AudioSink.

This change tracks the samples at which the stream is changed and notifies the
AudioSink of the discontinuity.

Issue:#4559
Issue:#3829

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212435859
2018-09-12 15:20:40 +01:00
tonihei
95aa5db148 Reenable edit lists without keyframe again but remove samples before keyframe.
Ignoring all edit lists if they don't start with a keyframe causes A/V sync
issues when valid edit lists are applied at the beginning.

This change allows such edit lists again but removes all samples before the
first keyframe (these samples would be ignored by the renderer anyway if at
the beginning OR cause visible distortions when appended to an unrelated
keyframe).

Issue:#4774
Issue:#4348

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212244407
2018-09-12 15:05:53 +01:00
aquilescanta
b14e0935b1 Add container format sniffing in HLS
Issue:#2025

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211977802
2018-09-12 15:02:57 +01:00
josephmarques
aa7134d538 Adds support for the messageData attribute of the Event element in DASH MPDs for ExoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211854408
2018-09-12 14:55:34 +01:00
tonihei
67a2bb3d28 Fix various period preparation and source info refresh error throwing issues
1. Currently, we may throw source info refresh errors while the previous media
   period is still playing.
2. We don't throw if the next period in a playlist fails to prepare and the
   previous renderers are all disabled.
3. We throw source info refresh errors for playlists before playback reaches
   the culprit source.

This change:
1. Defers the exceptions until all existing media periods have been played.
2. Checks for period preparation exception if the next period is not
   getting prepared and the renderer time reached the next period.
3. Does no longer throw from ConcatenatingMediaSource.maybeThrowSourceInfo
   RefreshError. The deferred media periods take care of that for each source
   individually.

Issue:#4661

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211819436
2018-09-12 14:52:33 +01:00
olly
502fae7cd4 Bump version to 2.9.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211792952
2018-09-06 13:47:59 +01:00
olly
c3c309b8a8 Blacklist OMX.SEC.mp3.dec on SM-T530
Issue: #4519

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211646358
2018-09-06 12:04:48 +01:00
tonihei
782dee266d Change past to present tense in release notes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211612207
2018-09-05 12:34:59 +01:00
olly
c57fe1897c Add ExoPlayer.retry convenience method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211463309
2018-09-05 12:33:28 +01:00
olly
70f8aeb10b Clean up release notes in preparation for 2.9.0
- Try and put things into a vaguely sane order
- Remove/simplify overly-detailed release notes

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211447350
2018-09-05 12:29:39 +01:00
olly
80e64e58ec WAV: Don't output data beyond the data limit
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211446207
2018-09-05 12:28:13 +01:00
tonihei
3a802eb06c Add onDrmSessionAcquired and onDrmSessionReleased callbacks.
To report DRM session metrics in the future as part of the listener, we need
a callback at the end of the drm session to get the final metric state.
For completion, the session acquired callback is also added.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211328412
2018-09-03 14:15:51 +01:00
tonihei
d308fff88d Restructure media period queue tracker in AnalyticsCollector.
The current structure tries to associate events to media periods and windows
based on the reported values and the current timeline. However the reported
EventTime may not always be consistent in case the timeline doesn't contain
windows or media periods yet or not anymore.

The recent changes to MediaPeriodId allow to use it as a unique identifer for
media periods independent of the timeline. This enables more accurate tracking
of the media period queue and prevents reporting events with inconsistent
data.

Issue:#4492
Issue:#4634

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210713120
2018-09-03 14:09:35 +01:00
tonihei
6b9e1824ad Extend updateSelectedTrack method with additional information.
This provides the list of currently buffered media chunks and iterators over
the potential next chunks to the track selection. Having these two parameters
enables more advanced decision logic based on this data.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210551812
2018-09-03 14:04:45 +01:00
eguven
a429f4819e Use camera motion metadata to stabilize 360 videos
RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210537375
2018-08-28 16:43:53 +01:00
andrewlewis
efe8f09f45 Propagate EoS in renderer when using video tunneling
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210529471
2018-08-28 16:40:55 +01:00
andrewlewis
9c36773602 Fix playback of postrolls with multiple ads
At the point of starting to play a postroll, source info refreshes for future
postroll ads in the same ad group would cause a seek that incorrectly identified
the media period to play as the content media period. Fix the logic in
getAdGroupIndexForPositionUs to address this.

Also handle empty postroll ad breaks by resetting the expected ad group index
when we send content complete.

Issue: #4710
Issue: #4681

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210071054
2018-08-24 16:02:38 +01:00
aquilescanta
24d04a26e4 Add support for variable substition in HLS
Issue:#4422

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209958623
2018-08-24 16:01:08 +01:00
tonihei
74e2384fb6 Add response headers to LoadEventInfo.
The response headers of the last load are available from the loading source
when creating media source events and can be easily forwarded.

Issue:#4361
Issue:#4615

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209900693
2018-08-24 15:55:01 +01:00
eguven
02a8964fe2 Support VR180 videos
If available parse and use spherical metadata:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209754080
2018-08-24 15:44:24 +01:00
olly
b34c46415d Bump version to 2.8.4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209134753
2018-08-17 13:27:42 +01:00
andrewlewis
d05d2fcea9 Support seamless adaptation of xHE-AAC audio streams
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209113673
2018-08-17 11:15:58 +01:00
Oliver Woodman
32bd69d4b2 Cleanup recent merged pull requests 2018-08-16 17:02:08 +01:00
andrewlewis
e7ef75342c Scale up initial video decoder maximum input size
When playing a playlist where the exact maximum input size is known from the
container for each item, it may be necessary to recreate the decoder to increase
its maximum input buffer size at the point of transitioning from one item to the
next, which can make transitions non-seamless.

Scale up the initial video decoder maximum input size so playlist item
transitions with small increases in maximum sample size don't require
reinitialization.

Issue: #4510

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208650244
2018-08-16 16:39:38 +01:00