1692 Commits

Author SHA1 Message Date
andrewlewis
03d6f1370b Add Nexus Player to output surface workaround
PiperOrigin-RevId: 225383173
2018-12-14 15:42:17 +00:00
tonihei
9ed2a393b0 Add FilterableMediaPeriod interface and SmoothStreaming implementation.
This interface allows to put the mapping from tracks to StreamKeys in the same place
where we map manifest to tracks.

PiperOrigin-RevId: 225377033
2018-12-14 15:41:57 +00:00
eguven
383df3f0c3 Add start and update time fields to DownloadState
PiperOrigin-RevId: 225363788
2018-12-14 15:41:37 +00:00
tonihei
36f2bead16 Clarify StreamKey documentation.
StreamKey makes only sense in the context of a specific manifest type and its only
used for manifest filtering.

PiperOrigin-RevId: 225360357
2018-12-14 15:41:28 +00:00
eguven
41f76bdb53 Convert DownloadState id to String
For now this id can not be set by client but auto generated using
content cache key and uri.

PiperOrigin-RevId: 225356645
2018-12-14 15:41:18 +00:00
olly
044066f4b1 Add 4K Bravia to output surface workaroud
PiperOrigin-RevId: 225344232
2018-12-14 15:41:08 +00:00
tonihei
c03b7e32e2 Remove TrackKey and its remaining usages.
This is no longer needed as the public API uses TrackSelection as the way to specify
selected tracks.

PiperOrigin-RevId: 225158867
2018-12-14 15:40:36 +00:00
eguven
8cedfc46fb Add failureReason to DownloadState
PiperOrigin-RevId: 225154121
2018-12-14 15:40:26 +00:00
eguven
4bf42bd2ad Rename TaskState to DownloadState
PiperOrigin-RevId: 225145311
2018-12-14 15:40:16 +00:00
eguven
230a798f23 Create only one task for all DownloadActions for the same content
PiperOrigin-RevId: 225060323
2018-12-14 15:40:06 +00:00
olly
05bfeca50b Enable setOutputSurfaceWorkaround for dangal
Issue: #5169
PiperOrigin-RevId: 225025357
2018-12-14 15:39:53 +00:00
olly
2f365e5a4b Don't write CachedContentIndex to disk on key removal
Issue: #5136
PiperOrigin-RevId: 224857629
2018-12-14 15:39:13 +00:00
tonihei
6a6b211233 Update DownloadHelper constructors and their usage in the demo app.
PiperOrigin-RevId: 224797598
2018-12-10 18:17:52 +00:00
olly
a02dba210c Remove no-longer-true documentation
PiperOrigin-RevId: 224793600
2018-12-10 18:17:52 +00:00
eguven
b23b86d137 Apply EOS flush workaround to stvm8 devices
Issue:#5203
PiperOrigin-RevId: 224726041
2018-12-10 18:17:52 +00:00
eguven
480bb50b54 Add DownloadActionUtil class
PiperOrigin-RevId: 224647076
2018-12-10 18:17:52 +00:00
tonihei
22948f2eda Use TrackSelector in DownloadHelper.
This adds the basic track selection capabilties (including tests).
The new capabilities are not exposed yet through the DownloadHelper implementations
and there will also be more helper methods (e.g. to select multiple audio lanuages at
once).

PiperOrigin-RevId: 224518477
2018-12-10 18:17:52 +00:00
eguven
771aa080f6 Add totalBytes to TaskState
PiperOrigin-RevId: 224506700
2018-12-10 18:17:52 +00:00
eguven
17e8c55425 Extract DownloadThread class from DownloadManager.Task
PiperOrigin-RevId: 224492268
2018-12-10 18:17:52 +00:00
tonihei
c48b77d1ec Use media source tag in dummy timeline.
This is now possible as it's directly accessible from the media source.

Issue:#5177
Issue:#5155
PiperOrigin-RevId: 224321917
2018-12-10 18:17:52 +00:00
tonihei
5776bed190 TrackSelection.Factory clean-up.
We currently have two factory methods where it is completely unclear which one needs
to be overridden.

This change deprecates the old one, adds a Util method to easily map back from the new
to the old behaviour, and updates all implementations of the now deprecated method in
our code.

PiperOrigin-RevId: 224303560
2018-12-10 18:08:50 +00:00
andrewlewis
9a5096ee64 Disable post processing on Nvidia devices
PiperOrigin-RevId: 224291309
2018-12-10 18:08:44 +00:00
Michał Seroczyński
ea2d1f89b7 Blacklist OMX.SEC.mp3.dec and OMX.brcm.audio.mp3.decoder on Samsung devices 2018-12-07 15:49:19 +01:00
Zsolt Matyas
80807534f0 CEA608: Match alignment of consecutive lines in POP-ON mode
[Problem]
As the alignment of each lineas are calculated individually, the
artificially introduced CENTER and RIGHT alignments can be mixed
with each other and with the default LEFT alignment. The mixed results
look worse than just using the original DEFAULT, and the readability
is radically decreased.

[Solution]
Pre-calculate the alignment for each line, and use the leftmost of them
for all lines. The intention of caption provider could be different, but
the worst case scenario is that we revert back everything to LEFT
alignment that is the only option in the CEA608 standard so we
show everything at the exact location it is set in the content.
The readability is never worse than the one given by the content
provider.

[Test]
This should influence CEA608 pop-up cations only. (Not roll up).
Test various live channels with this change.
Note: Beginning of commercials tend to have PAINT-ON mode as that
is immediately showing incoming characters, not just at the end
of the line like POP-on mode.
2018-12-05 13:02:16 -08:00
Oliver Woodman
556dd7e9e0 Merge pull request #5187 from BrainCrumbz:feat/get-tag
PiperOrigin-RevId: 224166374
2018-12-05 17:49:07 +00:00
tonihei
b993367a3b Add util method to extract renderer capabilities.
This instantiates the renderers and extract the capabilities. None of the known
renderes incurs any overhead during instantiation.

PiperOrigin-RevId: 224118511
2018-12-05 17:48:58 +00:00
Oliver Woodman
0d79208cd6 Merge pull request #5147 from zsmatyas:dev-v2
PiperOrigin-RevId: 224114911
2018-12-05 17:48:52 +00:00
olly
22a8aa311b Clean up requesting non-media segments in downloader implementations
- Enable GZIP for media playlist + encryption key chunk requests in
  HLS, as we do during playback
- Pass around DataSpecs rather than Uris. This will be needed for if
  we add manifest cacheKey support (which seems like a good idea for
  completeness, if nothing else)

PiperOrigin-RevId: 224057139
2018-12-05 17:48:45 +00:00
olly
f8b85739b1 Fix race condition that could cause downloader not to be canceled
PiperOrigin-RevId: 224048465
2018-12-05 17:48:39 +00:00
olly
5bbe3ae7d6 Cache data with unknown length by default
We currently default to not caching data if the content length
cannot be resolved once the DataSource has been open. The
reason for this is to avoid caching progressive live streams.
By doing this we were accidentally not caching in other places
where caching is possible, such as DASH/SS/HLS segments during
playback if the server doesn't include a Content-Length header.
Also HLS encryption key chunks, which were very unlikely to be
cached during playback because we explicitly set FLAG_ALLOW_GZIP
(which normally stops content length from resolving) without
setting FLAG_ALLOW_CACHING_UNKNOWN_LENGTH.

It seems like a good idea to flip the default at this point,
and explicitly disable caching in the one case where we want
that to happen.

PiperOrigin-RevId: 223994110
2018-12-05 17:48:34 +00:00
tonihei
976a21f139 Add no-op defaults to Video(Audio)RendererEventListener.
This is in line with how Player.EventListener and AnalyticsListener methods are
defined and helps to only implement the callbacks needed.

PiperOrigin-RevId: 223991262
2018-12-05 17:48:28 +00:00
tonihei
8a566fb330 Converge DownloadHelper implementations.
Moving most of the logic to the base DownloaderHelper helps to implement track
selection for downloading in a single place instead of multiple places.

PiperOrigin-RevId: 223964869
2018-12-05 17:48:18 +00:00
olly
8de149eb78 Use custom cache key factory for removal as well as downloading
Issue #5013

PiperOrigin-RevId: 223838303
2018-12-04 06:02:33 +00:00
olly
87a74ee021 Simplify DownloadManager.Task to use external state
PiperOrigin-RevId: 223797364
2018-12-04 06:02:28 +00:00
eguven
500b1faf14 Add Downloader.getTotalBytes() method
PiperOrigin-RevId: 223787832
2018-12-04 06:02:18 +00:00
tonihei
9f1e32f112 Add experimental flag to AdaptiveTrackSelection.Factory to block fixed track bandwidth
This option to block bandwidth already exists on the AdaptiveTrackSelection itself
but it's not currently possible to forward the total fixed track bandwidth
automatically.

PiperOrigin-RevId: 223785139
2018-12-04 06:02:13 +00:00
olly
24f2cbb215 updateQueuedPeriods(): If known duration changed for a media period, remove all media periods after
PiperOrigin-RevId: 223603915
2018-12-04 06:02:07 +00:00
GiuseppePiscopo
a11a8716ef feat(MediaSource): provide getTag default implementation 2018-12-03 18:24:38 +01:00
GiuseppePiscopo
b278b02816 chore(MediaSource): move getTag after removeEventListener 2018-12-03 18:21:37 +01:00
GiuseppePiscopo
8a359bb1fb feat(MediaSource): client code can get the tag of a MediaSource 2018-12-03 15:17:36 +01:00
olly
ffbb0da893 Prevent Cea608Decoder from generating Subtitles with null Cues list.
PiperOrigin-RevId: 223580953
2018-12-01 00:08:21 +00:00
olly
d98ab35a61 Add several devices to setOutputSurface workaround:
- Asus ZenFone GO (ASUS_X00AD_2)
- Sugar S9 (i9031)
- Redmi Note 3 (kate)

These devices trigger native crashes similar to
https://github.com/google/ExoPlayer/issues/4460

I'm not sure why Asus Zenfone Go (model: ZB500KL, device: ASUS_X00AD_2) was removed here
73af056da3

PiperOrigin-RevId: 223580393
2018-12-01 00:08:16 +00:00
tonihei
8ffef3d632 Add clarification to TextOutput doc.
The list may be empty if no cues are available.

PiperOrigin-RevId: 223527105
2018-12-01 00:07:59 +00:00
olly
88af944891 Move CachedContentIndex and SimpleCacheSpan tests to robolectric
PiperOrigin-RevId: 223518390
2018-12-01 00:07:48 +00:00
tonihei
ea483f8c8e Fix some potential Uri nullness violations.
PiperOrigin-RevId: 223476569
2018-11-30 16:13:42 +00:00
andrewlewis
282cf303a4 Fix clearkey DRM UUID passed to MediaCrypto
PiperOrigin-RevId: 223324279
2018-11-29 12:35:30 +00:00
andrewlewis
699fee9727 Replace remaining stbl assertions with warnings
Issue: #5162
PiperOrigin-RevId: 223193019
2018-11-29 12:35:12 +00:00
olly
f45943b4fb Bump for 2.9.2
PiperOrigin-RevId: 223141203
2018-11-28 11:44:41 +00:00
andrewlewis
510749fa15 Handle metadata failing to decode in MetadataRenderer
Issue: #5149
PiperOrigin-RevId: 223121651
2018-11-28 09:32:17 +00:00
olly
1ce33362c9 Strip private ID3 data from HLS sample formats
Issue: #5063
PiperOrigin-RevId: 222975020
2018-11-27 15:45:58 +00:00