7268 Commits

Author SHA1 Message Date
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
ybai001
7a924d64f0
Merge pull request #1 from google/dev-v2
Pull from google:dev-v2
2018-12-05 15:07:41 +08: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
olly
f196630863 Remove contentId from Representation creators/constructor
PiperOrigin-RevId: 223796377
2018-12-04 06:02:23 +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
Oliver Woodman
6b0e1758b2
Merge pull request #5164 from google/dev-v2-r2.9.2
r2.9.2
2018-12-01 03:57:39 +00:00
olly
a94fa330f5 Prevent Cea608Decoder from generating Subtitles with null Cues list.
PiperOrigin-RevId: 223580953
2018-12-01 00:12:50 +00:00
olly
c55d95086b 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:11:04 +00: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
olly
d650f8e0e3 Remove ability to inject content-id via DashManifestParser
It doesn't make sense for multi-period manifest

PiperOrigin-RevId: 223537958
2018-12-01 00:08:10 +00:00
olly
a1b8e17ed1 Remove Representation.contentId. It doesn't really make sense.
PiperOrigin-RevId: 223535353
2018-12-01 00:08:05 +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
8ee1af2aea Update release notes for 2.9.2
PiperOrigin-RevId: 223520119
2018-12-01 00:07:54 +00:00
olly
88af944891 Move CachedContentIndex and SimpleCacheSpan tests to robolectric
PiperOrigin-RevId: 223518390
2018-12-01 00:07:48 +00:00
andrewlewis
f8ad6d309e Fix clearkey DRM UUID passed to MediaCrypto
PiperOrigin-RevId: 223324279
2018-11-30 16:30:01 +00:00
andrewlewis
66f7e984ff Specify a version for the FFmpeg dependency
Issue: #5154
PiperOrigin-RevId: 223314749
2018-11-30 16:29:04 +00:00
aquilescanta
9d50a6191e Add missing dot at the end of RELEASENOTES item
PiperOrigin-RevId: 223206504
2018-11-30 16:28:58 +00:00
andrewlewis
6d232f5b2b Replace remaining stbl assertions with warnings
Issue: #5162
PiperOrigin-RevId: 223193019
2018-11-30 16:28:52 +00:00
olly
beae7c9df5 Don't resolve UtcTiming element for static manifests
It doesn't do anything useful in this case.

PiperOrigin-RevId: 223516909
2018-11-30 16:13:52 +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
1093aaf185 Specify a version for the FFmpeg dependency
Issue: #5154
PiperOrigin-RevId: 223314749
2018-11-29 12:35:24 +00:00
aquilescanta
59cf8c1edf Add missing dot at the end of RELEASENOTES item
PiperOrigin-RevId: 223206504
2018-11-29 12:35:18 +00:00
andrewlewis
699fee9727 Replace remaining stbl assertions with warnings
Issue: #5162
PiperOrigin-RevId: 223193019
2018-11-29 12:35:12 +00:00
olly
5134477873 Bump for 2.9.2
PiperOrigin-RevId: 223141203
2018-11-28 11:47:09 +00:00
andrewlewis
15d13bdccd Handle metadata failing to decode in MetadataRenderer
Issue: #5149
PiperOrigin-RevId: 223121651
2018-11-28 11:45:45 +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
017923ed81 Fall back to TYPE_ROTATION_VECTOR if TYPE_GAME_ROTATION_VECTOR unavailable
Issue: #5119
PiperOrigin-RevId: 222978448
2018-11-27 19:50:45 +00:00
olly
38c53298b0 Strip private ID3 data from HLS sample formats
Issue: #5063
PiperOrigin-RevId: 222975020
2018-11-27 19:49:18 +00:00
olly
1e37d31867 Remove spurious VisibleForTesting annotation
It needs to have package visiblity, otherwise nothing can use it.

PiperOrigin-RevId: 222821546
2018-11-27 19:48:21 +00:00
tonihei
d3f4c18401 Provide Cronet request and response data for subclasses.
Subclasses may want to analyze, log and react to the Cronet-specific
connection data.

Issue:#5134
PiperOrigin-RevId: 222809441
2018-11-27 19:47:09 +00:00
olly
0bcce18976 Assume text tracks in protected SmoothStreaming are not protected
Issue: #4838
PiperOrigin-RevId: 222805051
2018-11-27 19:47:00 +00:00
olly
2cab83e6e4 Fix unnecessary media playlist requests when playing live streams
Issue: #5059
PiperOrigin-RevId: 222803511
2018-11-27 19:46:37 +00:00
olly
3a0b127074 Update content url for IMA demo app
The existing one seems to be dead, and isn't https.

PiperOrigin-RevId: 222795996
2018-11-27 19:46:31 +00:00
Oliver Woodman
9c821777a0 Noop fix to WebvttDecoder
We already have tests for comment blocks, and they already
pass because we discard the comment when we fail to parse it
as a cue. We should just skip it directly, however.
2018-11-27 19:46:25 +00:00
olly
327d23c711 Clarify contribution branch
PiperOrigin-RevId: 222632883
2018-11-27 19:46:19 +00:00