9055 Commits

Author SHA1 Message Date
olly
226583f01c Reintroduce isConnected check for download requirements
PiperOrigin-RevId: 314925639
2020-06-05 15:39:25 +01:00
ibaker
ee0c6224af Respect 33-bit wraparound when calculating WebVTT timestamps in HLS
Issue: #7462
PiperOrigin-RevId: 314919210
2020-06-05 14:48:13 +01:00
krocard
8dedbbbfb4 Introduce an offload option to DefaultRederersFactory
This introduces an option to turn on offload in the
audio sink.

#exo-offload

PiperOrigin-RevId: 314907088
2020-06-05 13:06:15 +01:00
bachinger
97a80ac624 Make ConcatentatingMediaSource provide a dummy media item
PiperOrigin-RevId: 314904897
2020-06-05 13:06:06 +01:00
olly
b874b1d563 Bump version to 2.11.5
PiperOrigin-RevId: 314903986
2020-06-05 13:05:57 +01:00
bachinger
60f907be6d Make FakeTimeline and FakeMediaSource provide a media item
FakeMediaSource and FakeTimeline should put a media item to the window just as other media sources and timelines do. This change provides a fake media item for both of them.

Further the MaskingMediaSource needs to provide a media item for when the real timeline of the masked media source is not available. This can be easily done by using mediaSource.getMediaItem() once available. For now a dummy is used to make ExoPlayerTest run green. This can be easily change to use mediaSource.getMediaSource as soon as this method is defined by the MediaSource interface.

PiperOrigin-RevId: 314897474
2020-06-05 13:05:48 +01:00
olly
08b0e08b69 Fix bug where SilenceMediaSource#getTag was always returning null.
SilenceMediaSource never overloaded MediaSource#getTag, and default behavior is to return null.

PiperOrigin-RevId: 314779832
2020-06-05 13:05:39 +01:00
krocard
1dedd080a4 Remove unnecessary TargetApi
This can hide errors as the lint is pretty smart
to understand SDK level checks.

PiperOrigin-RevId: 314728030
2020-06-05 13:05:29 +01:00
kimvde
12a9351781 Miscellaneous renamings in FilenameUtils
PiperOrigin-RevId: 314723830
2020-06-05 13:05:20 +01:00
ibaker
3474c39c10 Add support for non-contiguous Ogg pages
bear_vorbis_gap.ogg is a copy of bear_vorbis.ogg with 10 garbage bytes
(DE AD BE EF DE AD BE EF DE AD) inserted before the second capture
pattern and 3 garbage bytes inserted at the end (DE AD BE).

Issue: #7230
PiperOrigin-RevId: 314715729
2020-06-04 14:16:40 +01:00
olly
9b5cab0478 Fix more cases of downloads not being resumed
Issue: #7453
PiperOrigin-RevId: 314710328
2020-06-04 14:16:31 +01:00
olly
c77e300249 Clean up debug logging
PiperOrigin-RevId: 314707946
2020-06-04 14:16:22 +01:00
bachinger
fb73a9dfc8 Make media item of Timeline.Window non-null
This change makes the media item of Timeline.Window non-null by providing a fallback media item in window.set(...). After having migrated all media sources this should not be needed anymore, but a fallback makes it more safe than just making the mediaItem argument of window.set(...) non-null (which is done in a following CL in this chain of CLs).

PiperOrigin-RevId: 314527983
2020-06-04 14:16:04 +01:00
kimvde
7c33e2570a Update getFormatFromExtension to take a URI
This allows to handle the last segment retrieval and process the case
where the filename is null in the method.

PiperOrigin-RevId: 314512974
2020-06-04 14:15:55 +01:00
kimvde
7df99381c1 Optimize extractors order using file extension
PiperOrigin-RevId: 314508481
2020-06-04 14:15:45 +01:00
olly
3904f6778a Fix position jank after pausing and seeking
Issue: #6901
PiperOrigin-RevId: 314418536
2020-06-02 23:52:17 +01:00
olly
720f0012a8 AudioTrackPositionTracker: Prevent negative timestamps
Issue: #7456
PiperOrigin-RevId: 314408767
2020-06-02 23:52:08 +01:00
aquilescanta
5b06d89467 Check for section_syntax_indicator in TS tables
Issue:#7325
PiperOrigin-RevId: 314321914
2020-06-02 23:51:59 +01:00
tonihei
7bc5fa855f Don't keep pending preferred queue size during cancelation.
Before loading a new chunk, the player will call reevaluateBuffer
anyway, so we don't have to do this directly after cancelation.

This simplifies some logic because we can remove the pending queue
size variable.

PiperOrigin-RevId: 314313268
2020-06-02 23:51:51 +01:00
olly
ed7db116c0 Finalize release notes for 2.11.5
PiperOrigin-RevId: 314304928
2020-06-02 23:51:42 +01:00
ibaker
9699889569 Assert that a negative extractor sniff never advances the read position
Extractor#sniff() javadoc says:
"If true is returned, the input's reading position may have been
modified. Otherwise, only its peek position may have been modified."
https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/extractor/Extractor.html#sniff-com.google.android.exoplayer2.extractor.ExtractorInput-

PiperOrigin-RevId: 314296922
2020-06-02 23:51:33 +01:00
kimvde
1f80cf1558 Add API to get the format from the file extension
This will allow to use the file extension in DefaultExtractorsFactory.

PiperOrigin-RevId: 314296640
2020-06-02 23:51:24 +01:00
krocard
a5067e6314 Implement offload AudioTrack in DefaultAudioSink.
#exo-offload

PiperOrigin-RevId: 314288300
2020-06-02 23:51:15 +01:00
bachinger
75e54a452a Use identical media item for constructor if possible
If no deprecated methods on the factory is called, the media item instance that is passed to the createMediaSource method must be passed down to the constructor of the media source.

PiperOrigin-RevId: 314193865
2020-06-02 23:51:06 +01:00
olly
2f3c7cb85f Revert pushing download thread interruption into the Downloader implementations
Issue: #5978
PiperOrigin-RevId: 314175257
2020-06-02 23:50:56 +01:00
Ian Baker
8b89a5ed6d Merge pull request #6861 from chrisfillmore:feature/responseBodyForInvalidResponseCodeException_6853
PiperOrigin-RevId: 314105612
2020-06-01 15:00:08 +01:00
andrewlewis
c13be44f68 Add one hour on-demand test video
PiperOrigin-RevId: 314100932
2020-06-01 14:59:56 +01:00
Arnold Szabo
a1ebffd238 Correct tie-breaking rules when selecting fixed video track 2020-05-31 23:40:10 +03:00
olly
f60d5a144f Remove logging that was submitted in error
PiperOrigin-RevId: 313806075
2020-05-29 18:35:10 +01:00
Oliver Woodman
496a315d91 Merge pull request #7395 from jdegroot-dss:add-storage-not-low-requirement
PiperOrigin-RevId: 313804207
2020-05-29 18:34:58 +01:00
olly
235df090fd Support multiple non-overlapping write locks in SimpleCache
Issue: #5978
PiperOrigin-RevId: 313802629
2020-05-29 18:34:47 +01:00
bachinger
52e39cd755 Handle factory attributes consistently
This change applies the same approach of handling tag/streamKeys from factories like in the SmoothStreaming and Hls factories. It is functionally equivalent but improves readability.

PiperOrigin-RevId: 313771318
2020-05-29 18:34:37 +01:00
ibaker
20ace93706 Add a TODO to enforce ParsableByteArray.limit
I was trying to understand why this isn't always checked and didn't
realise there was already a bug tracking this - this way a future
confused reader knows something isn't working quite as intended.

PiperOrigin-RevId: 313765935
2020-05-29 18:34:28 +01:00
olly
cf726f0c60 Improve SimpleCacheTest
PiperOrigin-RevId: 313630376
2020-05-29 18:34:19 +01:00
olly
1cfb68bf68 Change order of RawCcExtractor init to call format before endTracks.
This fixes an issue where the output track's sample format is null for rawCC captions when endTracks method is called.

PiperOrigin-RevId: 313622631
2020-05-29 18:34:10 +01:00
bachinger
0c81022aaa Make HlsMediaSource add the media item to the timeline
PiperOrigin-RevId: 313605791
2020-05-29 18:34:01 +01:00
tonihei
37024ae450 Add named constant for group indices.
PiperOrigin-RevId: 313596831
2020-05-29 18:33:52 +01:00
tonihei
5c52915f0c Don't splice in if segments don't overlap and segments are independent.
If the sample times don't overlap and are independent, splicing makes no
difference because all samples (starting from the first one, which must be
a keyframe) will be appended to the end of the queue anyway.

PiperOrigin-RevId: 313594372
2020-05-29 18:33:43 +01:00
bachinger
a3b721e680 Make SsMediaSource add the media item to the timeline
PiperOrigin-RevId: 313573424
2020-05-29 18:33:34 +01:00
olly
a37374d5a7 Initial (and incomplete) 2.11.5 release notes
PiperOrigin-RevId: 313566474
2020-05-29 18:33:24 +01:00
tonihei
4419a26bbb Use assertThrows in CacheWriterTest.
PiperOrigin-RevId: 313556143
2020-05-29 18:33:15 +01:00
olly
a01fd007cb Change setOutputSurfaceV23 visibility.
PiperOrigin-RevId: 313481722
2020-05-29 18:33:06 +01:00
Joris de Groot
2af9b4b066 Updated documentation 2020-05-28 14:55:02 +02:00
bachinger
f84bd4635a Replace manifest uri without changing the media item
We aim to have the same media item instance published in the timeline that is passed to the createMediaSource(mediaItem) method. This means when the manifest uri is manually replaced by a developer, the media item published in the next timeline update is still the same.

Note: This leads to the fact that the manifest published in that timeline is loaded from a different URI than the URI of the media item in the same timeline.
PiperOrigin-RevId: 313375421
2020-05-27 19:01:22 +01:00
Oliver Woodman
82e199445a Merge pull request #7422 from noamtamim:bandwidthmeter-5g
PiperOrigin-RevId: 313372995
2020-05-27 19:01:12 +01:00
aquilescanta
32c356177f Extract a ChunkExtractor interface
A future implementation will depend on MediaParser.

PiperOrigin-RevId: 313367998
2020-05-27 19:01:02 +01:00
olly
d88f5f47e6 Turn CacheUtil into stateful CacheWriter
- The new CacheWriter is simplified somewhat
- Blocking on PriorityTaskManager.proceed is moved out of
  CacheWriter and into the Downloader tasks. This is because
  we want to shift only the caching parts of the Downloaders
  onto their Executors, whilst keeping the blocking parts on
  the main Downloader threads. Else we can end up "using"
  the Executor threads indefinitely whilst they're blocked.

Issue: #5978
PiperOrigin-RevId: 313222923
2020-05-27 19:00:53 +01:00
ibaker
a1c72c0daf Add .inOrder() to most AnalyticsCollectorTest asserts
I skipped it where it didn't make sense (e.g. singleton lists, or lists
where all elements are identical).

PiperOrigin-RevId: 313217398
2020-05-27 19:00:44 +01:00
krocard
151ea531b1 Make constants more readable with _ separator
Add an `_` in long constants.
Eg: 10000 => 10_000.

I'm proposing this change because I have had multiple
missread due to confusing the number of 0 in a long number.

More specifically, added an underscore to all number matching:
`final.*\ [0-9]{2,}000;`

PiperOrigin-RevId: 313186920
2020-05-27 19:00:36 +01:00
tonihei
45b574d593 Fix flaky test.
The test was flaky because it didn't wait for pending commands to finish
after pausing the test playback.

Also add more debug information to the toString() method because the
expected and actual state only differed in the nextAdGroupIndex in the
flaky case.

PiperOrigin-RevId: 313175919
2020-05-27 19:00:27 +01:00