6791 Commits

Author SHA1 Message Date
christosts
cbd91999b4 Add Robolectric playback tests for existing VP9 assets
PiperOrigin-RevId: 342660971
2020-11-17 13:50:35 +00:00
olly
0a778ceb1c HLS playlist tracking cleanup
Make the public loadPlaylist method not take an argument again.

PiperOrigin-RevId: 342646259
2020-11-17 13:50:25 +00:00
samrobinson
e832a4e0fc Adjust SEF reader times to long.
PiperOrigin-RevId: 342642410
2020-11-16 16:51:09 +00:00
christosts
c87f95e153 Add Robolectric playback tests for existing MKV assets
PiperOrigin-RevId: 342618706
2020-11-16 16:50:46 +00:00
tonihei
1984779fa1 Discard buffer synchronously after seek before cancelling a load.
This ensures the buffer is not full when the `DefaultLoadControl` determines
whether we should continue loading and thus prevents a false warning about
not having enough memory left.

PiperOrigin-RevId: 342616623
2020-11-16 16:50:35 +00:00
insun
ee3eba07ac Increase touch target height of timebar in StyledPlayerControlView
This change also introduces gravity attribute to DefaultTimeBar.

PiperOrigin-RevId: 342573167
2020-11-16 16:50:12 +00:00
olly
c47e62209d Report reasons for not being able to reuse decoders
PiperOrigin-RevId: 342344090
2020-11-16 16:49:48 +00:00
olly
3ef609fa3b Plumb playback speed and frame-rate via VideoFrameReleaseTimeHelper
PiperOrigin-RevId: 342289646
2020-11-16 16:49:37 +00:00
olly
f6928c0ef9 Keep download in completed state if only metadata is updated
#minor-release

Issue: #8116
PiperOrigin-RevId: 342269114
2020-11-16 16:49:25 +00:00
olly
7fe68b52d5 Remove stray arguments from method
PiperOrigin-RevId: 342263700
2020-11-13 16:30:28 +00:00
olly
8d84a50fa1 Update Styled non bottom buttons to be borderless.
This requires the parent of the background to draw and have padding large enough to support the size of the ripple.

The bottom buttons must remained bordered as the space around them is constrained.

PiperOrigin-RevId: 342162231
2020-11-13 14:55:29 +00:00
christosts
7fd78666d1 Add Robolectric playback tests for existing MKA assets
PiperOrigin-RevId: 342060794
2020-11-13 14:55:20 +00:00
samrobinson
55afddf05c Adjust SEF slow motion parsing to base data type off name.
PiperOrigin-RevId: 342050008
2020-11-13 14:55:10 +00:00
samrobinson
a038b421dd Add additional SEF data types.
PiperOrigin-RevId: 342034166
2020-11-13 14:54:51 +00:00
bachinger
e3c725aa38 Create chunks from parts in HlsChunkSource
Issue: #5011
PiperOrigin-RevId: 342022947
2020-11-13 14:54:41 +00:00
olly
2693a107cd Fix frame release timing to be aware of playback speed
PiperOrigin-RevId: 342007987
2020-11-13 14:54:32 +00:00
tonihei
51c8ffbb0e Tweak DefaultLivePlaybackSpeedControl parameters.
Changing them to have fewer updates when adjusting the playback speed.

PiperOrigin-RevId: 341834423
2020-11-13 14:54:22 +00:00
olly
3b8b2f707b Remove C.StreamType constant that's not a real stream type
#minor-release

PiperOrigin-RevId: 341833274
2020-11-13 14:54:12 +00:00
claincly
6f7c97a729 Add method to expose the locally opened port for UdpDataSource.
PiperOrigin-RevId: 341707809
2020-11-11 09:51:09 +00:00
olly
b1eef00b80 Fix incorrect IntDef usage
#minor-release

PiperOrigin-RevId: 341668326
2020-11-11 09:50:59 +00:00
kimvde
4ae0401c34 Work around AudioManager#getStreamVolume crashes
#minor-release
Issue:#8191
PiperOrigin-RevId: 341632732
2020-11-11 09:50:49 +00:00
ibaker
363693d8ec Add multi-channel audio samples to Mp4PlaybackTest
Robolectric now supports multi-channel audio:
https://github.com/robolectric/robolectric/commit/9d84ceb6d588d5f53be29b

PiperOrigin-RevId: 341574417
2020-11-11 09:50:40 +00:00
ibaker
1e776a864b Fix some typos
PiperOrigin-RevId: 341573964
2020-11-11 09:50:30 +00:00
ibaker
337c412d2b Add multi-channel audio samples to TsPlaybackTest
Multi-channel audio is now supported by Robolectric:
https://github.com/robolectric/robolectric/commit/9d84ceb6d588d5f53be29b

PiperOrigin-RevId: 341573838
2020-11-11 09:50:21 +00:00
ibaker
f13058942a Add Robolectric playback tests for existing FLV assets
PiperOrigin-RevId: 341573808
2020-11-11 09:50:11 +00:00
christosts
9e98a680da Add flag to force synchronization in async queueing
Add experiment flag to force synchronization between
queueing threads in AsynchronousMediaCodecAdapter.

PiperOrigin-RevId: 341431481
2020-11-11 09:50:01 +00:00
christosts
9473fda056 Synchronize codec interaction with buffer queueing
Add experimental method to synchronize MediaCodec interactions
with asynchronous queueing. When the feature is enabled, interactions
such as MediaCodec.setOutputSurface() triggered by the
MediaCodecRenderer will wait until all input buffers pending queueing
are first submitted to the MediaCodec.

PiperOrigin-RevId: 341423837
2020-11-11 09:49:51 +00:00
tonihei
86ae7ebac4 Decrease target live offset if safely possible.
To check what is safely possible we keep track of the live offset
corresponding to the buffered duration and only deecrease the
target offset to a safe margin from the buffered duration.

Also, while still possible (i.e. while the actual offset is larger
than the safe margin), we increase the target offset to the safe
margin to avoid rebuffers to start with.

Issue: #4904
PiperOrigin-RevId: 341396492
2020-11-11 09:49:41 +00:00
bachinger
b03df4e8b5 Add dispatchPrepare(player) to ControlDispatcher
Issue: #7882
PiperOrigin-RevId: 341394254
2020-11-11 09:49:32 +00:00
christosts
1d4321b86e Move ownership of MediaCodec to MediaCodecAdapter
Move ownership of MediaCodec to MediaCodecAdapter so that all MediaCodec
interactions go through MediaCodecAdapter.

PiperOrigin-RevId: 341066926
2020-11-11 09:49:21 +00:00
claincly
8b5ecdb98d Fix javadoc formatting
PiperOrigin-RevId: 341051348
2020-11-06 16:40:34 +00:00
christosts
92ec1ab628 Add more MediaCodec methods to MediaCodecAdapter
Add more MediaCodec methods to MediaCodedAdapter so that renderers
interact with the MediaCodec through the MediaCodecAdapter.

PiperOrigin-RevId: 341023452
2020-11-06 16:35:23 +00:00
andrewlewis
764e5e8141 Expose the ads identifier in the Timeline period
Issue: #3750
PiperOrigin-RevId: 341021084
2020-11-06 16:35:06 +00:00
andrewlewis
0c301fefa8 Pass AdsMediaSource to other AdsLoader methods
Issue: #3750
PiperOrigin-RevId: 341020676
2020-11-06 16:34:57 +00:00
christosts
07e33a1395 Add getInputBuffer/getOutputBuffer in MediaCodecAdapter
PiperOrigin-RevId: 341016263
2020-11-06 16:34:37 +00:00
olly
1bcf1cf9f7 Decide whether to release rather than flush in onInputFormatChanged
- This change removes the last piece of logic that could cause deferred
  codec release (i.e., where the decision to release was made in
  processEndOfStream rather than in onInputFormatChanged.
- After this change, whether the codec will be released as a result of
  a format change is always established in onInputFormatChanged.

PiperOrigin-RevId: 341012403
2020-11-06 16:34:28 +00:00
olly
1fb675e876 Move last-buffer timestamp fix to better location
PiperOrigin-RevId: 340915538
2020-11-06 16:34:19 +00:00
olly
477eae3c57 Fix incorrect decoder non-reuse when operating rate needs clearing
This fixes a case where updateCodecOperatingRate would configure
the decoder to be drained and then released, only for
onInputFormatChanged to override the drain action with something
else.

We've not seen any reports of this issue, which suggests that either
it's OK to not release the decoder in such cases, or that the
case doesn't happen very often. I suspect that it's both, but let's
restore the intended behaviour for now.

PiperOrigin-RevId: 340909132
2020-11-06 16:34:08 +00:00
ibaker
702e5cfb3e Fix or suppress nullness warnings introduced by checkerframework 3.7.0
PiperOrigin-RevId: 340826532
2020-11-06 16:33:59 +00:00
olly
773e890768 Move another adaptation workaround into MediaCodecInfo
PiperOrigin-RevId: 340654217
2020-11-06 16:33:50 +00:00
tonihei
effbc22a62 Increase target live offset when rebuffering.
Issue: #4904
PiperOrigin-RevId: 340654178
2020-11-06 16:33:42 +00:00
tonihei
2416d99857 Limit target buffer to media configured min/max values.
Issue: #4904
PiperOrigin-RevId: 340653126
2020-11-06 16:33:33 +00:00
olly
c9e80a20e6 Move reconfiguration workaround to canKeepCodec
PiperOrigin-RevId: 340651654
2020-11-06 16:33:24 +00:00
bachinger
7f49b33fea Block HLS playlist requests at part level
Issue: #5011
PiperOrigin-RevId: 340625816
2020-11-06 16:33:15 +00:00
bachinger
4332dc2304 Parse HLS #EXT-X-RENDITION-REPORT tag
Issue: #5011
PiperOrigin-RevId: 340621758
2020-11-06 16:33:06 +00:00
tonihei
ae17e6d6f8 Forward Timeline and period id to TrackSelection.Factory
This information is already available in the MappingTrackSelector,
but not currently forwarded to the TrackSelection.Factory.

This makes it more complicated (or impossible) to depend on period
or manifest information in the track selection (for example to only
select tracks which are cached for the current format).

PiperOrigin-RevId: 340605886
2020-11-06 16:32:57 +00:00
bachinger
c04dd8b328 Use blocking HLS media playlist reload for segments
Issue: #5011
PiperOrigin-RevId: 340477795
2020-11-06 16:32:40 +00:00
andrewlewis
5fd1601f91 Signal an ads identifier to the AdsLoader
In a later change, the AdPlaybackState will include the playing adsId (set by
the AdsLoader) and the ads loader will use this to determine what ad
information is associated with the playing/next periods, to allow loading ads
in playlists.

Apps can continue to pass just a URI for an ad tag with their MediaItem, in
which case the associated playlist will request that ad tag just and the same
state will be used for all occurrences of the ad tag.

This change has breaking changes to the AdsLoader interface and removes
deprecated ways of passing the ad tag, as it's very likely to go into a major
release anyway and not needing to handle the deprecated cases simplifies
ImaAdsLoader.

Issue: #3750
PiperOrigin-RevId: 340438580
2020-11-06 16:32:31 +00:00
ibaker
f937e40eab Make Tx3gDecoder fields final, and remove unnecessary null-check
PiperOrigin-RevId: 340412910
2020-11-06 16:32:22 +00:00
olly
e139a4652a Short term fix for setFrameRate ISE when surface is not valid
PiperOrigin-RevId: 340314496
2020-11-02 23:02:27 +00:00