10014 Commits

Author SHA1 Message Date
ibaker
c71f1b04e9 Add time units to playing time failure message in ExoHostedTest
PiperOrigin-RevId: 339864290
2020-11-02 23:00:10 +00:00
kimvde
6a5b53355b Add SVC extension to SEF test sample
PiperOrigin-RevId: 339858492
2020-11-02 23:00:01 +00:00
bachinger
0d6ec21b30 Parse #EXT-X-PRELOAD-HINT tag
Issue: #5011
PiperOrigin-RevId: 339738292
2020-11-02 22:59:52 +00:00
kimvde
8f6b46f570 Transformer: flatten slow mo video at normal speed
Slow motion segments are not taken into account yet.

PiperOrigin-RevId: 339678840
2020-11-02 22:59:43 +00:00
kimvde
cb1afa4b1a Add mdta metadata to SEF slow mo test sample
PiperOrigin-RevId: 339655069
2020-11-02 22:59:33 +00:00
samrobinson
47fbfa1c57 Correct naming of SEF slow motion mp4 sample.
PiperOrigin-RevId: 339649762
2020-11-02 22:59:24 +00:00
samrobinson
e962d7172e Add an MP4 sample for SEF slow motion to the test assests
PiperOrigin-RevId: 339648625
2020-11-02 22:59:15 +00:00
aquilescanta
04c56c44cf Publish components that depend on MediaParser
This change will be followed up by:
- Changes adding APIs to enable the use of MediaParser in each of the supported
  media sources.
- Changes removing TODOs related to the change of the stable SDK to API 30.

PiperOrigin-RevId: 339556777
2020-11-02 22:59:05 +00:00
christosts
d5170688b4 MediaItem: document params in method call
PiperOrigin-RevId: 339472160
2020-11-02 22:58:54 +00:00
bachinger
fe2acb5954 Parse HLS #EXT-X-PART tag
Issue: #5011
PiperOrigin-RevId: 339467702
2020-11-02 22:58:43 +00:00
tonihei
aab6aef443 Set min/max supported live offset in DashMediaSource.
In order to ensure we can update the values for new manifests but still use
the user provided override, we need to save the original and the updated MediaItem
seperately.

And in order to incorporate the existing logic for the min/max supported live
offset, which we already use to correct the target offset, also move both places
together so that all the adjustment happens in one place.

Logical adjustments to the previous min/max supported live offset:
 - Use the user-provided MediaItem values if set
 - Use the newly parsed ServiceDescription values if available.
 - Limit the minimum to 0 if the current time is in the window and we can
   assume to have low-latency stream.
 - Add minBufferTime from the manifest to ensure we don't reduce the live
   offset below this value.

Issue: #4904
PiperOrigin-RevId: 339452816
2020-11-02 22:58:34 +00:00
andrewlewis
32a72fa237 Add sample for testing skippable ads in midrolls
#minor-release

PiperOrigin-RevId: 339447845
2020-11-02 22:58:25 +00:00
tonihei
ae6907e1f5 Don't rely on events after player release in ExoHostedTest
ExoHostedTest was calculating the total play time by solely listening
to onIsPlayingChanged. The last update to false (when playback ends) was relying
on a callback that was always called after the player has already been released.
This happened because of a now fixed bug where callbacks were still issued if
player.release() is called from within another callback (as in ExoHostedTest).

Fix the currently broken test by posting the release call so that all pending
events are still delivered first.

PiperOrigin-RevId: 339438863
2020-11-02 22:58:15 +00:00
andrewlewis
de729ecf3a Fix skipping behavior in ad pods
ImaAdsLoader notified onEnded whenever an ad finished playing, but when an ad
is skipped in an ad pod we'd receive a playAd call before the player
discontinuity for skipping to the next ad. Fix this behavior by checking that
IMA's playing ad matches the player's playing ad before notifying onEnded.

#minor-release

PiperOrigin-RevId: 339424910
2020-11-02 22:58:06 +00:00
samrobinson
2c746c6b6b Generalise the SlowMotion Metadata.Entry naming.
PiperOrigin-RevId: 339352447
2020-11-02 22:57:56 +00:00
samrobinson
c0a0708fc3 Extract SEF slow motion cues as Metadata
PiperOrigin-RevId: 339307746
2020-11-02 22:57:47 +00:00
andrewlewis
1c4653f7ee Improve progress update logs
Add logging for ad progress and switch from deprecated getters to new
millisecond getters.

PiperOrigin-RevId: 339226534
2020-11-02 22:57:37 +00:00
tonihei
aee7e6087c Parse min/max live offset from ServiceDescription.
Issue: #4904
PiperOrigin-RevId: 339215091
2020-11-02 22:57:28 +00:00
tonihei
e57193676a Add min/max live offset to MediaItem.LiveConfiguration.
This allows the user and the media to define bounds in which the live offset
can vary.

Issue: #4904
PiperOrigin-RevId: 339214605
2020-11-02 22:57:19 +00:00
olly
d436a69d8f Centralize canKeepCodec logic
Logic for determining if (and how) decoders can be adapted is
currently split between renderers and MediaCodecInfo. This change
centralizes the majority of the logic in MediaCodecInfo.

This change also fixes a bug in MediaCodecAudioRenderer when computing
max values for the codec. Previously, max values would not be increased
to account for potential adaptation to another stream in the case that
the codec needs to be flushed for the adaptation to occur.

PiperOrigin-RevId: 339133416
2020-11-02 22:57:09 +00:00
olly
959851b190 Add MediaCodecInfoTest
PiperOrigin-RevId: 339107784
2020-11-02 22:56:59 +00:00
bachinger
949e26d1ba Support delta updates for media playlists
Issue: #5011
PiperOrigin-RevId: 339093145
2020-11-02 22:56:49 +00:00
andrewlewis
78940445fe Improve handling of VPAID ads
Issue: #7832
PiperOrigin-RevId: 339087555
2020-11-02 22:56:39 +00:00
olly
e16ab27b63 No-op refactor of MediaCodecInfo.isSeamlessAdaptationSupported
PiperOrigin-RevId: 339084261
2020-11-02 22:56:30 +00:00
ibaker
50566fb8ac Suppress ProGuard warnings related to Guava's compile-only deps
Without these lines, ProGuard fails on the demo app (R8 works).

Also include some more `-dontwarn` lines from
https://github.com/google/guava/wiki/UsingProGuardWithGuava

#minor-release

Issue: #8103
PiperOrigin-RevId: 339050634
2020-11-02 22:56:21 +00:00
kimvde
80a37c7ed1 Rename MotionPhoto to MotionPhotoMetadata
This make it clear that this class does not contain any photo/video
data.

PiperOrigin-RevId: 339045203
2020-11-02 22:56:11 +00:00
andrewlewis
16c60ecf4b Upgrade IMA SDK dependency to 3.21.0
Call the new method AdsLoader.release() to allow the IMA SDK to dispose of its
WebView.

Issue: #7344
PiperOrigin-RevId: 339022162
2020-11-02 22:56:02 +00:00
aquilescanta
270e274ef3 Treat -1000 duration as unknown duration for live streams in Cast
Issue: #7983
#minor-release
PiperOrigin-RevId: 339016928
2020-11-02 22:55:52 +00:00
samrobinson
1fcfef5cde Add readDelimiterTerminatedString to ParsableByteArray.
PiperOrigin-RevId: 338718776
2020-11-02 22:55:43 +00:00
samrobinson
7ccbf572c7 Add a Metadata Entry class for SEF Slow motion data.
PiperOrigin-RevId: 338695793
2020-11-02 22:55:34 +00:00
christosts
1887983a22 Minor Javadoc fix.
Issue: #4904
PiperOrigin-RevId: 338669087
2020-11-02 22:55:24 +00:00
andrewlewis
160ee9d890 Handle stream volume register/unregister errors
Issue: #8106
Issue: #8087
PiperOrigin-RevId: 338664455
2020-11-02 22:55:14 +00:00
aquilescanta
a184924322 Avoid chunkless preparation if the codec mapping is ambiguous
Issue: #7877
PiperOrigin-RevId: 338659937
2020-11-02 22:55:03 +00:00
xufuji456
4bc392a8ef fix the end point of span exceeds the length of SpannableStringBuilder 2020-10-29 15:12:49 +08:00
olly
5b1514e933 Fix release note
PiperOrigin-RevId: 338657613
2020-10-23 13:55:19 +01:00
olly
e5434ff4d3 Add plumbing for decoderReleased analytics events
A subsequent CL will plumb a release reason through these
event paths.

PiperOrigin-RevId: 338655603
2020-10-23 13:55:09 +01:00
christosts
485949b56c Refactor AsynchronousMediaCoderAdapter
Refactor the AsynchronousMediaCoderAdapter and move the callback thread
out of the adapter so that implementation of async callback and and
async queueing are consistent design-wise.

PiperOrigin-RevId: 338637837
2020-10-23 13:55:00 +01:00
aquilescanta
4783c329cc Map HLS sample formats to the correct codec string
This change fixes format creation for traditional preparation of streams
where the master playlist contains more than one codec string per track
type.

Issue: #7877
PiperOrigin-RevId: 338538693
2020-10-23 13:54:50 +01:00
aquilescanta
ccf78f99c4 Allow multiple codecs with same type in DefaultHlsExtractorFactory
When disabling a TsExtractor track type because of a missing codec
in the master playlist, look through the entire codecs string
instead of checking the first codec with matching type.

Issue: #7877
PiperOrigin-RevId: 338530046
2020-10-23 13:54:40 +01:00
kimvde
521a220728 Avoid throwing for still photo metadata retrieval
PiperOrigin-RevId: 338497163
2020-10-23 13:54:31 +01:00
samrobinson
1191820429 Allow additional entries in MetadataUtil.setFormatMetadata.
The primary use of this currently will be for appending SEF metadata.

PiperOrigin-RevId: 338475948
2020-10-23 13:54:21 +01:00
ibaker
18c6b16f91 Switch playback tests to single-parameter parameterized syntax
This is simpler than instantiating a single-element string array for
every parameter.

PiperOrigin-RevId: 338469324
2020-10-23 13:54:11 +01:00
olly
09b4a473ff Add missing release note
PiperOrigin-RevId: 338446775
2020-10-22 12:37:51 +01:00
kimvde
175b8eb69e Read Google Photos motion photo metadata
PiperOrigin-RevId: 338436906
2020-10-22 12:37:41 +01:00
olly
9bde5d0351 [nullness] The nullness checking fixes of the media related files
We rolled back the previous <unknown commit> because some of the nullness checking fixes broke the exoplayer2 tests. We submit this CL into the TAP Global Presubmit train (https://test.corp.google.com/OCL:337620582:BASE:338201100:1603283151742:36afd5a5) and make sure that this CL wouldn't break any other tests on google3.

PiperOrigin-RevId: 338267548
2020-10-21 22:26:48 +01:00
olly
563767d5e9 Bump version to 2.12.1
PiperOrigin-RevId: 338261975
2020-10-21 22:26:34 +01:00
christosts
a21eb772b1 HlsMediaSourceTest: rename dashMediaItem to hlsMediaItem
Issue: #4904
PiperOrigin-RevId: 338249499
2020-10-21 22:26:25 +01:00
tonihei
057771aeec Fix calculation for isSegmentAvailableAtFullNetworkSpeed.
The current caluclation was comparing Unix time with period time.
Fix it by always comparing against period time.

Issue: #4904
PiperOrigin-RevId: 338235754
2020-10-21 22:26:15 +01:00
christosts
e52a044ec5 Parse #EXT-X-SERVER-CONTROL and #EXT-X-PART-INF in HLS media playlists.
PiperOrigin-RevId: 338232910
2020-10-21 22:26:05 +01:00
bachinger
1051580a63 Improve naming of the methods of LivePlaybackSpeedControl
PiperOrigin-RevId: 338232327
2020-10-21 22:25:54 +01:00