5708 Commits

Author SHA1 Message Date
tonihei
ee14b1fa40 Add test for SsMediaPeriod.getStreamKeys
PiperOrigin-RevId: 225811310
2018-12-18 19:45:29 +00:00
aquilescanta
8202cb2d2a Mitigate the need for FLAG_ALLOW_NON_IDR_KEYFRAMES
Use random access indicator in transport streams

Issue:#1967
Issue:#2020
Issue:#2182
Issue:#2469
Issue:#2581
Issue:#2748
Issue:#2939
Issue:#2979
Issue:#3316
Issue:#3574
Issue:#3709
Issue:#3747
Issue:#4103
Issue:#4184
Issue:#4355
Issue:#4538
Issue:#4719
Issue:#4861
Issue:#4925
Issue:#4951
Issue:#5108
Issue:#5186
PiperOrigin-RevId: 225798044
2018-12-18 19:45:18 +00:00
olly
d5e53d11f7 Add Player.MetadataComponent for completeness
PiperOrigin-RevId: 225795581
2018-12-18 19:45:06 +00:00
eguven
9198e4cf7a Make RequirementsWatcher notify listener on not met requirements change
PiperOrigin-RevId: 225557638
2018-12-18 19:44:53 +00:00
eguven
28dca0b339 Add method to Requirements to get not met requirements
PiperOrigin-RevId: 225549778
2018-12-18 19:44:43 +00:00
tonihei
1a3d735bc3 Add assertion helper to verify MediaSource/TrackGroups/TrackSelection/StreamKey cycle.
This is useful to write integration tests for MediaSources which check that the
stream keys returned by getStreamKeys are compatible with the respective manifest
parser.

PiperOrigin-RevId: 225542606
2018-12-18 19:44:32 +00:00
Oliver Woodman
254589cbe8 Merge pull request #5066 from szaboa:feature/1583_support_png_ttml
PiperOrigin-RevId: 225531695
2018-12-14 15:42:57 +00:00
olly
bbf222854a Remove unused interface method
PiperOrigin-RevId: 225528632
2018-12-14 15:42:45 +00:00
tonihei
173ddd6ee7 Add simplified adaptive media source stream key filter to factory classes.
This change only simplifies the API by using the ManifestParser internally.

PiperOrigin-RevId: 225516193
2018-12-14 15:42:36 +00:00
olly
845f54a467 Remove Cache.[get|set]ContentLength
Problem: There is nothing in the Cache interface that enforces that
these methods are implemented by reading/writing content metadata,
however our own code (CacheDataSource) relies on this property since
it mixes use of [get|set]ContentLength and use of metadata. Using
metadata is the right approach because it minimizes the number of
index writes (e.g. it allows the redirect URI and the content length
to be committed by a single write).

Solution: Remove [get|set]ContentLength, which are redundant anyway,
and use metadata everywhere. Also expose the keys being used through
the public API; there's no particular reason why they shouldn't be.
We previously had an API for getting and setting content length, but
no API for getting and setting redirect uri.
PiperOrigin-RevId: 225383211
2018-12-14 15:42:26 +00:00
andrewlewis
03d6f1370b Add Nexus Player to output surface workaround
PiperOrigin-RevId: 225383173
2018-12-14 15:42:17 +00:00
olly
c2c5e560e9 Add missing ..
PiperOrigin-RevId: 225379305
2018-12-14 15:42:07 +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
olly
9c4258fef9 Clarify that the shutter can prevent flicker
PiperOrigin-RevId: 225374071
2018-12-14 15:41:47 +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
Oliver Woodman
3bfe103b82 Merge pull request #5245 from natario1:videosize-override
PiperOrigin-RevId: 225187852
2018-12-14 15:40:57 +00:00
olly
7d21154b62 Fix release notes
PiperOrigin-RevId: 225170404
2018-12-14 15:40:46 +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
tonihei
defbd04675 Update StartDownloadDialogHelper to use TrackSelectionView.
This is now possible as the download helper uses a track selector.

PiperOrigin-RevId: 225014517
2018-12-14 15:39:43 +00:00
tonihei
8d137c2e61 Fix manifest uri in SsDownloadHelper.
This is the same as in SsMediaSource.

PiperOrigin-RevId: 225001911
2018-12-14 15:39:33 +00:00
tonihei
272a5e59f2 Use download icon instead of play icon for download notification.
PiperOrigin-RevId: 225001681
2018-12-14 15:39:24 +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
Mattia Iavarone
c819856530 Add protected method to override the AspectRatioFrameLayout aspect ratio 2018-12-12 11:48:42 +01: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
aquilescanta
73da205279 Add receiver flavor to CastDemo
PiperOrigin-RevId: 224310086
2018-12-10 18:17:41 +00:00
aquilescanta
891961d5e1 Revert usage of MediaItems for Cast demo sample list
PiperOrigin-RevId: 224308973
2018-12-10 18:08:56 +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
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