5989 Commits

Author SHA1 Message Date
olly
d68c861b21 Remove duplicate layout file
PiperOrigin-RevId: 236645446
2019-03-06 17:29:18 +00:00
tonihei
28c7cb3716 Reset period position when resetState=True.
This is more in line with "forgetting all previous state" as documented for
resetState=True. Also only apply the current position as initial seek position
in this case.
PiperOrigin-RevId: 236623630
2019-03-06 17:29:18 +00:00
aquilescanta
7a1b8a9585 Extract method in MediaCodecRenderer
Deduplicates a bit of code

PiperOrigin-RevId: 236621851
2019-03-06 17:29:18 +00:00
tonihei
8fce3ce678 Do not throw in resolveSeekPosition on playback thread.
We currently throw if a pending seek position was valid when the user issued
it on the app thread, but can't be resolved on the playback thread because the
timeline changed in the meantime. Throwing in this case seems wrong as the
user could not have known about the issue (and the seek position was actually
valid). Also, in other cases where the currently playing period is no longer
in the new timeline, we gracefully use a subsequent period or transition to
ENDED state instead of throwing. So it seems more consistent to transition to
ENDED state as well.

PiperOrigin-RevId: 236274862
2019-03-06 17:29:18 +00:00
tonihei
b48ceb19bd Remove unneccessary deprecated constants and classes.
This constants and classes are defined by the same name in the super class and
thus can be safely removed.

PiperOrigin-RevId: 236136197
2019-03-06 17:29:18 +00:00
tonihei
0624046a7b Stop using deprecated method in demo app.
PiperOrigin-RevId: 236133636
2019-03-06 17:29:18 +00:00
tonihei
f87cb81f35 Enable caching in internal demo app.
So far it's only enabled in the external demo app.

PiperOrigin-RevId: 236122825
2019-03-06 17:29:18 +00:00
tonihei
cde6189c14 Repair progressive downloads in DownloadTracker.
They are currently broken because we ignore downloads without periods.
As the DownloadHelper doesn't create periods for progressive media, we don't
download them. Fixing by starting download automatically without showing
track selection dialog.

PiperOrigin-RevId: 236120202
2019-03-06 17:29:18 +00:00
tonihei
84c8842dfa Prevent multiple track selection dialogs in PlayerActivity.
PiperOrigin-RevId: 236119640
2019-03-06 17:29:18 +00:00
tonihei
3eeb3acb3b Remove nullness suppressions.
These were added in an internal clean-up and are better fixed than suppressed.

PiperOrigin-RevId: 236118715
2019-03-06 17:29:18 +00:00
tonihei
84e20216d7 Do not allow deselection of radio button.
Instead just set the currently clicked item as override. If the already
selected button is clicked, the override is reset with the same value.

PiperOrigin-RevId: 236118429
2019-03-06 17:29:18 +00:00
tonihei
0bb123aa4c TrackSelectionView: Use same "isAdaptive" logic in updateViews and onClick.
We currently do not show check boxes if the renderer does not support adaptive
switches between tracks in one group. However, we assume check boxes in the
onClick method.

Use same logic for both methods to be consistent.

PiperOrigin-RevId: 236118372
2019-03-06 17:29:18 +00:00
tonihei
2ae07936ba Handle !resetPosition as initial seek position.
The flag in ExoPlayer.prepare is documented as keeping the current window
index and window position. We are currently using the current period UID and
period position instead. This causes problems when the media source is changed
but the position is not reset.

Using the initial seek position instead ensures we actually use the window
index and position.

Issue:#5520
PiperOrigin-RevId: 236101024
2019-03-06 17:29:18 +00:00
tonihei
377e550d0f Improve new error type documentation and prevent NPE in error listener.
Adding new error types may cause issues when listeners assume a fixed set of
error types and don't handle arbitrary defaults.

Fixing error handling in one case and improving documentation to make people
aware of the issue.

PiperOrigin-RevId: 236093265
2019-03-06 17:29:18 +00:00
tonihei
92a7bb534a Remove wrong documentation.
This is a left-over from the past and is no longer true.

PiperOrigin-RevId: 236089921
2019-03-06 17:29:18 +00:00
olly
b25d2c9978 Adding @SuppressWarnings for the latest stable SDK Q drop
Global Presubmit : https://test.corp.google.com/ui#id=OCL:235456897:BASE:235767406:1551211793273:aa1704f6

LSC doc: go/android-sdk-lsc

PiperOrigin-RevId: 235812819
2019-03-06 17:29:18 +00:00
bachinger
9798fdeade add comments to issue templates which make the bot validate them
PiperOrigin-RevId: 235685393
2019-03-06 17:29:18 +00:00
olly
0645a1838a [libvpx] Allow enabling row multi thread mode decoding in LibVPX
PiperOrigin-RevId: 235576645
2019-03-06 17:29:18 +00:00
olly
8449e7f450 Add stubs for onCreate() and onPostCreate()
PiperOrigin-RevId: 235541545
2019-03-06 17:28:07 +00:00
andrewlewis
8edecd5ccb Update Matroska video codec FourCCs
Issue: #5503
PiperOrigin-RevId: 235523955
2019-03-06 16:55:19 +00:00
andrewlewis
f394697d4a Fix updating rate with codec reuse while disabled
While disabled the renderer does not have non-null stream formats. This means
that setting the operating rate could cause a NullPointerException if there was
a codec for reuse.

Check for being enabled/started before trying to set the operating rate. After
the renderer is enabled it should receive a new input format which will update
the operating rate as needed.

PiperOrigin-RevId: 235494384
2019-03-06 16:55:02 +00:00
andrewlewis
caeaa9574e Avoid draining audio processors while reset
If the DefaultAudioSink was reconfigured in a way that was compatible with the
previous configuration just after having been reset, we would try to drain audio
processors despite not having an AudioTrack. This could result in a
NullPointerException if speed adjustment was active.

Fix this behavior by only trying to drain audio processors if we actually have
an AudioTrack.

PiperOrigin-RevId: 235355466
2019-03-06 16:54:44 +00:00
bachinger
e8077fb3f4 honour shuffle order when publishing queue to media session
Issue #5360

PiperOrigin-RevId: 235196177
2019-03-06 16:54:26 +00:00
aquilescanta
eea1ce3e0a Fix channel count propagation on HLS traditional preparation
PiperOrigin-RevId: 235189983
2019-03-06 16:54:08 +00:00
olly
3e03e71cf9 Start enabling database based SimpleCache indexing
- Expose constructor (package private for now, for tests only)
- Add some tests for cache initialization
- Add some TODOs for handling initialization failure

PiperOrigin-RevId: 235188386
2019-03-06 16:53:51 +00:00
olly
ff7f0304e5 Automated g4 rollback of changelist 235153912.
*** Reason for rollback ***

Breaks ExoPlayer's gradle build

*** Original change description ***

Migrate Mockito Matchers.{hamcrestMethods} to MockitoHamcrest.{hamcrestMethods}

All methods accepting a hamcrest Matcher in org.mockito.Matchers have been changed
to only accept an ArgumentMatcher. The corresponding methods are now available on
MockitoHamcrest.

For more information see http://go/mockito-2-lsc

Tested:
    TAP --sample for global presubmit queue
    http://test/OCL:235033293:BASE:234998256:1550793421835:c2ccbbda

***

PiperOrigin-RevId: 235186705
2019-03-06 16:53:32 +00:00
aquilescanta
6682580ad7 Extract HlsMediaChunk#feedDataToExtractor method
Deduplicates the call to Extractor#read and sorrounding logic.

PiperOrigin-RevId: 235165499
2019-03-06 16:53:15 +00:00
olly
325029d58e Migrate Mockito Matchers.{hamcrestMethods} to MockitoHamcrest.{hamcrestMethods}
All methods accepting a hamcrest Matcher in org.mockito.Matchers have been changed
to only accept an ArgumentMatcher. The corresponding methods are now available on
MockitoHamcrest.

For more information see http://go/mockito-2-lsc

Tested:
    TAP --sample for global presubmit queue
    http://test/OCL:235033293:BASE:234998256:1550793421835:c2ccbbda
PiperOrigin-RevId: 235153912
2019-03-06 16:52:58 +00:00
bachinger
7f9a156323 fix issue templates
PiperOrigin-RevId: 234997641
2019-03-06 16:52:40 +00:00
andrewlewis
8746d4a885 Automated g4 rollback of changelist 230206675.
*** Reason for rollback ***

Reverting as this may break playback on other Amlogic devices and/or playback of non-interlaced content.

*** Original change description ***

Add max video size workaround for Amlogic decoder.

The Amlogic awesome decoder reduces the video size of interlaced videos by half
if the internal configuration isn't force reset with new maximum input size
values. The product of these new values must exceed 1920x1088 to force the
reset.

Issue:#5003

***

PiperOrigin-RevId: 234967314
2019-02-21 11:56:10 +00:00
aquilescanta
6b4c48a329 Replace initLoadCompleted with initDataLoadRequired
PiperOrigin-RevId: 234966936
2019-02-21 11:56:10 +00:00
andrewlewis
253ea78679 Register the overlay view as non-obstructing
Currently IMA determines that the overlay is obstructing, even
if it's empty. Register it as friendly, which means we're
assuming that anything the apps puts in it is necessary for
playback.

PiperOrigin-RevId: 234963065
2019-02-21 11:56:10 +00:00
olly
1450b3713f Suppress warnings emitted by Checker Framework version 2.6.0
PiperOrigin-RevId: 234917536
2019-02-21 11:56:02 +00:00
aquilescanta
e502672b89 Encapsulate the key cache in HlsChunkSource
PiperOrigin-RevId: 234773649
2019-02-20 13:57:01 +00:00
aquilescanta
0d24098c7d Remove lates HLS changes from 2.9.6 release notes
PiperOrigin-RevId: 234765847
2019-02-20 13:56:44 +00:00
aquilescanta
16f41dbaab Fix HlsSampleStream#read non-fatal lack of mapping
HlsSampleStream#read should return end of stream when
there is no mapping for the sample stream, instead of
nothing read. This allows the player to transition to
ended.

Issue:#5524
PiperOrigin-RevId: 234764027
2019-02-20 13:56:26 +00:00
olly
2685b8bd90 Support multiple instances of database features
- Use Cache UID for CacheContentIndex and CacheFileMetadataIndex. This
  enables SD card swapping for a single device.
- I'm hopeful of finding a way to get the Cache UID to DefaultDownloadIndex
  so we can do the same there.

PiperOrigin-RevId: 234662753
2019-02-20 13:56:08 +00:00
bachinger
5b891a4c1f add GitHub issue templates according
PiperOrigin-RevId: 234641428
2019-02-20 13:55:51 +00:00
olly
bfc60e1694 Set vertical orientation by default in TrackSelectionView
Horizontal orientation doesn't make sense. I thought about
overriding the setter to throw something, but it's probably
not worth the extra lines.

PiperOrigin-RevId: 234632530
2019-02-20 13:55:33 +00:00
andrewlewis
b68fda0322 Update release notes to include HLS init segment fix
PiperOrigin-RevId: 234600750
2019-02-19 15:56:54 +00:00
aquilescanta
28434cff4c Support customization of the PlaylistStuckException waiting period
Issue:#5487
PiperOrigin-RevId: 234586819
2019-02-19 15:56:35 +00:00
aquilescanta
a174af0d70 Remove deprecated HLS-related constructors
PiperOrigin-RevId: 234586744
2019-02-19 15:56:17 +00:00
aquilescanta
774c01d020 Make MimeType top level check related methods more robust
Throwing an IllegalArgumentException doesn't help the method signature.

PiperOrigin-RevId: 234579722
2019-02-19 13:23:19 +00:00
andrewlewis
8e7ae9201a Bump version for 2.9.6 release
PiperOrigin-RevId: 234578712
2019-02-19 13:23:19 +00:00
olly
d79735cbc3 Strip unnecessary constant
PiperOrigin-RevId: 234573193
2019-02-19 13:23:19 +00:00
bachinger
44e23fabe6 let apps intercept/handle media button events by using a MediaButtonEventHandler
Issue #5179

PiperOrigin-RevId: 234571837
2019-02-19 13:23:19 +00:00
olly
0622afe170 Migrate to androidx
Issue: #5489
PiperOrigin-RevId: 234507428

Add missing annotation dependency

Issue: #5489
PiperOrigin-RevId: 234566177
2019-02-19 13:22:54 +00:00
andrewlewis
f3bd93394b Fix copybara stripping
PiperOrigin-RevId: 234496529
2019-02-18 18:45:55 +00:00
eguven
03e28d4689 Support stopping/starting single downloads
Also added intent actions to stop/start one or all downloads.

Issue: #4433
Issue: #4860
PiperOrigin-RevId: 234481515
2019-02-18 18:45:49 +00:00
andrewlewis
2b67f2a626 Avoid crashing process on OOM
Catch OutOfMemoryErrors and surface them as unexpected ExoPlaybackExceptions.

PiperOrigin-RevId: 234481140
2019-02-18 17:40:48 +00:00