5790 Commits

Author SHA1 Message Date
andrewlewis
440824ae5c Fix replacement char check
PiperOrigin-RevId: 227646358
2019-01-08 07:33:01 +00:00
olly
0ed7ddecd7 Reduce the number of cache files
- Increase the default cache file size to 5MB
- Recommended a minimum cache file size of 2MB to discourage
  applications from specifying values small enough such that
  unreasonably large numbers of cache files are generated
- Allow maxCacheFileSize=C.LENGTH_UNSET, equivalent to setting it
  to MAX_VALUE. This is just for API consistency with other APIs
  we have that accept LENGTH_UNSET

Issue: #4253
PiperOrigin-RevId: 227524233
2019-01-08 07:32:51 +00:00
olly
ae65bcecd4 Move syncFileDescriptor to use an experimental method
PiperOrigin-RevId: 227520168
2019-01-08 07:32:41 +00:00
andrewlewis
1e99224019 Remove AdsLoader listeners on releasing ImaAdsLoader
Issue: #4114
PiperOrigin-RevId: 227516509
2019-01-08 07:32:31 +00:00
olly
3a9557c72f Don't pass maxCacheFileSize to CacheEvictor if real size is unknown
CacheEvictor.onStartFile currently receives a length, which is the
maximum size of the content that might be written. The LRU cache
evictor will make sure there's sufficient space for the specified
size. If the actual size of the content is unknown, CacheDataSink
passes maxCacheFileSize.

The current behavior isn't ideal. It seems valid for a developer to
specify maxCacheFileSize=Long.MAX_VALUE if they don't want any
file fragmentation in the cache. However if they then attempt to
cache something with unknown length, LRU cache will try and make
room for content of length Long.MAX_VALUE, and end up evicting the
entire cache to do so.

This change alters the logic so a length is only passed if the
actual size of the content is known. In other cases C.LENGTH_UNSET
is now passed. The LRU evictor will not evict until after the file
is committed. Note a custom LRU evictor could still opt to evict to
ensure some application specified amount of space, if that's the
desired behavior.

PiperOrigin-RevId: 227509525
2019-01-08 07:32:21 +00:00
olly
243b12f37e Remove stray word
PiperOrigin-RevId: 227500707
2019-01-08 07:32:10 +00:00
andrewlewis
fc6a1ea522 Handle rectangular rotation projections in Matroska
See also https://github.com/Matroska-Org/matroska-specification/issues/269.

PiperOrigin-RevId: 226758584
2019-01-08 07:31:59 +00:00
tonihei
9728ac54ba Improve doc for setKeepContentOnPlayerReset.
This also applies when seeking or transitioning to unprepared media, which
isn't clear from the current documentation.

Issue:#5267
PiperOrigin-RevId: 226486685
2019-01-08 07:31:49 +00:00
eguven
3c0107752a Add STOPPED state to DownloadManager
PiperOrigin-RevId: 226460891
2019-01-08 07:31:39 +00:00
olly
173f36897b Update release notes
PiperOrigin-RevId: 226459209
2019-01-08 07:31:28 +00:00
olly
f4d741a565 Bump for 2.9.3
PiperOrigin-RevId: 226356810
2018-12-20 21:14:04 +00:00
olly
a16f4aec90 Fix out of data Javadoc
PiperOrigin-RevId: 226356758
2018-12-20 21:13:52 +00:00
andrewlewis
d3ecbf75b2 Fix buffer size for renderers with TRACK_TYPE_NONE
This includes NoSampleRenderers.

PiperOrigin-RevId: 226323693
2018-12-20 21:13:42 +00:00
andrewlewis
bad8ec5952 Relax audio decoder capability checks
Issue: #5145
PiperOrigin-RevId: 226297129
2018-12-20 12:44:18 +00:00
olly
4f8b098307 Blacklist OMX.SEC.mp3.dec for more devices
Issue #4519

PiperOrigin-RevId: 226205245
2018-12-19 21:29:27 +00:00
Oliver Woodman
be2636c365 Merge pull request #4993 from saschpe:icy
PiperOrigin-RevId: 226031838
2018-12-18 19:46:54 +00:00
andrewlewis
0e8e9621c0 Use the true bitrate for CBR MP3 seeking
PiperOrigin-RevId: 225989898
2018-12-18 19:46:43 +00:00
eguven
ee2e89e0cd Remove DownloadManager Download interim state when created
When a Download is created it's set to queued state but doesn't notify
listeners about this state. DownloadManager checks if it can start the
download. After this checks it notifies the listeners.

With this change Download can immediately check if it can be started and
sends correct notification.

PiperOrigin-RevId: 225967129
2018-12-18 19:46:33 +00:00
Oliver Woodman
4d282b2278 Merge pull request #5216 from mseroczynski:dev-v2
PiperOrigin-RevId: 225966289
2018-12-18 19:46:23 +00:00
eguven
3dc72a690c Remove targetState in DownloadManager.Download
PiperOrigin-RevId: 225849846
2018-12-18 19:46:08 +00:00
eguven
3d6707e2c4 Don't create Downloads until DownloadManager is initialized
PiperOrigin-RevId: 225824428
2018-12-18 19:45:58 +00:00
aquilescanta
f4fd3b12e6 Handle failure to get Cast context more gracefully
Issue:#4160
Issue:#4743
PiperOrigin-RevId: 225813243
2018-12-18 19:45:48 +00:00
aquilescanta
768f48e1d9 Update the Cast framework dependency
PiperOrigin-RevId: 225812585
2018-12-18 19:45:39 +00:00
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
Michał Seroczyński
9fa2525225 Merge remote-tracking branch 'origin/dev-v2' into dev-v2 2018-12-17 12:50:20 +01:00
Michał Seroczyński
4aabff9634 Blacklist OMX.SEC.mp3.dec and OMX.brcm.audio.mp3.decoder on Samsung devices 2018-12-17 12:50:11 +01:00
Michał Seroczyński
49a99beaef
Merge branch 'dev-v2' into dev-v2 2018-12-17 11:19:50 +01:00
Michał Seroczyński
3390b21618 Blacklist OMX.SEC.mp3.dec and OMX.brcm.audio.mp3.decoder on Samsung devices 2018-12-17 10:58:27 +01: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