5575 Commits

Author SHA1 Message Date
ibaker
1c0e69789f Clear existing Spans when applying CSS styles in WebvttCueParser
Relying on the precedence of spans seems risky - I can't find it
defined anywhere. It might have changed in Android 6.0?
https://stackoverflow.com/q/34631851

PiperOrigin-RevId: 287989365
2020-01-06 14:54:35 +00:00
kimvde
f76b4fe63e Add unit tests to FLAC extractor related classes
PiperOrigin-RevId: 287973192
2020-01-06 14:54:26 +00:00
andrewlewis
b5fa338367 Show ad markers after the window duration
Issue: #6552
PiperOrigin-RevId: 287964221
2020-01-06 14:54:16 +00:00
ybai001
a67394b230 Optimize AC-4 code and add related test cases
-- Optimize Mp4Extractor for AC-4
-- Optimize FragmentedMp4Extractor for AC-4
-- Add test case for AC-4 in MP4
-- Add test case for AC-4 in Fragmented MP4
2020-01-06 15:21:43 +08:00
olly
826083db92 Add support for IMA ADPCM in WAV
PiperOrigin-RevId: 287854701
2020-01-02 19:24:31 +00:00
olly
f0e0ee421f Support twos codec in MP4
Issue: #5789
PiperOrigin-RevId: 287828559
2020-01-02 19:24:23 +00:00
olly
2380f937f3 Document overriding of drawables for PlayerControlView
Issue: #6779
PiperOrigin-RevId: 287828273
2020-01-02 19:24:15 +00:00
olly
a3bad3680b Document overriding drawables for notifications
Issue: #6266
PiperOrigin-RevId: 287821640
2020-01-02 19:24:07 +00:00
andrewlewis
cafffcb812 Fix handling of E-AC-3 streams with AC-3 frames
Issue: #6602
PiperOrigin-RevId: 287816831
2020-01-02 19:23:58 +00:00
olly
77f01da660 Don't use WavHeader.averageBytesPerSecond
It's unreliable for at least one IMA ADPCM file I've found.
Calculating the blockIndex to seek to using exact properties
also seems more robust.

Note this doesn't change anything for the existing PCM test,
since averageBytesPerSecond is set correctly. It does make
a difference for an upcoming IMA ADPCM test though.

PiperOrigin-RevId: 287814947
2020-01-02 19:23:50 +00:00
andrewlewis
fefb1a17a0 Fix typos
PiperOrigin-RevId: 287810018
2020-01-02 19:23:42 +00:00
tonihei
b77717ce91 Remove buffer size based adaptation.
An experiment with this algorithm didn't show positive results. We can
therefore keep the simpler default algorithm.

Startblock:
  <unknown commit> is submitted
PiperOrigin-RevId: 287807538
2020-01-02 19:23:34 +00:00
andrewlewis
035cb096d9 Mark final field
PiperOrigin-RevId: 287669425
2020-01-02 19:23:20 +00:00
ybai001
cc5e981e89 Add AC-4 DRM Support 2019-12-23 10:49:03 +08:00
olly
24a19264db Fix handling of network transitions in RequirementsWatcher
Issue: #6733
PiperOrigin-RevId: 286621715
2019-12-20 20:42:07 +00:00
olly
f50ed8fd9c Enable blacklisting for HTTP 416
Where media segments are specified using byte ranges, it makes
sense that a server might return 416 (which we don't consider
for blacklisting) if the segment is unavailable, rather than
the 404 (which we do consider for blacklisting) that we expect
when media segments are only specified using a URL.

Issue: #6775
PiperOrigin-RevId: 286620698
2019-12-20 20:41:59 +00:00
ibaker
14a0c9ebfd Add vertical support to WebvttCueParser
PiperOrigin-RevId: 286583957
2019-12-20 16:58:59 +00:00
ibaker
f88fbaf655 Add Cue.verticalType field
Inspired by the `vertical` cue setting in WebVTT:
https://www.w3.org/TR/webvtt1/#webvtt-vertical-text-cue-setting

PiperOrigin-RevId: 286583621
2019-12-20 16:58:50 +00:00
olly
da121a0805 Throw more appropriate exceptions from extractors
PiperOrigin-RevId: 286581465
2019-12-20 16:58:40 +00:00
olly
7bea558b31 Add test case for mdat atom extending beyond the file length
Issue: #6774
PiperOrigin-RevId: 286576383
2019-12-20 16:03:16 +00:00
olly
19fb25101b DefaultDownloadIndex: Clear failure reason when removing download
The Download constructor considers it invalid to have a failure
reason if the download isn't in the failed state. Unfortunately,
calling DefaultDownloadIndex.removeAllDownloads when there's a
failed download will change the state without clearing the reason.
If the downloads are then read back from the DefaultDownloadIndex
we end up violating the Download constructor assertion.

This change clears the failed reason for any existing rows in the
invalid state, and also fixes the root cause that allows invalid
rows to enter the table in the first place.

Issue: #6785
PiperOrigin-RevId: 286576242
2019-12-20 16:03:08 +00:00
olly
8e96188909 Relax MP4 sniffing to allow an atom to extend beyond the file length
Issue: #6774
PiperOrigin-RevId: 286575797
2019-12-20 16:02:59 +00:00
olly
5920305b84 Fix typo
Merge of https://github.com/google/ExoPlayer/pull/6793

PiperOrigin-RevId: 286556008
2019-12-20 12:37:21 +00:00
bachinger
06ffd23cdc make removeMediaItem return void
PiperOrigin-RevId: 286551438
2019-12-20 12:37:13 +00:00
tonihei
8c0f22c99c Add missing @Nullable to MediaCodecAudioRenderer.getMediaClock
Without this @Nullable, potential subclasses can't  override the
method to return null if they don't want to use the renderer as a
media clock.

Issue:#6792
PiperOrigin-RevId: 286545736
2019-12-20 12:37:05 +00:00
olly
0f94ebfb7d Add NonNull at package level for extractor
PiperOrigin-RevId: 286381499
2019-12-19 14:43:26 +00:00
olly
fc4b258c10 Bump to 2.11.1
PiperOrigin-RevId: 286368964
2019-12-19 14:43:18 +00:00
olly
453bd39274 Fix typo in class name
PiperOrigin-RevId: 286225012
2019-12-19 14:43:09 +00:00
ibaker
ed1de000e5 Unwrap all nested IntDef values
This seems to work with R8 but interact badly with ProGuard.

issue:#6771
PiperOrigin-RevId: 286215262
2019-12-18 18:54:44 +00:00
olly
8b0f5b0a86 Some nullness cleanup for extractor.ogg
PiperOrigin-RevId: 286203692
2019-12-18 18:54:36 +00:00
ibaker
65e84811ff Add 'Us' suffix to WebvttCueInfo.{start,end}Time
Clarify that the units used here are microseconds

PiperOrigin-RevId: 286200583
2019-12-18 18:54:20 +00:00
ibaker
8cf4042ddd Move WebvttCueInfo.Builder inside WebvttCueParser
This class is only used to hold temporary data while we parse the
settings and text, so we don't need it outside the Parser class.

Also remove all state from WebvttCueParser - this increases
the number of allocations, but there are already many
and  subtitles generally aren't very frequent (compared to
e.g. video frames).

PiperOrigin-RevId: 286200002
2019-12-18 18:54:11 +00:00
olly
a8d39c1180 Read arrays directly from Parcel
PiperOrigin-RevId: 286197990
2019-12-18 18:54:04 +00:00
olly
821d4fb13a Add NonNull at package level for extractor.mp4
PiperOrigin-RevId: 286191078
2019-12-18 18:53:56 +00:00
christosts
fde59ccd1a Formatting fixes on MediaCodecAdapter
Fixes JavaDoc on MediaCodecAdapter and AsynchronousMediaCodecAdapter
and a field declaration on MediaCodecRenderer.

PiperOrigin-RevId: 286157106
2019-12-18 18:53:40 +00:00
andrewlewis
6c9357ba2f Fix keep rule for VideoDecoderOutputBuffer
PiperOrigin-RevId: 286156361
2019-12-18 18:53:32 +00:00
olly
7219e5a314 Fix nullness annotation on equals methods
PiperOrigin-RevId: 286154938
2019-12-18 18:53:24 +00:00
andrewlewis
9d8a1635c2 Ensure raw resources are kept
R8 does constant folding, so we need to keep buildRawResourceUri
to ensure that resources passed to it are kept.

PiperOrigin-RevId: 286153875
2019-12-18 18:53:16 +00:00
krocard
c111138ac2 Parse MP3 header to retrieve the nb of sample per frames
Add support for MP3 as an encoding format for passthrough.

This change does not change the observable
behavior of Exoplayer.

Also name the magics.

#exo-offload

PiperOrigin-RevId: 286146539
2019-12-18 18:53:08 +00:00
olly
3c56b113e4 Rollback of d48dc4c159
*** Original commit ***

Move getting-stuck-prevention into DefaultLoadControl.

We recently added code that prevents getting stuck if the buffer is low and
the LoadControl refuses to continue loading (b84bde0252).

Move this logic into DefaultLoadControl to keep the workaround, and also apply the
maximum buffer size check in bytes if enabled. ExoPlayerImplInternal will now
throw if a LoadControl lets playback get stuck. This includes the case where
DefaultLoadControl reaches its maximum buffer size and not even a mim...

***

PiperOrigin-RevId: 286071115
2019-12-18 18:52:59 +00:00
bachinger
36fa9d5a43 add top-level playlist API
Design doc: https://docs.google.com/document/d/11h0S91KI5TB3NNZUtsCzg0S7r6nyTnF_tDZZAtmY93g/edit

Issue: #6161, #5155
PiperOrigin-RevId: 286020313
2019-12-18 18:52:51 +00:00
christosts
43bbc172a4 DefaultRenderersFactory can set MediaCodecOperation
Add experimental method on DefaultRenderersFactory to set the
MediaCodecOperationMode on MediaCodecRenderer instances.

PiperOrigin-RevId: 286004667
2019-12-18 18:52:43 +00:00
ibaker
863bf45341 Suppress ProGuard warnings about javax.annotation
These annotations are compile-only - so we don't mind they're not
accessible at runtime.

PiperOrigin-RevId: 285993063
2019-12-18 18:52:35 +00:00
olly
7a4b35b59f Retain AV1 constructor for DefaultRenderersFactory
Issue: #6773
PiperOrigin-RevId: 285990377
2019-12-18 18:52:27 +00:00
tonihei
d48dc4c159 Move getting-stuck-prevention into DefaultLoadControl.
We recently added code that prevents getting stuck if the buffer is low and
the LoadControl refuses to continue loading (b84bde0252).

Move this logic into DefaultLoadControl to keep the workaround, and also apply the
maximum buffer size check in bytes if enabled. ExoPlayerImplInternal will now
throw if a LoadControl lets playback get stuck. This includes the case where
DefaultLoadControl reaches its maximum buffer size and not even a mimimal buffer
duration.

PiperOrigin-RevId: 285979989
2019-12-18 18:52:19 +00:00
tonihei
021291b38f Add server-client time offset to Window.
This offset allows to improve the calculated live offset because it
can take known client-server time offsets into account.

PiperOrigin-RevId: 285970738
2019-12-18 18:52:11 +00:00
ibaker
a035c2e20a Reformat some javadoc on Cue
PiperOrigin-RevId: 285964228
2019-12-18 18:52:03 +00:00
olly
dfc15733d2 Add NonNull annotations to the most extractor packages
PiperOrigin-RevId: 285961788
2019-12-18 18:51:55 +00:00
ibaker
f10bc37831 Migrate usages of Cue's bitmap constructor to Cue.Builder
PiperOrigin-RevId: 285956436
2019-12-18 18:51:47 +00:00
ibaker
04b1782a53 Add a Cue.Builder
I want to add fields related to vertical text support, and neither
adding another constructor nor updating all call-sites of existing
constructors seemed like attractive propositions.

PiperOrigin-RevId: 285956024
2019-12-18 18:51:39 +00:00