9930 Commits

Author SHA1 Message Date
ibaker
e9237bcb0f Bump version to 2.12.3
PiperOrigin-RevId: 351169686
2021-01-11 18:14:57 +00:00
olly
206e46e542 DownloadManagerTest: Address remaining flakiness
#minor-release

PiperOrigin-RevId: 351158541
2021-01-11 18:11:23 +00:00
aquilescanta
ee5423d053 Simplify comment
#minor-release

PiperOrigin-RevId: 351144857
2021-01-11 18:11:16 +00:00
olly
9add3c764e Fix flaky DownloadManager test
PiperOrigin-RevId: 350782940
2021-01-11 16:14:34 +00:00
ibaker
c5df90b1ec Propagate LoadErrorHandlingPolicy to SingleSampleMediaSource.Factory
I think this was missed when integrating DefaultMediaSourceFactory with
SingleSampleMediaSource.Factory in
315ba6f324

Issue: #8430
PiperOrigin-RevId: 350759580
2021-01-11 16:14:34 +00:00
christosts
3db269812a Synchronize initialization of DefaultDownloadIndex
There is a race condition when initializing the downloads database. The
constructor of the DownloadManager kicks-off the database initialization
in its internal thread, but at the same time an app can try to access
the database directly through the manager's download index, e.g. doing

DonwloadManager manager = new ...
manager.getDownloadIndex().getDownload("id");

might enter DefaultDownloadIndex.ensureInitialized() from two threads.
When upgrading the downloads table from version 2 to version 3, the
first thread that enters the database transaction in ensureInitialized()
will drop and recreate the table using the v3 schema. Then, the second
thread will attempt to read from the newly created table using the v2
schema, which will fail.

This race condition was not introduced in 2.12 but was there already.
However, prior to 2.12, the code only dropped and re-created and the
table and did not attempt to read any data. Hence, if the race condition
happened, the code would drop and create the table twice, but no error
would occur.

Issue: #8420
#minor-release
PiperOrigin-RevId: 350745463
2021-01-11 16:14:34 +00:00
krocard
6b8927962c Enable setOutputSurface workaround for Xiaomi Mi Box S
Reported by https://github.com/google/ExoPlayer/issues/8329.

PiperOrigin-RevId: 350547523
2021-01-11 16:14:34 +00:00
olly
edc5b83929 Fix DownloadManager assertion failure
Issue: #8419
PiperOrigin-RevId: 350134719
2021-01-11 16:14:34 +00:00
olly
ca287ba562 Fix bypass mode when the stream is empty
Issue: #8374
PiperOrigin-RevId: 348792965
2021-01-11 16:14:34 +00:00
olly
858fa26e3a Force PlayReady license URL
The media specifies a URL that uses http rather than https, which the
demo app doesn't permit by default. The URL here is the same except it
uses https instead.

#minor-release

PiperOrigin-RevId: 348445571
2021-01-11 16:14:34 +00:00
Oliver Woodman
2b8cfcf2ec Merge pull request #8357 from TiVo:p-fix-cea708anchor
PiperOrigin-RevId: 348440799
2021-01-11 16:14:34 +00:00
krocard
011342f4cf Explicitly fail playback if new format has no sampleMimeType
This avoids a NullPointerException later when the format is used.

Fixes https://github.com/google/ExoPlayer/issues/8283.

PiperOrigin-RevId: 348017149
2021-01-11 16:14:34 +00:00
christosts
c22fd76b6b HlsPlaylistParser: ignore subtitles without URI
Issue: #8323
PiperOrigin-RevId: 347827615
2021-01-11 16:14:34 +00:00
ibaker
d0e6dec199 Fix EPI.seekTo to balance operation acks when seeking during an ad
This regression was introduced in
b1e9257de1

Issue: #8349

PiperOrigin-RevId: 347802049
2021-01-11 16:14:34 +00:00
andrewlewis
ffa746f390 Fix checking imaAdMediaInfo nullness
It's intended to log a warning in this case, rather than throw.

Issue: #8290

PiperOrigin-RevId: 347790527
2021-01-11 16:14:34 +00:00
krocard
125de92989 Clarify EventLogger Window log
PiperOrigin-RevId: 347789441
2021-01-11 16:14:34 +00:00
sungsoo
a015b7ec82 Make media2 extension depend on androidx media2 1.1.0
Issue: #8011
PiperOrigin-RevId: 347288689
2021-01-11 16:14:33 +00:00
olly
3a0b1f7da7 Fix UI menu not dismissing on API level 22 and earlier
Issue: #8272
PiperOrigin-RevId: 347010412
2021-01-11 16:13:29 +00:00
olly
a028ce8964 Fix missing Javadoc
PiperOrigin-RevId: 346764371
2021-01-11 16:13:28 +00:00
bachinger
fa0cc1e15f Improve javadoc of Window.windowStartTimeMs
PiperOrigin-RevId: 346346359
2021-01-11 16:13:28 +00:00
kimvde
6db6d14b16 Throw ParserException if AAC config is invalid
Issue:#8295
PiperOrigin-RevId: 346064966
2021-01-11 16:13:28 +00:00
aquilescanta
ab6b167ee0 Add iso9 to the list of supported MP4 brands
Issue: #8308
#minor-release
PiperOrigin-RevId: 345707141
2021-01-11 16:13:28 +00:00
ibaker
2195facd85 Gracefully handle null-terminated subtitle content in MKV containers
This was reported for SSA/ASS in PR #8265, but it seems to me the
SubRip part of the Matroska spec is similarly loose, so this change
handles null-terminated strings in both.

PiperOrigin-RevId: 345452667
2021-01-11 16:13:07 +00:00
Oliver Woodman
8c935e366c Merge pull request #8154 from samoylenkodmitry:handle_out_of_space
PiperOrigin-RevId: 345428731
2021-01-11 16:12:36 +00:00
andrewlewis
2516e94eb9 Fix SonicAudioProcessor end of stream behavior
The `AudioProcessor` interface requires that no more input is queued after
queueing end of stream, but `DefaultAudioSink` did queue more input and the
implementation of `SonicAudioProcessor` actually relied on this to drain output
at the end of the stream.

Fix this behavior by getting `Sonic` output in `getOutput` and having
`DefaultAudioSink` only queue input to processors that are not draining.

Also add TODOs to clean up audio processor implementations where the code
handles interaction that doesn't conform to the interface.

PiperOrigin-RevId: 345406478
2021-01-11 16:12:36 +00:00
ibaker
35173a016b Add an MKV asset with SSA subtitles for extractor and playback tests
Asset generated using a temporary SSA file and:
```
$ mkvmerge -o sample_with_ssa_subtitles.mkv sample.mkv input.ssa
```

PiperOrigin-RevId: 345217628
2021-01-11 16:12:24 +00:00
Oliver Woodman
495347d3c0 Merge pull request #8215 from TiVo:p-fix-apple-iframe-bug
PiperOrigin-RevId: 345202157
2021-01-08 16:52:25 +00:00
olly
eb38a63e36 Mini release note tweaks
PiperOrigin-RevId: 345036042
2021-01-08 16:52:25 +00:00
andrewlewis
fe754f313e Mask ad media periods before the URI is available
Previously `MediaPeriodQueue` would return null if an ad media URI hadn't
loaded yet, but this meant that the player could be stuck in `STATE_READY` if
an `AdsLoader` unexpectedly didn't provide an ad URI. Fix this behavior by
masking ad media periods. `MaskingMediaPeriod` no longer requires a
`MediaSource` to instantiate it.

This also fixes a specific case where playback gets stuck when using the IMA
extension with an empty ad where the IMA SDK unexpectedly doesn't notify the ad
group fetch error.

Issue: #8205
PiperOrigin-RevId: 344984824
2021-01-08 16:52:25 +00:00
bachinger
d8df5411b8 Fix flaky test
PiperOrigin-RevId: 334801561
2021-01-08 16:46:18 +00:00
Marc Baechinger
107fed9b2a
Make question issue template shorter 2020-12-04 08:53:58 +00:00
Marc Baechinger
506f678edc
Make feature request issue template shorter 2020-12-04 08:53:05 +00:00
Marc Baechinger
962e9d1afc
Make bug issue template shorter 2020-12-04 08:51:59 +00:00
Ian Baker
ffea2a64b3
Merge pull request #8300 from google/dev-v2-r2.12.2
r2.12.2
2020-12-01 15:39:11 +00:00
ibaker
1cb346ee17 Bump version to 2.12.2
PiperOrigin-RevId: 344801462
2020-11-30 16:32:13 +00:00
olly
bcd577ba90 Clean up demo app samples
- Retire YouTube streams. They're flaky (e.g., one of them has transformed into
  an audio only stream!). There is also a desire for us to stop relying on special
  non-expiring YouTube URLs.
- Reorganize the remaining streams.

PiperOrigin-RevId: 344421031
2020-11-30 10:51:27 +00:00
olly
0e4d3162eb SonicAudioProcessor: Fix scaling to account for pending input bytes
PiperOrigin-RevId: 344420436
2020-11-30 10:51:19 +00:00
olly
26aa6f6dbf DefaultAudioSink: Fix transient position calculation errors
PiperOrigin-RevId: 344408351
2020-11-30 10:51:10 +00:00
olly
46396a93e9 Make special exception for cleartext-not-permitted
#exofixit

PiperOrigin-RevId: 344246408
2020-11-30 10:51:03 +00:00
andrewlewis
9bedaca0c7 Fix ad progress updates after rebuffering an ad
Issue: #8239

PiperOrigin-RevId: 344211877
2020-11-30 10:47:22 +00:00
olly
41d6c26904 Improve Player next/previous documentation
#exofixit
Issue: #5602
PiperOrigin-RevId: 344093622
2020-11-30 10:42:44 +00:00
olly
27d8bcf4cb Support enabling next/previous actions in PlayerNotificationManager
The ref'd issue was marked as a doucmentation candidate, but I think
the confusion likely arises from the lack of "next" and "previous" in
the method names. Our other UI components also support enabling each
button individually, so this also brings notifications in line with
those.

Issue: #6491
#exofixit
PiperOrigin-RevId: 344058969
2020-11-30 10:42:06 +00:00
kim-vde
d605b6c766 Merge pull request #8257 from xufuji456:dev-v2
PiperOrigin-RevId: 344057097
2020-11-30 10:41:52 +00:00
christosts
07a8b59a2e Set tag for every track in TrackSelectionView
#minor-release

PiperOrigin-RevId: 344051610
2020-11-30 10:40:03 +00:00
olly
5b51cb7284 Reference IMA language code bug
PiperOrigin-RevId: 343883034
2020-11-30 10:40:02 +00:00
olly
d5829336eb Remove unused logic in SonicAudioProcessor
PiperOrigin-RevId: 343882631
2020-11-30 10:40:02 +00:00
olly
10bc77c15d Localize IMA based on device locale by default
PiperOrigin-RevId: 343871061
2020-11-30 10:39:44 +00:00
ibaker
a04400cfb9 Tweak ParsableByteArray#readLine javadoc
Don't refer to the "system's default charset", just specify UTF-8
explicitly.

PiperOrigin-RevId: 343839878
2020-11-30 10:32:19 +00:00
olly
3a8524d044 Fix ProgressiveDownloader retry logic
RunnableFutureTask is not reusable. Trying to reuse it meant that a
failure in one doWork() call would cause subsequent download() calls
to (a) not block until the runnable has finished executing (does not
apply when using a direct executor), and (b) throw the same failure
as thrown from the first doWork() call.

This could cause #8078 if the initial failure occurred before the
content length was resolved. Retries are not blocked on their work
completing due to (a), and the download would be marked as failed due
to (b). The work itself could then resolve the content length, which
causes the stack trace in this issue.

Issue: #8078
PiperOrigin-RevId: 343498252
2020-11-23 11:08:09 +00:00
olly
f39c40aba3 Re-download failed download in demo app
The demo app has two states for downloads, as per DownloadTracker.isDownloaded.
It's either "downloaded or downloading" (isDownloaded returns true, and the UI
shows a blue tick) or it's "not downloaded or failed (isDownloaded returns
false, and the UI does not show a blue tick).

toggleDownload is out of sync in that it treates "failed" as belonging to the
first state rather than the second. This means tapping on the grey tick in the
UI in this case appears to be a no-op (tapping it again will make something
happen).

This change aligns things by making toggleDownload re-download in the case a
previous download failed. In the future we could consider having three states,
so failed downloads could be disambiguated properly. Unclear whether it's a
good complexity/benefit trade-off for the demo app though!

#minor-release

PiperOrigin-RevId: 343464364
2020-11-23 11:07:57 +00:00