5663 Commits

Author SHA1 Message Date
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
olly
dbf5b073a6 Network type cleanup
1. Remove option to pass null context to Util.getNetworkType. IMO it's
   clearer for the caller to just not call the method in this case.
2. Stop using deprecated DefaultBandwidthMeter.Builder constructor in
   all but one place.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217147091
2018-10-18 23:17:16 +01:00
olly
6e7b41512f No-op cleanup of DefaultDrmSessionManager
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217139869
2018-10-18 23:15:34 +01:00
Lieblich, Jonathan
0af9ccc990 added handling of unexpected tags 2018-10-15 15:37:42 -06:00
Lieblich, Jonathan
a7ace58712 Merge branch 'dev-v2' into program_information 2018-10-15 15:35:49 -06:00
olly
6fb8f66ba6 Remove assertion causing failure on some Samsung devices
The assertion was so weak it probably wouldn't detect genuine
misuse of the DefaultAllocator API, so it seems fine just to
remove it.

We don't really know what happens when the player is allowed to
continue on the affected devices, but hopefully it either "just
works" or fails in a more graceful way.

Issue: #4532

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217113060
2018-10-15 11:14:56 +01:00
olly
d511370338 Fix DashManifestParser to properly skip unknown tags
Robustness fix to make sure we ignore tags with known names, but
which are nested inside of unknown tags. For example we don't want
to parse the third period in:

<Period>...</Period>
<Period>...</Period>
<CustomTag>
  <Period>...</Period>
</CustomTag>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217101630
2018-10-15 09:36:56 +01:00
olly
ba6a118998 Retain decoder instance after the renderer is disabled
Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=216852679
2018-10-15 09:35:23 +01:00
olly
842f622d29 Allow codec flushing without re-initialization
For decoder reuse, we want disable() to flush the decoder. However,
if the flush needs to release the decoder for some reason, it seems
non-ideal to immediately re-initialize it. Re-initialization can
also throw ExoPlaybackException, which we don't want for disabling.

This change allows a variant of flush that wont re-initialize the
decoder if it has to be released, which will be used from disable().

Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=216834862
2018-10-15 09:33:37 +01:00
andrewlewis
42c3ff3934 Handle rotation signaled in MKV track name from HTC devices
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=216704331
2018-10-15 09:31:51 +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
vsethia
048c8bd68f Snapshots are going to become the default soon and these tests are failing when
reloading frmo snapshots. b/117347850. This is a no-op change as the current
default == _fullboot. When we globally flip and make snapshots the default,
these tests would fail and we are moving them over so that when we flip your
tests still pass.

https://groups.google.com[]forum/#!topic/mobile-ninjas/Y69PTAT5GyY

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=216634430
2018-10-15 09:28:21 +01:00
tonihei
0a7745bc03 Fix some random Android Studio warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215904019
2018-10-15 09:26:36 +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
olly
c5f9ad9f8b Minor fixes for period clipping
- Always clip to period duration for the last chunk. We previously
  did this only when the last chunk explicitly exceeded the period
  end time. We now also do it when the chunk claims to end at the
  period boundary, but still contains samples that exceed it.
- If pendingResetPositionUs == chunk.startTimeUs == 0 but the
  chunk still contains samples with negative timestamps, we now
  clip them by setting the decode only flag. Previously we only
  clipped such samples if the first chunk explicitly preceeded the
  start of the period.

Issue: #4899

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215763467
2018-10-15 09:23:00 +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
olly
cc7684d09f Introduce Renderer.reset
- It's a no-op for now
- Renderers that want to support retaining resources will move
  some functionality from their disable() implementations into
  reset()
- ExoPlayerImplInternal will be updated to not always call reset()
  immediately after disable(), which is what will enable resources
  to actually be retained.

Issue: #2826

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215729783
2018-10-15 09:19:30 +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
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
Lieblich, Jonathan
ced302fd83 added javadoc for ProgramInformation 2018-10-12 11:00:17 -06:00
Lieblich, Jonathan
6cbac152c9 added attribute parsin 2018-10-11 17:09:00 -06:00
Lieblich, Jonathan
ce0b5e4c44 removed custom element parsing 2018-10-11 16:25:21 -06:00
Brandon Davis
30c7954482 add bitrate that is unsupported by renderer 2018-10-11 13:05:21 -06:00
Brandon Davis
211a2dfd7a Ensure formats have unique ids 2018-10-11 13:04:17 -06:00
Brandon Davis
a5b7276229 Correct javadoc for forced bitrate tests 2018-10-11 13:01:33 -06:00
Brandon Davis
8a671c1cfe add check to ensure single track selection 2018-10-11 12:57:23 -06:00
Lieblich, Jonathan
e42786d6f2 added parsing for program information 2018-10-10 15:34:29 -06:00
Brandon Davis
57d90f30a8 add test for setForceHighestSupportedBitrate 2018-10-05 08:37:30 -06:00
Brandon Davis
35cc479f76 Create unique id for hls audio and text tracks
Combine groupId and name for uniqueness
2018-10-04 11:44:59 -06: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