8507 Commits

Author SHA1 Message Date
olly
2e51182f53 Update misc dependencies
PiperOrigin-RevId: 305503804
2020-04-08 21:49:03 +01:00
kimvde
afc2858ad0 Add PsExtractor test for AC3
PiperOrigin-RevId: 305503256
2020-04-08 21:48:54 +01:00
olly
376d02ac3f Upgrade cast dependency
Issue: #7191
PiperOrigin-RevId: 305502293
2020-04-08 21:48:45 +01:00
kimvde
dc80cf32b6 Add TsExtractor tests for LATM and H264
PiperOrigin-RevId: 305475709
2020-04-08 21:48:36 +01:00
gyumin
dbfb6b183c Implement DeviceComponent of SimpleExoPlayer
PiperOrigin-RevId: 305460260
2020-04-08 21:48:27 +01:00
christosts
7504ce763e Add QoePingStore and QoePingItem
This is the first CL for the offline qoe reporting
feature. Refer to the design doc for full information.

Design doc: go/exoplayer-offline-qoe

PiperOrigin-RevId: 305459231
2020-04-08 21:48:18 +01:00
christosts
e7fd6a0e01 SimpleExoplayer Builder for testing
Create a Builder that creates SimpleExoPlayer instances with fake
components, suitable for testing.

Basically extracts the Builder from ExoPlayerTestRunner to a standalone
class that can be re-used.

PiperOrigin-RevId: 305458419
2020-04-08 21:48:08 +01:00
kimvde
703fb777c4 Optimize extractors sniffing order
Issue: #6410
PiperOrigin-RevId: 305436352
2020-04-08 21:47:58 +01:00
bachinger
4e2a0f6032 simplify PlayerActivity towards using the media item only
PiperOrigin-RevId: 305300409
2020-04-08 21:47:48 +01:00
olly
c84ac809e4 Update release notes for 2.11.4
PiperOrigin-RevId: 305276107
2020-04-07 17:38:17 +01:00
bachinger
8f24db73f1 rename Playlist to MediaSourceList
This CL is a renaming only. It's mostly about finding a decent naming for the internal Playlist class. The plan is to have a public Playlist class in the converged Player API, so we need to rename the internal one.

PiperOrigin-RevId: 305266196
2020-04-07 17:07:20 +01:00
olly
74a9d8f680 Clean up manifest MIME type and codec parsing
PiperOrigin-RevId: 305258836
2020-04-07 17:07:10 +01:00
ibaker
f9679a2cfb Reformat releasenotes.md
PiperOrigin-RevId: 305242260
2020-04-07 17:07:01 +01:00
olly
07f059116b Clean up AudioFocusManagerTest
PiperOrigin-RevId: 305235961
2020-04-07 13:39:39 +01:00
olly
20cadd6e04 Audio focus: Restore full volume if focus is abandoned when ducked
If we're in the ducked state and updateAudioFocus is called with a
new state for which focus is no longer required, we should restore
the player back to full volume.

Issue: #7182
PiperOrigin-RevId: 305232155
2020-04-07 13:39:30 +01:00
ibaker
5a7dbae18c Use Android's Color.argb() and Color.rgb() methods in ColorParser
PiperOrigin-RevId: 305216138
2020-04-07 13:39:22 +01:00
ibaker
8df6a4b301 Remove nullness warning suppressions from Matcher.group
These were introduced in c7164a30a0

In each case I checked that the groups are not optional,
so if they match they must be non-null.

PiperOrigin-RevId: 305213293
2020-04-07 13:39:13 +01:00
olly
d87fc72378 Add DASH text representation parsing tests
PiperOrigin-RevId: 305140826
2020-04-07 13:39:03 +01:00
Oliver Woodman
2b44ff3c71 Merge pull request #7184 from TiVo:p-subtitle-format-from-codecs
PiperOrigin-RevId: 305137114
2020-04-07 13:38:53 +01:00
olly
8d2bc7d182 Audio focus: Re-request audio focus if in a transient loss state
This avoids cases where audio focus is never successfully acquired
because another app is holding on to transient audio focus indefinitely.

Issue: #7182
PiperOrigin-RevId: 305108528
2020-04-07 13:38:42 +01:00
andrewlewis
dc813eca41 Fix stuck ad playbacks with DRM-protected content
When ClippingMediaPeriod first tried to read a buffer, if its end
position was before the end of the stream and it was buffered to its end
position, it would sometimes erroneously signal end-of-stream for
protected content because the sample queue might be waiting for DRM keys
at this point.

Work around the issue temporarily by signaling this specific case back
to ClippingMediaPeriod via the DecoderInputBuffer.

There will likely be a cleaner fix as a result of adding support for
dynamic clip end points in the future, at which point this can be
reverted.

issue:#7188
PiperOrigin-RevId: 305081757
2020-04-07 13:38:33 +01:00
olly
1f544b0856 Update release notes for 2.11.4
PiperOrigin-RevId: 305037428
2020-04-07 13:38:24 +01:00
Oliver Woodman
8991586c3b Merge pull request #7034 from TiVo:p-exception-unreported-discontinuity
PiperOrigin-RevId: 305006564
2020-04-06 13:28:40 +01:00
kimvde
c13f41af0d Remove deprecated members in DefaultTrackSelector
PiperOrigin-RevId: 304986313
2020-04-06 13:28:28 +01:00
bachinger
fc785871b3 add start and end position to media item
PiperOrigin-RevId: 304795753
2020-04-06 13:28:18 +01:00
olly
8583cd92c7 Suppress warnings in preparation for Checker Framework 3.2.0 upgrade.
In particular, replace @SuppressWarnings("initialization") with
@SuppressWarnings("nullness"); see
https://github.com/typetools/checker-framework/issues/3212.

More information: go/checker-lsc

Tested:
    TAP train for global presubmit queue
    http://test/OCL:304697666:BASE:304680497:1585968008044:f0c4fd6c
PiperOrigin-RevId: 304751415
2020-04-06 13:28:07 +01:00
ibaker
a6358dc7be Escape the rubyText when generating HTML
This should have been done before, I just missed it.

PiperOrigin-RevId: 304612519
2020-04-06 13:27:58 +01:00
ibaker
bdffab1200 Support multiple <rt> nodes inside <ruby> in WebVTT
This is supported (despite what my now-deleted comment says), see the
example here:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt

PiperOrigin-RevId: 304612099
2020-04-06 13:27:48 +01:00
olly
fb0330d4db Propagate playback position through LoadControl shouldContinueLoading.
PiperOrigin-RevId: 304420177
2020-04-06 13:27:37 +01:00
ibaker
6438e1cdbc Add support for tate-chu-yoko to SpannedToHtmlConverter
PiperOrigin-RevId: 304386857
2020-04-06 13:27:27 +01:00
bachinger
fe013979c2 use an unmodifiable map with a copy of the license request headers
PiperOrigin-RevId: 304356504
2020-04-06 13:27:16 +01:00
ibaker
205adb7f8d Rewrite the vertical text support in SubtitleWebView
The attempt in <unknown commit> was hacky and incomplete.

PiperOrigin-RevId: 304356038
2020-04-06 13:27:06 +01:00
ibaker
7323b5351a Add support for multi-line strings to SpannedToHtmlConverter
PiperOrigin-RevId: 304355717
2020-04-06 13:26:50 +01:00
ibaker
f3c7c88d7c Tweak Cue.line javadoc again to reflect WebVTT spec
It's interesting WebVTT explicitly handles line & position differently
in horizontal-rl/lr and vertical-lr/rl contexts. position is always
measured from the left of the viewport, even for rtl text, but line in
vertical-rl is measured from the right of the viewport.

We don't have to make Cue match WebVTT (I can go change the WebVTT
decoding instead) but it seems a reasonable 'default' to follow.

PiperOrigin-RevId: 304353900
2020-04-06 13:26:40 +01:00
bachinger
dc4118da7b add clearTrackTypes and playClearContentWithoutKey to DrmConfiguration
With these additional properties, we can declare the behaviour for clear tracks and clear content on a media item level.

PiperOrigin-RevId: 304351716
2020-04-06 13:26:29 +01:00
Steve Mayhew
fbd97ad8de Fix merge mistake, wrong track type.
Fix mistake from the backport merge, should get TEXT track type for subtitles.  Also update testcase to match pattern in `dev-v2` branch.
2020-04-05 13:23:03 -07:00
Steve Mayhew
4ad4a826ab Cleanup to use getCodecsOfType()
Use the `Util.getCodecsOfType()` method rather than hard coded codec strings
2020-04-05 13:07:50 -07:00
Steve Mayhew
232820d3e1 Add HLS support for "stpp.*" codec support for SMPTE-TT fmp4 subtitle tracks
ExoPlayer needs a codec to decide among WEBVTT and TTML decoder mimeType.
Apple describes IMSC1 in MP4 in
[RFC-8216 Section 3.6](https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-04#section-3.6).

The DASH manifest specifies the SMPTE-TT captions in the codecs in the manifest
(from W3C [TTML Profiles for Internet Media Subtitles and Captions 1.1](https://www.w3.org/TR/ttml-imsc1.1/#general-0).
DASH just doesn't require the rendition linking, but HLS does.

Apple implies the CODECS attribute of the variant needs to be do this.  That is
with SHOULD and MAY language to imply the codec to use for it in the
[Authoring Guidelines](https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices)

This change defaults to WebVTT if no codec is specifed (same as current behavior) otherwise it picks it from the variants
referencing the media.
2020-04-03 19:41:23 -07:00
olly
dbea614cca Fix release notes
PiperOrigin-RevId: 304196424
2020-04-01 22:39:12 +01:00
kimvde
c9a89bee1c Remove thread checks in player constructor
SimpleExoPlayer instances don't have to be created from the application
thread.

PiperOrigin-RevId: 304190901
2020-04-01 22:39:03 +01:00
ibaker
262f19aa63 Add vertical text support to SubtitleWebView
PiperOrigin-RevId: 304186326
2020-04-01 22:38:54 +01:00
olly
eb65f5e20a Fix ADTS extraction with mid-stream ID3
PiperOrigin-RevId: 304184650
2020-04-01 22:38:45 +01:00
ibaker
8cb7907e71 Expand Cue.line and Cue.position javadoc to cover vertical text
PiperOrigin-RevId: 304164078
2020-04-01 22:38:36 +01:00
ibaker
76358d983f Base64 encode the subtitle HTML before passing to WebView.loadData
Without this, URL-encoding is assumed, which means ampersand-codes are
not carried through to the underlying web page correctly.

PiperOrigin-RevId: 304163733
2020-04-01 22:38:27 +01:00
ibaker
5392a2f4bc Add non-ascii characters to SpannedToHtmlConverterTest
These are handled by converting to ampersand codes - add a test to show
that's explicit & deliberate.

PiperOrigin-RevId: 304163712
2020-04-01 22:38:19 +01:00
olly
6570d12c3c Remove re-entrancy from HlsMediaChunk initialization
HlsSampleStreamWrapper currently calls HlsMediaChunk.init, which calls back
to HlsSampleStraemWrapper.init. This re-entrancy seems a bit confusing.

PiperOrigin-RevId: 304139462
2020-04-01 22:38:10 +01:00
ibaker
cd5ecd5c90 Make javadoc links point to Android docs for java.* classes
Before:
https://docs.oracle.com/javase/7/docs/api/index.html?java/lang/String.html

After:
https://developer.android.com/reference/java/lang/String.html
PiperOrigin-RevId: 304137011
2020-04-01 22:38:01 +01:00
ibaker
45186ac377 Ensure javadoc fix applies to Android links with anchors
This means is-external=true is removed and target=_top is
set on the <a> tag.

Without this, javadoc links to framework docs with anchors are
currently broken when viewed in the "frame view" on
exoplayer.dev/doc/reference/

Before this change:
https://developer.android.com/reference/android/media/MediaDrm.html?is-external=true#getKeyRequest-byte:A-byte:A-java.lang.String-int-java.util.HashMap-

With this change:
https://developer.android.com/reference/android/media/MediaDrm.html#getKeyRequest-byte:A-byte:A-java.lang.String-int-java.util.HashMap-

PiperOrigin-RevId: 304136858
2020-04-01 22:37:51 +01:00
aquilescanta
41853169a7 Remove loadTaskId to Loader.Callback
Partial rollback of ca799716b8. We'll have to plumb
the id manually, like the rest of the LoadEventInfo
members.

PiperOrigin-RevId: 304067761
2020-04-01 22:37:43 +01:00
ibaker
802d71a5cb Add cue positioning to SubtitleWebView
PiperOrigin-RevId: 303998690
2020-04-01 22:37:33 +01:00