3314 Commits

Author SHA1 Message Date
olly
5324dc37e3 Support passing custom manifest parsers to Downloaders
Issue: #5978
PiperOrigin-RevId: 315941765
2020-06-12 00:26:08 +01:00
tonihei
73283d495a Add test that asserts correct offsets are used in renderer.
The test uses two items with period-in-window offsets and a non-zero default start position. The test also prepares the first item lazily so
that the start position (and thus the renderer offsets) need to change.
This is arguably the most complicated setup that needs to be tested.

PiperOrigin-RevId: 315903958
2020-06-12 00:26:00 +01:00
krocard
962e08d3be Add Offload gapless support
Confirmed to work on a Pixel 4 after enabling the feature:
 `setprop vendor.audio.offload.gapless.enabled true`

PiperOrigin-RevId: 315889054
2020-06-12 00:25:51 +01:00
tonihei
0b608dd19c Fix order of events in ProgressiveMediaPeriod.
The order of source info refresh and onPrepared was accidentally
changed by ed88f4f1dd. This changes it back to the correct order
and adds a test

PiperOrigin-RevId: 315885164
2020-06-12 00:25:42 +01:00
krocard
2aac0717d7 Propagate format in supportsOutput
It is needed to know if gapless is needed,
as gapless offload might not be supported.

PiperOrigin-RevId: 315877127
2020-06-12 00:25:33 +01:00
christosts
285cce629f Rename DedicatedThreadAsyncMediaCodecAdapter
Rename the DedicatedThreadAsyncMediaCodecAdapter to
AsynchronousMediaCodecAdapter as it is the only asynchronous adapter
implementation left after the clean-up.

PiperOrigin-RevId: 315873431
2020-06-12 00:25:24 +01:00
krocard
e1beb1d194 Expose experimental offload scheduling
Add a new scheduling mode that stops ExoPlayer main loop
when the audio offload buffer is full and resume it when
it has been partially played.

This mode needs to be enabled and dissabled manually by the app
for now.

#exo-offload

PiperOrigin-RevId: 315860373
2020-06-12 00:24:57 +01:00
Oliver Woodman
2fcd759edb Merge pull request #7479 from sravan1213:dev-v2
PiperOrigin-RevId: 315794031
2020-06-11 10:11:30 +01:00
christosts
3ce57ae2e8 Remove dropped MediaCodecAdadpters
Delete the AsynchronousMediaCodecAdapter, the
MultiLockAsyncMediaCodecAdapter and their tests.

PiperOrigin-RevId: 315694296
2020-06-11 10:11:11 +01:00
tonihei
95b61eb835 Split TrackSelection.evalauteQueueSize in discard and cancelation.
The option to cancel ongoing loads as part of the queue size evalation
was added recently. This split out the decision to a new method so that
a TrackSelection implementation can independently cancel loads and
discard upstream data. It also clarifies that evaluateQueueSize will
only be called if there is no ongoing load.

Issue: #2848
PiperOrigin-RevId: 315659735
2020-06-11 10:11:02 +01:00
tonihei
2a9144fa56 Fix loadCompleted flag in MediaChunk implementations.
This flag was always set even if the load was canceled and not completed.

PiperOrigin-RevId: 315659262
2020-06-11 10:10:53 +01:00
andrewlewis
b0457da038 Simplify timestamp tracking
An integer multiple/divide can be removed without loss of precision.

PiperOrigin-RevId: 315653905
2020-06-11 10:10:36 +01:00
kimvde
1f17756ad2 Optimize DefaultExtractorsFactory order using MIME types
PiperOrigin-RevId: 315485985
2020-06-11 10:10:00 +01:00
ibaker
947485e2b7 CEA-608: Position top-of-screen roll-up cues with bottom-line=row
Reasoning and screenshots here:
https://github.com/google/ExoPlayer/issues/7475#issuecomment-640770791

Issue: #7475
PiperOrigin-RevId: 315475888
2020-06-09 16:05:22 +01:00
christosts
d23ca7b11a Set MediaCodec operation mode for audio/video
Add experimental APIs to set the MediaCodecOperationMode separately
for audio and video.

PiperOrigin-RevId: 315467157
2020-06-09 16:05:11 +01:00
samrobinson
83758577e3 Temporary fix for gapless regression for MP3.
PiperOrigin-RevId: 315334491
2020-06-09 16:04:49 +01:00
bachinger
99d805f6a8 Make media item of SinglePeriodTimeline non-null
This change makes the media item argument in any constructors of the SinglePeriodTimeline non-null. Further a dummy media item is created for deprecated constructors using a tag only.

PiperOrigin-RevId: 315283842
2020-06-08 17:41:06 +01:00
aquilescanta
c37af0b543 Make ChunkExtractor return a ChunkIndex instead of a SeekMap
PiperOrigin-RevId: 315283645
2020-06-08 17:40:55 +01:00
ibaker
770df8636a CEA-608: Don't assume roll-up captions are at the bottom of the screen
ANSI/CTA-608-E R-2014 Annex B.5 says:
"The concept of a movable base row for a roll-up caption is new."

It means "new" compared to TC1 and TC2 (released in or before 1985).

Issue: #7475
PiperOrigin-RevId: 315258859
2020-06-08 17:40:44 +01:00
andrewlewis
bc7310240d Suppress repeated logging for invalid MP3 headers
PiperOrigin-RevId: 315243493
2020-06-08 17:40:22 +01:00
samrobinson
680d955851 Adjust input timestamps for the Codec2 MP3 decoder.
Output timestamps are calculated by the codec based on the buffers,
which is offset in Codec2. This adjusts the input timestamps as they
are passed in so they will match the output timestamps produced by
the MediaCodec.

PiperOrigin-RevId: 314963830
2020-06-08 17:40:11 +01:00
sravan1213
c3282c9a37 Propagate download exception through onDownloadChanged callback 2020-06-08 18:51:54 +05:30
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
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
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
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
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
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
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
olly
cf726f0c60 Improve SimpleCacheTest
PiperOrigin-RevId: 313630376
2020-05-29 18:34:19 +01:00
tonihei
37024ae450 Add named constant for group indices.
PiperOrigin-RevId: 313596831
2020-05-29 18:33:52 +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
Oliver Woodman
82e199445a Merge pull request #7422 from noamtamim:bandwidthmeter-5g
PiperOrigin-RevId: 313372995
2020-05-27 19:01:12 +01:00