10753 Commits

Author SHA1 Message Date
tonihei
20df512c74 Use Clock to create Handler in ExoPlayerImpl.
This is needed to ensure the Handler is goverened by the clock.

PiperOrigin-RevId: 353020654
2021-01-22 16:21:52 +00:00
tonihei
4cbd4e2e2a Use Clock to create Handler for delivering messages.
This ensures the message devilery is governed by the clock.

Also replace setting a Handler with a Looper to facilititate this
change.

PiperOrigin-RevId: 353019729
2021-01-22 16:21:44 +00:00
krocard
a10e9de484 Check that cache dir exist
Not checking it would force ExoPlayer to use the
global tmp dir which would expose it to
external file replacement attacks.

This is a theoretical vulnerability as this code is
only use in tests and cache dir always exist in the
AOSP android implementation.

PiperOrigin-RevId: 353013929
2021-01-22 16:21:35 +00:00
tonihei
d1faf713af Use Clock to create Handler in ListenerSet.
This ensures the Handler is governed by this clock.

PiperOrigin-RevId: 353011555
2021-01-22 16:21:27 +00:00
andrewlewis
f2057156d1 Time out ad preloading for initial seek
The IMA SDK currently notifies `CONTENT_RESUME_REQUESTED` then
`CONTENT_PAUSE_REQUESTED` quickly afterwards when playing an ad for an initial
seek. This triggered the logic to skip VPAID ads added for Issue: #7832,
causing the ad to be skipped.

This change reverts the fix for that issue and extends the ad preload timeout
logic to cover the case of an initial seek as well. Incompatible VPAID ads will
still be skipped but only after the preload delay (this seems fine given that
they are documented not to be supported, and we are just making the failure
mode less bad on a best-effort basis!).

Issue: #8428
Issue: #7832
PiperOrigin-RevId: 353011270
2021-01-22 16:21:18 +00:00
krocard
efcaee563a Move TrackGroup and TrackGroupArray in common
This is a dependency of TrackSelection and Player.

#player-to-common

PiperOrigin-RevId: 353004379
2021-01-22 16:21:10 +00:00
andrewlewis
437c6d5dd8 Move audio retry release note to the right place
PiperOrigin-RevId: 352976712
2021-01-22 16:21:01 +00:00
olly
b460124c33 Setup ShadowMediaCodecConfig for SilencePlaybackTest
Codecs are not used by this test because PCM uses codec bypass,
but performing the setup is still necessary to have the test
verify that this is indeed the case!

PiperOrigin-RevId: 352965739
2021-01-22 16:20:53 +00:00
tonihei
737630740c Add WAV playback tests.
The output dumps are intentionally empty because the playback
is using bypass modes.

Still adding a AUDIO_RAW decoder to the ShadowMediaCodecConfig to
ensure that we would output samples if bypass mode were disabled.

PiperOrigin-RevId: 352794959
2021-01-22 16:20:44 +00:00
kim-vde
26ea43d21f Merge pull request #8415 from TiVo:p-fix-cea708anchor
PiperOrigin-RevId: 352783091
2021-01-22 16:20:34 +00:00
aquilescanta
2d3e6d4dba Test SampleQueue.peek
PiperOrigin-RevId: 352781639
2021-01-22 16:20:24 +00:00
aquilescanta
4eaa6111c1 Add SampleQueue.peek
PiperOrigin-RevId: 352779870
2021-01-22 16:20:15 +00:00
Arnold Szabo
0ead2af22c Add support for SSA (V4+) PrimaryColour style 2021-01-21 22:45:07 +01:00
Andrew Lewis
03263db378 Remove stray release note 2021-01-21 11:49:20 +00:00
Oliver Woodman
c40d1c6620 Merge pull request #8462 from zeninsta:advertise-vp9-profile
PiperOrigin-RevId: 352611965
2021-01-19 19:24:16 +00:00
ibaker
b2a42ea157 Rename MediaSourceDrmHelper to DefaultDrmSessionManagerProvider
Also move it to the `drm` package, and extract a
`DrmSessionManagerProvider` interface.

I'll add `MediaSourceFactory.setDrmSessionProvider()` in a follow-up
change.

Issue: #8466
PiperOrigin-RevId: 352582559
2021-01-19 19:24:06 +00:00
ibaker
3069251bd0 Add gzip support to WebServerDispatcher
Add a test to DataSourceContractTest that asserts the gzip flag is
either ignored or handled correctly.

Add a test resource to DefaultHttpDataSourceContracTest that enables
gzip compression on the 'server' and checks it's handled correctly by
the client.

PiperOrigin-RevId: 352574359
2021-01-19 19:23:57 +00:00
ibaker
dd1b1c0837 Fix nullness warnings in DefaultDrmSessionManagerTest
These only show up in Android Studio, but still seem worth fixing.

PiperOrigin-RevId: 352570399
2021-01-19 19:23:48 +00:00
christosts
21f3fa9f7c Add contract test for DataSchemeDataSource
PiperOrigin-RevId: 352558063
2021-01-19 19:23:40 +00:00
christosts
c808751009 Add contract tests for OkHttpDataSource
PiperOrigin-RevId: 352554949
2021-01-19 19:23:31 +00:00
andrewlewis
60f000c8b1 Remove incorrect TODOs
PiperOrigin-RevId: 352552961
2021-01-19 19:23:23 +00:00
krocard
dc1842efb9 Convert back code to link
The code is no longer in common so can directly link to Player.

PiperOrigin-RevId: 352548323
2021-01-19 19:23:14 +00:00
christosts
0b2bc60b1a Add contract test for AssetDataSource
PiperOrigin-RevId: 352532853
2021-01-19 19:23:05 +00:00
christosts
f1506970aa Add contract test for ByteArrayDataSource
PiperOrigin-RevId: 352530806
2021-01-19 19:22:56 +00:00
ibaker
fc952bfba2 Annotate log methods with @Pure
PiperOrigin-RevId: 352519583
2021-01-19 19:22:47 +00:00
Oliver Woodman
0c22810a7b Merge pull request #8459 from WonderzGmbH:fix/8253-cache-exception
PiperOrigin-RevId: 352450607
2021-01-18 22:00:46 +00:00
andrewlewis
981826555c Add support for playing JPEG motion photos
PiperOrigin-RevId: 352413375
2021-01-18 22:00:36 +00:00
olly
4359016145 Fix disabling of bypass
PiperOrigin-RevId: 352403189
2021-01-18 22:00:28 +00:00
samrobinson
1be4960464 Implement a segment based speed provider and interface.
PiperOrigin-RevId: 352401836
2021-01-18 22:00:19 +00:00
samrobinson
dedf60713d Enforce stricter SlowMotionData and Segment initialisation checks.
PiperOrigin-RevId: 352389366
2021-01-18 22:00:11 +00:00
ibaker
4cfb3aff8f Drop responses in DefaultDrmSession if the session has been released
This prevents trying to post the response to possibly dead threads,
which causes an IllegalStateException to be logged.

Issue: #8328
PiperOrigin-RevId: 352388155
2021-01-18 22:00:03 +00:00
christosts
61cf97a0c0 Add contract test for CacheDataSource
PiperOrigin-RevId: 352385310
2021-01-18 21:59:54 +00:00
olly
8d61f5409e Fix VideoDecoderOutputBuffer release note
PiperOrigin-RevId: 352380717
2021-01-18 21:59:45 +00:00
Oliver Woodman
1095f5fc3e Merge pull request #8437 from equeim:interlaced
PiperOrigin-RevId: 352357712
2021-01-18 21:59:35 +00:00
aquilescanta
08132656c9 Make SampleDataQueue methods that read data static
Non-functional change which makes it easier to read sample data without altering
the read position.

PiperOrigin-RevId: 352323477
2021-01-18 21:59:24 +00:00
Zen Xu
2bb93be17b format 2021-01-18 03:19:38 -08:00
Zen Xu
24db0859c3 fix level const etc 2021-01-18 02:11:58 -08:00
kimvde
9faa393a15 Handle sample size mismatch in MP4 extractors
#minor-release

PiperOrigin-RevId: 352016698
2021-01-17 21:51:30 +00:00
andrewlewis
e869d5dbf9 Update requested content position for ads on seek
PiperOrigin-RevId: 352011053
2021-01-17 21:51:21 +00:00
christosts
d4a84b88b5 Remove deprecated method setMinLoadableRetryCount().
Remove setMinLoadableRetryCount() from SingleSampleMediaSource,
DashMediaSource, HlsMediaSource and SsMediaSource factories.

PiperOrigin-RevId: 352008657
2021-01-17 21:51:13 +00:00
tonihei
68fd23a967 Add option to set preferred audio role flags in DefaultTrackSelector
We already have the eequivalent option for text tracks.

PiperOrigin-RevId: 351999287
2021-01-17 21:51:04 +00:00
andrewlewis
d2950c2e97 Update opus repository location
The new URL is referenced from https://xiph.org/downloads/. The old
URL currently times out.

#minor-release

PiperOrigin-RevId: 351991077
2021-01-17 21:50:55 +00:00
andrewlewis
48dd20ce3a Follow symlinks in opus build
This is not necessary when following the README.md but it is required if
libopus is under a symlink (and won't do any harm if it's not symlinked).

PiperOrigin-RevId: 351985185
2021-01-17 21:50:46 +00:00
christosts
3879a485b7 Remove FixedTrackSelection.Factory
PiperOrigin-RevId: 351978954
2021-01-17 21:50:37 +00:00
samrobinson
4270d97fc5 Decode and encode audio in TransformerAudioRenderer.
There is no speed adjustment or use of sonic, as that will
come in a child CL.

PiperOrigin-RevId: 351973892
2021-01-17 21:50:27 +00:00
Artem Chepurnoy
c1501a3c6a Double-check that the cache directory does not exist and is a directory 2021-01-15 18:30:36 +02:00
ibaker
f076080434 Default SingleSampleMediaSource.treatLoadErrorsAsEndOfStream to true
Issue: #8430
PiperOrigin-RevId: 351971671
2021-01-15 10:58:08 +00:00
jaewan
77a559640b Remove workaround for media1 session's looper restriction
PiperOrigin-RevId: 351936232
2021-01-15 10:57:57 +00:00
olly
464f53373a Remove deprecated debug listener methods from SimpleExoPlayer
- Once the ability to add debug listeners is removed, analyticsCollector
  is the only component that needs to receive the events. Hence it is
  called directly.
- It seemed less confusing to do the same thing for (non-debug) video and
  audio events, and to have AnalyticsCollector no longer implement
  VideoListener and AudioListener directly. This clears up confusion that
  arises as a result of the debug and non-debug interfaces defining the
  same methods in some cases, and having to be careful not to end up
  calling the corresponding AnalyticsCollector method twice.

PiperOrigin-RevId: 351835491
2021-01-15 10:57:47 +00:00
christosts
fa94fba2cb Remove ExtractorMediaSource.setMinLoadableRetryCount()
PiperOrigin-RevId: 351815772
2021-01-15 10:57:37 +00:00