6126 Commits

Author SHA1 Message Date
Arnold Szabo
06ed877845 Pass role and accessibility descriptor values from adaptation set to format 2019-02-27 23:53:52 +02: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
aquilescanta
0ceff589b3 HLS Bugfix: Avoid loading initialization segment when reusing extractor
This bug affects any playlist that uses initialization segments. In practice,
almost exclusively fragmented mp4 segmented playlists are affected.

The bottom line is that extractors are chosen for reuse after the
initialization segment connection is open. However, reused extractors
do not need re-parsing the init segment, so loading the initialization is
wasteful.

PiperOrigin-RevId: 234479467
2019-02-18 17:40:48 +00:00
andrewlewis
e97910a694 Fix seek exception unit
PiperOrigin-RevId: 234475237
2019-02-18 17:40:48 +00:00
andrewlewis
5d8e1784b9 Fix MIME type for divx in Matroska
Issue: #3863
PiperOrigin-RevId: 234453728
2019-02-18 17:40:48 +00:00
tonihei
cedfa19988 Prevent using view state and use state saved in fragment instead.
The system may destroy views at any time and may not have created the view
at all. Use the state saved in the fragment to be independant of the existance
of the view.

PiperOrigin-RevId: 234156285
2019-02-18 17:40:48 +00:00
tonihei
c6195dbbaf Handle recreation of TrackSelectionView instances.
TrackSelectionView requires an initialization with a call to init(...).
That's why we shouldn't let the view retain its view hierarchy automatically
as the views won't be backed by data if restored. Instead add a listener
which lets the containing activity/fragment save and restore the state if
needed.

PiperOrigin-RevId: 234152491
2019-02-18 17:40:48 +00:00
bachinger
f9f55ae4d5 improve documentation on how to update queue when asynchronously loading media item assets
Issue #5494

PiperOrigin-RevId: 234138162
2019-02-18 17:40:48 +00:00
andrewlewis
bcadb47a74 Fix typo
PiperOrigin-RevId: 234137695
2019-02-18 17:40:48 +00:00
tonihei
eae09c67e7 Release download helper if new download track selection is started.
PiperOrigin-RevId: 234128521
2019-02-18 17:40:48 +00:00
eguven
b69041bea2 Prevent NullPointerException exceptions in SimpleCache initialization
This is a temporary fix to prevent NullPointerException exceptions.
Though writing to cache will still fail if the cache folder isn't a real
folder.

There are a few thing we can try:
* The listing might be failing because the cache folder is just created.
We can wait and try again.
* If the cache folder is a regular file, we can try deleting and creating
a folder with the same name.

PiperOrigin-RevId: 234121925
2019-02-18 17:40:48 +00:00
aquilescanta
8982da4b75 Support encrypted initialization segment
Defined in RFC 8216 Section 4.3.2.5.

Issue:#5441
PiperOrigin-RevId: 234114119
2019-02-18 17:40:48 +00:00
olly
d61171a100 [libvpx] Reducing the number of buffers for LibVPX in order to avoid OOM crashes.
PiperOrigin-RevId: 234042474
2019-02-18 17:40:48 +00:00
andrewlewis
31911ca54a Drain audio processors on reconfiguration
Previously we would get a new AudioTrack and flush all audio processors if any
AudioProcessor needed to be flushed on reconfiguration. This was problematic for
the case of TrimmingAudioProcessor because it could become active or inactive
due to transitioning to a period with gapless metadata or without it (we don't
keep it active all the time because it is wasteful to populate its end buffer
for content that is not gapless).

This change handles the case where we don't need an AudioTrack but
AudioProcessors do need to be flushed. In this case we drain all the audio
processors when next handling data then switch to the new configuration.

This avoids truncation when period transitions change whether
TrimmingAudioProcessor is active but don't require a new AudioTrack, and is also
a step towards draining the AudioTrack when transitioning between periods if we
do need a new AudioTrack.

To do this, it needs to be possible to drain any pending output data from an
AudioProcessor after it's configured to a new format, so this change makes sure
AudioProcessors allow calling playToEndOfStream and getOutput after
reconfiguration and before flush.

PiperOrigin-RevId: 234033552
2019-02-18 17:40:48 +00:00
andrewlewis
83545fb7b2 Factor out common audio processor functionality
PiperOrigin-RevId: 234025553
2019-02-18 17:40:48 +00:00
andrewlewis
03006f0595 Fix some AudioProcessor nits
- Fix nullness warnings
- Fix annotations
- Make TeeAudioProcessor flush its sink for every format change

PiperOrigin-RevId: 234017068
2019-02-18 17:40:48 +00:00
andrewlewis
3e6cf42f83 Factor out default audio sink configuration
This cleanup is in preparation for draining audio processors on reconfiguration
to a format that doesn't require a new AudioTrack to be created.

PiperOrigin-RevId: 233990983
2019-02-18 17:40:48 +00:00
aquilescanta
12ed18c74c Add encryption information to initialization segments
PiperOrigin-RevId: 233953493
2019-02-18 17:40:48 +00:00
tonihei
1c38b226ea Stop using AlertDialog for TrackSelectionDialog.
AlertDialog owns its view, which causes problems with TabLayout on API 21
and 22. Now using AppCompatDialog instead so that we can own the view
ourselves.

Also:
 - Renamed layout files from download_xyz to track_selection_xyz.
 - Added OK and Cancel buttons to the view.
 - Applied alert dialog style to the "normal" dialog to get a nicer UI.
PiperOrigin-RevId: 233944647
2019-02-18 17:40:48 +00:00
aquilescanta
73d9b2d21a Hide ExoCastPlayer components again
This CL is effectively a rollback of cr/233072247.

PiperOrigin-RevId: 233793032
2019-02-18 17:40:48 +00:00
aquilescanta
5c2aa4bd9e Automated g4 rollback of changelist 233073011.
*** Reason for rollback ***

Pending discussions about cast

*** Original change description ***

Remove default-receiver-related classes from Cast demo app

***

PiperOrigin-RevId: 233790699
2019-02-18 17:40:48 +00:00
aquilescanta
04e6061498 Reduce the number of parameters required to create an HlsMediaChunk
PiperOrigin-RevId: 233765839
2019-02-18 17:40:48 +00:00
aquilescanta
cc153cfca3 Use floating action button in the cast demo app
PiperOrigin-RevId: 233723028
2019-02-18 17:40:48 +00:00
tonihei
ca67c0c2e5 Extend TrackSelectionDialog for usage in PlayerActivity.
We need additional initial selection settings and a configurable title.
The update logic for the track selection parameters moved to a static helper
method in TrackSelectionDialog.

PiperOrigin-RevId: 233713788
2019-02-18 17:40:48 +00:00
olly
d6b6063798 Allow specifying number of decoding threads to libvpx library.
PiperOrigin-RevId: 233653857
2019-02-18 17:40:44 +00:00
tonihei
edabbd52d0 Update Robolectric and Truth.
PiperOrigin-RevId: 233612344
2019-02-18 15:59:32 +00:00
olly
f299a65a33 Fix proguard for external cast extension, disable for internal
PiperOrigin-RevId: 233594542
2019-02-18 15:59:27 +00:00
olly
c7788c18db Fix / cleanup some layout in the Cast demo
PiperOrigin-RevId: 233587404
2019-02-18 15:59:22 +00:00
eguven
5782bbc6e5 Use DownloadState in DownloadManager
PiperOrigin-RevId: 233587184
2019-02-18 15:59:17 +00:00
tonihei
399a963e02 Revert removal of single track option in TrackSelectionView.
PiperOrigin-RevId: 233584155
2019-02-18 15:59:12 +00:00