9886 Commits

Author SHA1 Message Date
tonihei
93948471c8 Don't require the existence of the next period to wait for its stream.
We have a workaround for uneven sample stream durarions in playlists that
assumes a renderer allows playback if it's reading ahead or waiting for
the next stream.

652c2f9c18 changed this logic to no longer require to
wait until the next stream is prepared due to a change in how we advance
media periods in the queue. However, the code falsely still requires the
next stream to exist (even if it's not prepared). This can cause a stuck
buffering state when the difference in the duration of the streams is more
than what we buffer ahead because we never create the next stream in such
a case.

Note: DefaultMediaClock.shouldUseStandaloneClock has roughly the same logic
and also doesn't require the next stream to be present.

Also fix a test that seemed to rely on this stuck buffering case to test
stuck buffering detection. Changed the test to not read the end of stream
to ensure it runs into the desired stuck buffering case.

Issue:#7943
PiperOrigin-RevId: 333050285
2020-10-17 11:47:27 +01:00
ibaker
b6036561c2 Exclude PC devices from H.265 GTS tests
PiperOrigin-RevId: 333031399
2020-10-17 11:46:31 +01:00
tonihei
1b5d07c105 Guava-ify f2c51560c2
PiperOrigin-RevId: 333031301
2020-10-17 11:46:23 +01:00
tonihei
6a9f125c14 Don't assume FakeSampleStream is ended without end of stream signal
PiperOrigin-RevId: 333029935
2020-10-17 11:46:15 +01:00
olly
a837e7a3b0 Cleanup layout XMLs to be consistent with others
PiperOrigin-RevId: 333023580
2020-10-17 11:44:43 +01:00
ibaker
77249bdf0e Use replace() instead of replaceAll() in SsaDecoder
We're not using regex so there's no need to use replaceAll()

PiperOrigin-RevId: 332865724
2020-10-17 11:44:17 +01:00
krocard
201d120e38 Recover from audio server crash while sleeping for offload
Without this patch, playback would be frozen indefinitely
until the user manually pauses and unpauses it.

This has the side effect of disabling offload until
the next stop due to the workaround of
disabling offload when it encounters a failure.

As an audio server crash is considered very
infrequent, especially in stable conditions like
an audio only playback, it is unlikely that disabling
offload is an issue.

PiperOrigin-RevId: 332857094
2020-10-17 11:44:10 +01:00
Oliver Woodman
1850a918f1 Merge pull request #7938 from bennettpeter:pullreq-ssa-subtitles
PiperOrigin-RevId: 332814223
2020-10-17 11:43:54 +01:00
kimvde
9ec9828c93 Fix dump file write directory
PiperOrigin-RevId: 332254072
2020-10-17 11:41:49 +01:00
ibaker
3e36ebe28e Suppress Guava-related ProGuard/R8 warnings
I didn't copy-paste the whole of
https://github.com/google/guava/wiki/UsingProGuardWithGuava because
this line seems relevant based on our current usage.

Lots of that file seems to relate to classes that are strongly
discouraged on Android:
https://github.com/google/guava/wiki/Android#specifics

I've only added this to the `common` module, since everyone that uses
ExoPlayer must depend on that. This avoids duplicating this line into
every module that has a Guava dependency.

Also remove some other warning suppressions that are defined in both
`core` and `common`.

Issue: #7904
PiperOrigin-RevId: 332203086
2020-10-17 11:41:41 +01:00
olly
f4896d769f Replace duration strings with plurals
PiperOrigin-RevId: 332014290
2020-10-17 11:41:35 +01:00
kimvde
97a0df77f6 Support android.resource URI scheme
Issue: #7866
PiperOrigin-RevId: 330736774
2020-10-17 11:40:56 +01:00
olly
8955cd3a61 Clean up experimental offload Javadoc
PiperOrigin-RevId: 331591005
2020-10-17 01:17:36 +01:00
tonihei
8a0d52be4b
Add update to shrinking guide to release notes 2020-09-22 13:53:17 +01:00
olly
d386d03b11 Add blog posts to release notes
PiperOrigin-RevId: 332940209
2020-09-21 23:03:30 +01:00
bachinger
9acf1e8d10 Mention moving skipSilence in release note
Issue: #7939
PiperOrigin-RevId: 332838586
2020-09-21 23:03:23 +01:00
olly
a15d01d36f More verbose instructions for consistency
PiperOrigin-RevId: 332015471
2020-09-16 17:03:35 +01:00
aquilescanta
d1ce5f5b24 Update the FFmpeg extension readme to use symlinking
PiperOrigin-RevId: 332012857
2020-09-16 17:03:24 +01:00
aquilescanta
fe2bc7ba71 Fix the FFmpeg extension build
Since gradle 4.0, CMake imported libraries are bundled in the APK, so
manually bundling them causes a duplication which breaks the build.

Issue: #7906
PiperOrigin-RevId: 332012375
2020-09-16 17:03:19 +01:00
christosts
52826c860f Fix bug in offline DRM downloads
PiperOrigin-RevId: 331955966
2020-09-16 13:37:52 +01:00
olly
bc89a8f763 Depend on robolectric 4.4, which has now been released
Issue: #7906
PiperOrigin-RevId: 331775990
2020-09-16 13:37:44 +01:00
olly
3fd47b92e6 Add missing release note
Issue: #7902
PiperOrigin-RevId: 331771187
2020-09-16 13:37:36 +01:00
olly
8386d617bf Fix OOM-is-prevented test OOM-ing :)
This test is intended to check that DefaultLoadControl will cause
playback to fail as "stuck buffering" rather than OOM-ing, in the
case that its target buffer size is reached and playback still
hasn't started.

Unfortunately, the target buffer size is ~130MB, and when running
on some setups an OOM actually ends up happening before this much
memory is allocated.

This change makes the target buffer size much smaller to avoid the
problem.

PiperOrigin-RevId: 331748208
2020-09-16 13:37:26 +01:00
christosts
9a01e6cf1e Add release note entry for DRM-protected downloads
PiperOrigin-RevId: 331539036
2020-09-16 13:37:12 +01:00
olly
d2fa7b0217 Fix release notes
PiperOrigin-RevId: 331354102
2020-09-13 00:03:34 +01:00
Oliver Woodman
83477497c1
Merge pull request #7894 from google/dev-v2-r2.12.0
r2.12.0
2020-09-12 23:39:26 +01:00
Oliver Woodman
4ab966dc96 Improve IMA readme 2020-09-12 22:19:02 +01:00
Oliver Woodman
3f6e5ce676 Update IMA readme 2020-09-12 21:28:58 +01:00
olly
a5bf3f4191 Remove references to cross-protocol redirects for Cronet
There's no option to enable them. This is probably a copy/paste error
from DefaultHttpDataSourceFactory.

PiperOrigin-RevId: 331334263
2020-09-12 21:07:50 +01:00
bachinger
4f982763cf Add getMediaItemCount() and getMediaItemAt(int)
PiperOrigin-RevId: 331211708
2020-09-11 23:21:08 +01:00
olly
12b0537c2f Clean up some lint warnings
PiperOrigin-RevId: 331162350
2020-09-11 17:40:19 +01:00
bachinger
a8298fa746 MediaItemify the IMA extension README and the ads page in dev guide
PiperOrigin-RevId: 331155539
2020-09-11 17:39:40 +01:00
andrewlewis
b6842cf0f0 Fix handling of empty ad groups at non-integer cue points
Issue: #7889
PiperOrigin-RevId: 331149688
2020-09-11 17:39:12 +01:00
olly
9fb2902dad Exclude Guava transitive annotation dependencies
PiperOrigin-RevId: 331148067
2020-09-11 16:02:37 +01:00
olly
ea25729a09 Make BatchBufferTest allocate less memory
Setting to 2x BATCH_SIZE_BYTES

PiperOrigin-RevId: 331124129
2020-09-11 13:30:33 +01:00
ibaker
4691aa8415 Throw RuntimeException instead of Error from ExoHostedTest
Throwing Error forces a test to catch Throwable (e.g.
DashWidevineOfflineTest#widevineOfflineReleasedV22), which will also
catch AssertionError meaning the fail() call at the end of the try block
won't work.

The DashWidevineOfflineTest have been broken since
91185500a1

PiperOrigin-RevId: 331120894
2020-09-11 13:30:24 +01:00
olly
5bd61116a2 Fix incorrect type when creating ExoPlaybackException
PiperOrigin-RevId: 331027732
2020-09-11 13:30:15 +01:00
bachinger
862cf26534 fix typo
PiperOrigin-RevId: 331025924
2020-09-11 13:30:06 +01:00
tonihei
4648a41962 Don't keep 100MB static buffer in test.
This may remove available memory from other tests running in the same
process. Instead, create the huge buffer when needed so it can be GCed
immediately.

PiperOrigin-RevId: 330960844
2020-09-11 13:29:57 +01:00
tonihei
c75077cb9e Release player in e2e playback tests.
Not releasing the player means the playback thread keeps running
and also keeps its entire allocated playback buffer.

PiperOrigin-RevId: 330958821
2020-09-11 13:29:48 +01:00
andrewlewis
a67bebc1c9 Improve DEBUG VideoProgressUpdate logging
PiperOrigin-RevId: 330918689
2020-09-11 13:29:39 +01:00
krocard
52a1c791f7 Introduce audio offload scheduling tests
PiperOrigin-RevId: 330918396
2020-09-11 13:29:29 +01:00
tonihei
4d2a2384d6 Add convenience constructor methods.
When passing in ExtractorFactory instances to SimpleExoPlayer.Builder or
DefaultMediaSourceFactory, we currently need to pass in one other
instance (RenderersFactory or DataSource.Factory), that developers will
often set to its default. To avoid specifying these defaults, these new
convience methods allow to just set the ExtractorsFactory if required.

PiperOrigin-RevId: 330908002
2020-09-11 13:29:02 +01:00
andrewlewis
0266971406 Add a setter for ad error listeners
This is useful because ImaAdsLoader.getAdsLoader() can now return null
(before ads have been requested), and it avoids the app needing to get
an AdsManager to attach its listener.

PiperOrigin-RevId: 330907051
2020-09-11 13:28:51 +01:00
andrewlewis
fdb9bbb619 Remove testutil dependency on Robolectric shadows
Move shadow-related utils for end-to-end tests into core test.

PiperOrigin-RevId: 330902696
2020-09-11 13:28:25 +01:00
olly
268ad81a98 Fix Javadoc for DefaultDataSourceFactory constructors
PiperOrigin-RevId: 330736458
2020-09-11 13:27:53 +01:00
Oliver Woodman
29463cfc4f Set release date 2020-09-09 15:19:07 +01:00
insun
61b253bd5e Fix not to show repeat button when its mode is NONE.
PiperOrigin-RevId: 330627047
2020-09-09 09:45:54 +01:00
olly
49699d398d Make User-Agent optional
PiperOrigin-RevId: 330593247
2020-09-09 09:45:48 +01:00
tonihei
6290d093c1 Support ExtractorFactory in DefaultMediaSourceFactory.
This allows to customize extractor flags more easily when setting up the player.

In addition, we need to provide a way to pass in the ExtractorFactory through
the constructor chain starting in SimpleExoPlayer so that removing the
DefaultExtractorsFactory is possible for R8.

PiperOrigin-RevId: 330472935
2020-09-09 09:45:42 +01:00