6658 Commits

Author SHA1 Message Date
olly
c09a6eb8ee Update cast extension build
PiperOrigin-RevId: 250664791
2019-05-30 15:28:16 +01:00
olly
6e7012413b Keep controller visible on d-pad key events
PiperOrigin-RevId: 250661977
2019-05-30 15:26:32 +01:00
tonihei
b8ec05aea1 Handle gzip in DefaultHttpDataSource.
Setting the requested encoding in all cases ensures we receive the relevant
response headers indicating whether gzip was used. Doing that allows to
detect the content length in cases where gzip was requested, but the server
replied with uncompressed content.

PiperOrigin-RevId: 250660890
2019-05-30 15:26:32 +01:00
eguven
00b26a51df Modify DashDownloaderTest to test if content length is stored
PiperOrigin-RevId: 250655481
2019-05-30 15:26:32 +01:00
eguven
e2452f8103 Simplify CacheUtil
PiperOrigin-RevId: 250654697
2019-05-30 15:26:32 +01:00
eguven
42ba6abf5a Fix CacheUtil.cache() use too much data
cache() opens all connections with unset length to avoid position errors.
This makes more data then needed to be downloading by the underlying
network stack.

This fix makes makes it open connections for only required length.

Issue:#5927
PiperOrigin-RevId: 250546175
2019-05-30 15:26:32 +01:00
olly
ed5ce2396d SimpleCache: Tweak comments related to blocking
"Write case, lock not available" was a bit confusing. When the
content is not cached and the lock is held, it's neither a read
or a write case. It's a "can't do anything" case. When blocking,
it may subsequently turn into either a read or a write.

PiperOrigin-RevId: 250530722
2019-05-30 15:26:32 +01:00
aquilescanta
71418f9411 Fix TTML bitmap subtitles
+ Use start for anchoring, instead of center.
+ Add the height to the TTML bitmap cue rendering layout.

Issue:#5633
PiperOrigin-RevId: 250519710
2019-05-30 15:26:32 +01:00
olly
1151848f59 No-op move of span touching into helper method
PiperOrigin-RevId: 250519114
2019-05-30 15:26:32 +01:00
andrewlewis
09b00c7fb0 Allow passthrough of E-AC3-JOC streams
PiperOrigin-RevId: 250517338
2019-05-30 15:26:32 +01:00
olly
94d668567c Migrate org.mockito.Matchers#any* to org.mockito.ArgumentMatchers
The former is deprecated and replaced by the latter in Mockito 2. However, there is a
functional difference: ArgumentMatchers will reject `null` and check the type
if the matcher specified a type (e.g. `any(Class)` or `anyInt()`). `any()` will
remain to accept anything.

PiperOrigin-RevId: 250458607
2019-05-30 15:25:28 +01:00
aquilescanta
8912db5ed9 Remove DecryptionResource
Reference count was built into DrmSession

PiperOrigin-RevId: 250449988
2019-05-30 15:25:28 +01:00
andrewlewis
8a0fb6b78f Fix video size reporting in surface YUV mode
In surface YUV output mode the width/height fields of the VpxOutputBuffer were
never populated. Fix this by adding a new method to set the width/height and
calling it from JNI like we do for GL YUV mode.

PiperOrigin-RevId: 250449734
2019-05-30 15:25:28 +01:00
andrewlewis
90325c699e Allow enabling decoder fallback in DefaultRenderersFactory
Also allow enabling decoder fallback with MediaCodecAudioRenderer.

Issue: #5942
PiperOrigin-RevId: 250301422
2019-05-30 15:25:28 +01:00
aquilescanta
04f3888550 Add allowOnlyClearBuffers to SampleQueue#read
Removes the need for duplicate calls to SampleQueue#read when
implementing DecryptionResources acquisition in the MediaSources.

PiperOrigin-RevId: 250298175
2019-05-30 15:25:28 +01:00
andrewlewis
c495a3f55e Fix VP9 build setup
Update configuration script to use an external build, so we can remove use of
isysroot which is broken in the latest NDK r19c. Also switch from gnustl_static
to c++_static so that ndk-build with NDK r19c succeeds.

Issue: #5922
PiperOrigin-RevId: 250287551
2019-05-30 15:25:28 +01:00
aquilescanta
47cc567dca Add reference counting to DrmSession
This CL should not introduce any functional changes.

PiperOrigin-RevId: 250277165
2019-05-30 15:25:28 +01:00
aquilescanta
6b68bc0c9d Fix anchor usage in SubtitlePainter's setupBitmapLayout
According to Cue's constructor (for bitmaps) documentation:
+ cuePositionAnchor does horizontal anchoring.
+ cueLineAnchor does vertical anchoring.

Usage is currently inverted.

Issue:#5633
PiperOrigin-RevId: 250253002
2019-05-30 15:25:28 +01:00
eguven
2c4eb1cd9b Demo app change.
PiperOrigin-RevId: 250248268
2019-05-30 15:22:58 +01:00
olly
3afdd7ac5a Put @Nullable annotation in the right place
PiperOrigin-RevId: 249828748
2019-05-30 15:10:55 +01:00
olly
11c0c6d266 Reset upstream format when empty track selection happens
PiperOrigin-RevId: 249819080
2019-05-30 15:10:40 +01:00
tonihei
3e990a3d24 Fix nullness warning for MediaSource/MediaPeriod classes.
PiperOrigin-RevId: 249652301
2019-05-30 15:10:24 +01:00
olly
14c46bc406 Remove contentTypePredicate from DataSource constructors
The only known use case for contentTypePredicate is to catch
the case when a paywall web page is returned via a DataSource,
rather than the data that was being requested. These days streaming
providers should be using HTTPS, where this problem does not exist.
Devices have also gotten a lot better at showing their own
notifications when paywalls are detected, which largely mitigates
the need for the app to show a more optimal error message or
redirect the user to a browser.

It therefore makes sense to deprioritize this feature. In
particular by removing the arg from constructors, where nearly
all applications are probably passing null.

PiperOrigin-RevId: 249634594
2019-05-30 15:10:08 +01:00
aquilescanta
3314391932 Add basic DRM support to CastPlayer's demo app
PiperOrigin-RevId: 249624829
2019-05-30 15:09:52 +01:00
aquilescanta
8d329fb41f Move DefaultDrmSession resource acquisition to acquire
PiperOrigin-RevId: 249624318
2019-05-23 13:30:38 +01:00
olly
2f12374f1a Fix IndexOutOfBounds when there are no available codecs
PiperOrigin-RevId: 249610014
2019-05-23 13:30:24 +01:00
bachinger
073256ead0 improve issue templates
PiperOrigin-RevId: 249489446
2019-05-23 13:30:09 +01:00
tonihei
cfefdbc134 Release DownloadHelper automatically if preparation failed.
This prevents further unexpected updates if the MediaSource happens to
finish its preparation at a later point.

Issue:#5915
PiperOrigin-RevId: 249439246
2019-05-23 13:29:49 +01:00
olly
118218cc73 Remove cronet extension nullness blacklist
PiperOrigin-RevId: 249432337
2019-05-23 13:29:35 +01:00
olly
f74d2294be Remove media-session extension nullness blacklist
PiperOrigin-RevId: 249431620
2019-05-23 13:29:19 +01:00
olly
10ee7d8e86 Remove more classes from nullness blacklist
PiperOrigin-RevId: 249431027
2019-05-23 13:29:05 +01:00
olly
d836957138 Remove some DataSource implementations from nullness blacklist
PiperOrigin-RevId: 249419193
2019-05-23 13:28:50 +01:00
eguven
a4d18a7457 Remove mistakenly left link in vp9 readme
PiperOrigin-RevId: 249417898
2019-05-23 13:28:36 +01:00
andrewlewis
6abd5dc66f Add missing annotations dependency
Issue: #5926
PiperOrigin-RevId: 249404152
2019-05-23 13:28:21 +01:00
olly
21be284318 Replace runtime lookups of string integer codes
Make these values compile-time constants, which can be inlined.

PiperOrigin-RevId: 249327464
2019-05-23 13:28:06 +01:00
olly
8669d6dc10 Fix missing import
PiperOrigin-RevId: 249298093
2019-05-23 13:27:51 +01:00
olly
3efe320535 Remove deprecated DataSource constructors
PiperOrigin-RevId: 249276112
2019-05-23 13:27:36 +01:00
olly
52888ab55b Remove CronetEngineWrapper from nullness test blacklist
PiperOrigin-RevId: 249275623
2019-05-23 13:27:20 +01:00
olly
a727acd292 Remove nullness test blacklist for RTMP extension
PiperOrigin-RevId: 249274122
2019-05-23 13:27:05 +01:00
olly
37fc1d879d Propagate attributes to DefaultTimeBar
Issue: #5765
PiperOrigin-RevId: 249251150
2019-05-23 13:26:50 +01:00
eguven
b6d6d8c411 Deprecate JobDispatcherScheduler
PiperOrigin-RevId: 249250184
2019-05-23 13:26:35 +01:00
andrewlewis
491edd1edc Update surface directly from SphericalSurfaceView
The SurfaceListener just sets the surface on the VideoComponent, but
SphericalSurfaceView already accesses the VideoComponent directly so it seems
simpler to update the surface directly.

PiperOrigin-RevId: 249242185
2019-05-23 13:26:19 +01:00
tonihei
9aeaf2dbb0 Add ResolvingDataSource for just-in-time resolution of DataSpecs.
Issue:#5779
PiperOrigin-RevId: 249234058
2019-05-21 13:53:14 +01:00
andrewlewis
468296c2bc Suppress remaining ConstantCaseForConstant warnings
PiperOrigin-RevId: 249217126
2019-05-21 13:52:59 +01:00
andrewlewis
f3f885c6aa Update a reference to SimpleExoPlayerView
PiperOrigin-RevId: 249068395
2019-05-21 13:52:30 +01:00
bachinger
a458635540 Add ProgressUpdateListener
Issue: #5834
PiperOrigin-RevId: 249067445
2019-05-21 13:52:14 +01:00
tonihei
07c4569b5f Limit tests with specific SDK level to max=TARGET_SDK.
The unspecified default is the highest available SDK which may be larger
than TARGET_SDK (as specified by the manifest).

PiperOrigin-RevId: 249064173
2019-05-21 13:51:59 +01:00
tonihei
33c677846a Use versioned manifest in all Robolectric tests.
We are currently defaulting to targetSdk=1 as no targetSdk is specified. Only
tests which explicitly ask for another SDK use another test SDK. With the
versioned manifest, all tests run using the targetSDK by default.

PiperOrigin-RevId: 249060796
2019-05-21 13:51:43 +01:00
Oliver Woodman
e39996e95f Merge pull request #5907 from adamjrichter:dev-v2
PiperOrigin-RevId: 249044271
2019-05-20 15:40:01 +01:00
andrewlewis
bfeec25b2a Add SilenceMediaSource
Issue: #5735
PiperOrigin-RevId: 248745617
2019-05-20 15:13:36 +01:00