5435 Commits

Author SHA1 Message Date
tonihei
711f9f8b6a Add test action to wait for an isLoading change.
This allows to wait until loading started or finished.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215704424
2018-10-15 09:15:50 +01:00
tonihei
9ca6544311 Simplify some buffered position related code.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215704344
2018-10-15 09:14:04 +01:00
Oliver Woodman
7849a5eb52 Subrip cleanup 2018-10-03 22:19:13 +01:00
ojw28
16fe67bfce
Merge pull request #4582 from szaboa/feature/4306_srt_position_tags
#4306 - Extract tags from SubRip subtitles, add support for alignment
2018-10-03 22:15:11 +01:00
eguven
e91065c4b0 Remove ProjectionRenderer.EyeType
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215562599
2018-10-03 22:13:34 +01:00
eguven
645f08af73 Prevent binding to DownloadService
DownloadService isn't designed to be bound.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215552423
2018-10-03 22:12:02 +01:00
eguven
9f8c22d719 Make it possible to use CacheKeyFactory with CacheDataSourceFactory and DownloaderConstructorHelper
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215541062
2018-10-03 22:10:30 +01:00
tonihei
f0e0a7cf57 Fix left position for subtitles.
When SubtitlePainter positions the cues centred in the given box, it must add
the left offset of the box to get the correct position.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215535289
2018-10-03 22:08:57 +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
aquilescanta
34c286682e Extract PlayerManager interface in the Cast demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215389291
2018-10-03 22:04:20 +01:00
tonihei
a8b851ce34 Add BasePlayer to avoid code duplication for common convenience methods.
A lot of methods just forward to other methods and there is no conceivable
way a player should implement it another way. Moving these methods to a
base player class allows to remove duplicated code across our player
implementations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215374192
2018-10-03 22:02:47 +01:00
tonihei
8b2d998440 Remove deprecated ExoPlayer members with same name as non-deprecated version.
For example, using ExoPlayer.STATE_IDLE falls back to the Player.STATE_IDLE
automatically and thus there is no need to keep the deprecated members.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215363841
2018-10-03 22:01:17 +01:00
olly
687756ed31 Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215261807
2018-10-03 21:59:44 +01:00
Arnold Szabo
56c7e1ff47 #4306 - grouping line/lineAnchor and position/positionAnchor assignments, setting Cue's textAlignment to def value - null 2018-10-02 18:45:06 +03:00
Arnold Szabo
75a7385bbb #4306 - extends test case with line and position anchor verifications 2018-10-01 23:16:48 +03:00
Arnold Szabo
fc5eb12e79 #4306 - breaking after the first alignment tag is found 2018-10-01 22:45:15 +03:00
ojw28
a7f8226571
Merge pull request #4884 from hacker1024/patch-1
Call rating with extras
2018-10-01 20:36:44 +01:00
ojw28
b4ba913008
Merge pull request #4886 from talklittle/protected-audiotrackscore
Make DefaultTrackSelector.AudioTrackScore protected
2018-10-01 20:05:08 +01:00
eguven
6cc049f6ef Increase supported libflac version to 1.3.2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215214894
2018-10-01 19:37:35 +01:00
eguven
7940fdfc5e Fix DownloadManager.TaskState javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215213255
2018-10-01 19:36:06 +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
90ca3716aa Improve MediaPeriodHolder documentation and member access.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215205796
2018-10-01 19:32:49 +01:00
tonihei
d97d289b6b Clarify and improve TrackSelection .enable() and .disable() calls.
These two methods are meant to indicate to the track selection that it's
started or stopped being used. This is helpful to schedule background tasks
related to track selection (e.g. register network change listeners etc.).
This intention is not clearly stated in the method docs.

Also, all track selections of all prebuffered periods stay enabled in
parallel at the moment. As the whole purpose of these methods is to know
whether dynamic updates via updateSelectedTrack may happen, it's better to
only enable track selections of the current loading media period. That's
similar to how we always forward the loading track selections to the
LoadControl.

This change:
 1. Improves the JavaDoc of TrackSelection.
 2. Disables track selections if loading moves to another period.
 3. Reenables track selection if loading moves back to a previous period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215199987
2018-10-01 19:31:09 +01:00
andrewlewis
f59f557704 Use recommended way of checking for TV
Switch to the recommended way of checking whether the app is running on a TV
device.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215177587
2018-10-01 19:26:00 +01:00
andrewlewis
5d5b641c1d Extend physical display size workaround for ATVs
Extend Sony workaround up to and including Oreo.

Due to a platform issue the Display API couldn't report 1080p UI
and 4k SurfaceView support until Oreo. Since Oreo it is still
common for devices to misreport their display sizes via Display,
so this change switches to using system properties up to and
including Pie.

On Pie treble may prevent writing sys.display-size so check for
vendor.display-size instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214987203
2018-10-01 19:24:17 +01:00
tonihei
5c8dabade6 Add @Documented to @IntDef and @StringDef annotations.
This makes the annotations appear in the generated JavaDoc.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214952419
2018-10-01 19:22:34 +01:00
Andrew Shu
9b111fbd95 Make DefaultTrackSelector.AudioTrackScore protected
This allows selectAudioTrack() to be overridden.
2018-09-27 18:37:21 -07:00
hacker1024
47ce263bee
Call rating with extras 2018-09-28 08:10:57 +10:00
olly
028f3e6438 Don't recreate the audio decoder if Format is unchanged
More specifically, if the parts of the Format that are used
for decoder configuration are unchanged.

Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214791234
2018-09-27 19:53:03 +01:00
Oliver Woodman
1dd0533af6 Merge branch 'release-v2' into dev-v2 2018-09-27 19:39:42 +01:00
ojw28
afba6386d3
Merge pull request #4881 from google/dev-v2-r2.9.0
r2.9.0
2018-09-27 19:38:12 +01:00
Oliver Woodman
1f9a003b4b Merge branch 'release-v2' into dev-v2-r2.9.0 2018-09-27 19:37:04 +01:00
tonihei
150e54b560 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:55:09 +01:00
andrewlewis
66c9d41ba0 Update release notes for 2.9.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214784773
2018-09-27 17:54:55 +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
aquilescanta
2a50621118 Use media item in the cast demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214750185
2018-09-27 17:46:27 +01:00
cblay
d487b599f8 Also plumb new Timeline through to TrackSelector.selectTracks() so periodId is useful
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214650418
2018-09-27 17:44:40 +01:00
cblay
3073d38a5a Pass MediaPeriodId to TrackSelector.selectTracks()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214638939
2018-09-27 17:42:57 +01:00
aquilescanta
776ad20a50 Add a MediaQueue abstraction to the cast extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214598078
2018-09-27 17:41:10 +01:00
aquilescanta
1bb7ec8203 Make DefaultLoadErrorHandlingPolicy non-final
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214584874
2018-09-26 13:20:26 +01:00
aquilescanta
a8efa27fab Make DefaultLoadErrorHandlingPolicy non-final
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214584874
2018-09-26 13:06:47 +01:00
eguven
c9ebaacae0 Use GlUtil class to share GL methods
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214582295
2018-09-26 13:05:17 +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
d92787b58d 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:43:22 +01:00
olly
b0cd6cf622 Allow configuration of DefaultLoadControl back buffer
Issue: #4857

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214254231
2018-09-24 15:43:10 +01:00
andrewlewis
614f964cfe Update README for libvpx 1.7.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214227045
2018-09-24 15:42:59 +01:00