12248 Commits

Author SHA1 Message Date
olly
a1d376fae1 Fix incorrect assertion in CacheDataSource
#minor-release
#exofixit

PiperOrigin-RevId: 395233639
2021-09-16 14:37:21 +01:00
claincly
624d212df2 Handle when additional spaces are in SDP's RTPMAP atrribute
Issue: #9379
PiperOrigin-RevId: 395226701
2021-09-16 14:36:40 +01:00
olly
28d5b35723 Use defStyleAttr when obtaining styled attributes in player views
Issue #9024

PiperOrigin-RevId: 395224661
2021-09-16 14:33:32 +01:00
olly
ced4232fd8 Duration readers: Return TIME_UNSET rather than a negative value
This typically happens if there's a discontinuity in the stream.
It's better to say we don't know, than it is to return a negative
position.

Issue: #8346
#exofixit
#minor-release
PiperOrigin-RevId: 395224088
2021-09-16 14:30:42 +01:00
olly
140e110e44 Workaround ConnectivityManager SecurityException on Android 11
Issue: #9002
PiperOrigin-RevId: 395221648
2021-09-16 14:29:54 +01:00
kimvde
aa88e0b430 Avoid OMX.qti.audio.decoder.flac on API level < 32
Before, this decoder was avoided on API levels < 30.

#minor-release
Issue:#9349
PiperOrigin-RevId: 395209684
2021-09-16 14:01:28 +01:00
gyumin
b40a6b86d6 Fix FlagSet.equals on API levels below 24
PiperOrigin-RevId: 395004645
2021-09-16 14:00:50 +01:00
olly
e7a7235a47 Remove max API level for reading TV resolution from system properties
PiperOrigin-RevId: 394415421
2021-09-16 13:59:07 +01:00
kimvde
4a7aaaa3b9 Fix DefaultTrackSelector Javadoc about tunneling
#minor-release
Issue:#9350
PiperOrigin-RevId: 394112689
2021-09-16 13:58:30 +01:00
bachinger
d930e07a0e Implement setPlaybackParameters for CastPlayer
Issue: #6784
PiperOrigin-RevId: 393374139
2021-09-16 13:57:44 +01:00
ibaker
8909f2017f Fix incorrect DataSourceContractTest test names
These should have been updated as part of
1affbf9357

#minor-release

PiperOrigin-RevId: 392913561
2021-09-16 13:56:22 +01:00
kimvde
152d1c7dc9 TsExtractor: handle packets without PTS
Issue: #9294
PiperOrigin-RevId: 392844983
2021-09-16 13:55:36 +01:00
andrewlewis
66d1e2cc9e Remove stray symlinks
These are unneeded for the external project

#minor-release

PiperOrigin-RevId: 392835942
2021-09-16 13:54:09 +01:00
bachinger
6f01e2f035 Make constructor of PlayerNotificationManager protected
Issue: #9303
#minor-release
PiperOrigin-RevId: 392022613
2021-09-16 13:53:40 +01:00
olly
54418eb644 Size dolby vision buffers for H265 by default
PiperOrigin-RevId: 391965200
2021-09-16 13:53:00 +01:00
olly
287e72c477 Add note that isLastBuffer is best-effort only
PiperOrigin-RevId: 391952144
2021-09-16 13:50:40 +01:00
kimvde
4fd7d777b6 Fix issue caused by using ForwardingPlayer and StyledPlayerControlView
StyledPlayerControlView was checking whether the player is an ExoPlayer
instance to set the track selector. This means that, if apps were
wrapping an ExoPlayer in a ForwardingPlayer (to replace a
ControlDispatcher for example), the track selector wasn't set anymore.

PiperOrigin-RevId: 391776305
2021-09-16 13:50:04 +01:00
christosts
64002f6b9a Annotate deprecated methods in ForwardingPlayer
This change is needed to generate correct javadoc, otherwise
these methods appear as not deprecated.

#minor-release

PiperOrigin-RevId: 390339092
2021-09-16 13:48:15 +01:00
christosts
8f3dbdf81c Minor javadoc fix in BaseUrlExclusionList
PiperOrigin-RevId: 390136807
2021-09-16 13:47:51 +01:00
christosts
78fc27a1c6 Fix HLS endless retrying on load errors
This was originally reported on #9390. There was a bug that when HLS
loads failed, the player would endlessly retry and never fail with a
player error.

This change fixes a bug in HlsSampleStreamWrapper.onPlaylistError()
which would return true for a playlist whose load encountered an error
but could not be excluded, whereas the method should return false.

Issue: #9390

#minor-release

PiperOrigin-RevId: 397045802
2021-09-16 12:14:33 +01:00
olly
f5498ec4bf Rename ExoDatabaseProvider to StandaloneDatabaseProvider
PiperOrigin-RevId: 396959703
2021-09-16 12:12:49 +01:00
bachinger
86dc31f291 Reset only renderers that have been enabled
#exofixit

PiperOrigin-RevId: 396938258
2021-09-16 12:11:02 +01:00
olly
5a2fd983a9 Move database package to common module
PiperOrigin-RevId: 396936785
2021-09-16 12:09:16 +01:00
ibaker
4433ac5a2a Rollback of ee8df7afcb
*** Original commit ***

Ensure MediaSourceFactory instances can be re-used

This fixes DefaultDrmSessionManager so it can be used by a new Player
instance (by nulling out its reference to the playback thread, which is
unique per-Player instance). This only works if the
DefaultDrmSessionManager is 'fully released' before being used by the
second Player instance, meaning that the reference count of the manager
and all its sessions is zero.

#exofixit
Issue: #9099

***

PiperOrigin-RevId: 396861138
2021-09-16 12:07:27 +01:00
claincly
5f0395ee2d Add RTSP state machine.
Please reference RFC2326 Section A.1 for the state transitions.

PiperOrigin-RevId: 396799104
2021-09-16 12:05:27 +01:00
kimvde
416ec75b94 Add factory methods to create MediaCodecAdapter.Configuration
#exofixit

PiperOrigin-RevId: 396793873
2021-09-16 12:03:30 +01:00
huangdarwin
7947d27819 Docs: Add demos and testapps documentation.
* Add new README files for the Transformer demo and media/testapps/.
* Add an androidx demos README in media/github/

PiperOrigin-RevId: 396784430
2021-09-16 12:01:45 +01:00
andrewlewis
8540b7266c Add open @IntDef for track selection type
#exofixit

PiperOrigin-RevId: 396780460
2021-09-16 11:59:57 +01:00
ibaker
aa8fe5df86 Add a test for MediaItem equality when using whole-object setters
Follow-up to 9f3c2fb5e1

PiperOrigin-RevId: 396776798
2021-09-16 11:58:05 +01:00
jaeholee104
005336315c Add the options for the maximum resolution values for which the selector may choose to discard when switching up to a higher quality 2021-09-15 16:16:53 +09:00
krocard
92bf5d80c7 Add nullness annotations to TsExtractors
#exofixit

PiperOrigin-RevId: 396658717
2021-09-14 21:35:08 +01:00
ibaker
4d668f1b7b Fix how preacquired DRM sessions are released under resource contention
Previously the released preacquired sessions would start their keepalive
timeout, and so no additional resources would be freed in time for the
manager to retry the session acquisition.

This change adds an additional purge of keepalive sessions *after* the
preacquired sessions are released, which fixes the problem.

#exofixit
#minor-release

PiperOrigin-RevId: 396613352
2021-09-14 21:33:01 +01:00
andrewlewis
ee11d08760 Fix DashChunkSource @param name
This needs to match with the implementation for Dackka javadoc generation to succeed.

PiperOrigin-RevId: 396377019
2021-09-14 12:13:35 +01:00
olly
f8d60e2bbb Add flag for constant bitrate seeking even if input length is unknown
PiperOrigin-RevId: 396363113
2021-09-14 12:11:48 +01:00
krocard
cf0ec91934 Simplify rendererDisabledFlags bundling
Align redererDisableFlags (un)bundling
with the other field by using an explicit
temporary data structure (int array).

PiperOrigin-RevId: 396358143
2021-09-14 12:09:58 +01:00
olly
4940f21d48 Make position-out-of-range errors non-retryable
PiperOrigin-RevId: 396354920
2021-09-14 12:07:52 +01:00
andrewlewis
469c0e756a Use @C.TrackType more widely
Also add `TYPE_USE` target on the @IntDef (and fix @Targets for other
@IntDefs).

#exofixit

PiperOrigin-RevId: 396333212
2021-09-14 12:04:11 +01:00
kimvde
040a45f310 Remove deprecated getDefaultRequestProperties from HttpDataSource
#exo-fixit

PiperOrigin-RevId: 396329591
2021-09-14 12:02:18 +01:00
christosts
cd91ae4053 PlaybackStatsListener: add check when adding guessed times
This is was reported in #9257 where the PlaybackStatsListener may try to
access an emtpy ArrayList.

Issue: #9257

#minor-release
#exofixit

PiperOrigin-RevId: 396329373
2021-09-14 12:00:24 +01:00
bachinger
76d60b911e Migrate media item transition tests to TestExoPlayer
PiperOrigin-RevId: 396313679
2021-09-14 11:58:30 +01:00
andrewlewis
71a4b6337c Fix javadoc consistency
#exofixit

PiperOrigin-RevId: 396304941
2021-09-14 11:56:45 +01:00
andrewlewis
d74be1780d Fix issue ref
PiperOrigin-RevId: 396303288
2021-09-14 11:54:55 +01:00
claincly
ff7dcbd6f2 Handle RTSP 301/302 redirection.
PiperOrigin-RevId: 396303242
2021-09-14 11:53:06 +01:00
andrewlewis
76014cf0e9 Add support for generating javadoc with Dackka
PiperOrigin-RevId: 396297834
2021-09-14 11:51:14 +01:00
huangdarwin
a951769eaa Transformer Demo: Reduce visibility of demo-only include.
PiperOrigin-RevId: 395936070
2021-09-14 11:49:13 +01:00
Marcus Wichelmann
65001cc0e5
Added javadoc comments to HevcConfig 2021-09-13 16:48:08 +02:00
Marcus Wichelmann
45db77dc6d
Fixed some spaces 2021-09-13 12:34:44 +02:00
Marcus Wichelmann
dbc7088716
Keep the existing parseSpsNalUnit (and similar) methods to avoid breaking changes 2021-09-13 12:30:21 +02:00
Marcus Wichelmann
296074fbea
Extend SPS parsing when building the initial MP4 HevcConfig and include the PAR for propagating it into the Format 2021-09-13 10:27:55 +02:00
olly
68ee587e25 Constrain resolved period positions to be within the period
This is a candidate fix for #8906. As mentioned in that issue,
negative positions within windows might be (kind of) valid in
live streaming scenarios, where the window starts at some
non-zero position within the period. However, negative positions
within periods are definitely not valid. Neither are positions
that exceed the period duration.

There was already logic in ExoPlayerImplInternal to prevent a
resolved seek position from exceeding the period duration. This
fix adds the equivalent constraint for the start of the period.
It also moves the application of the constraints into Timeline.
This has the advantage that the constraints are applied as part
of state masking in ExoPlayerImpl.seekTo, removing any UI flicker
where the invalid seek position is temporarily visible.

Issue: #8906
PiperOrigin-RevId: 395917413
2021-09-10 15:11:52 +01:00