7680 Commits

Author SHA1 Message Date
ibaker
043c2e7e33 Move CacheDataSourceContractTest to c.g.a.exoplayer2.upstream.cache
This is the package that CacheDataSource and CacheDataSourceTest(2) are
in.

PiperOrigin-RevId: 380156879
2021-06-21 22:12:21 +01:00
claincly
46645a9d47 Add basic playback test.
In prepare_withSupportedTrack_sendsPlayRequest(), the DESCRIBE includes two
tracks, one AAC and one MP4A-LATM. The test is run until a PLAY is sent, and
asserts on only one SETUP is sent (for AAC).

In prepare_noSupportedTrack_throwsPreparationError(), the DESCRIBE includes one
track: one MP4A-LATM. This format is not supported at the moment, so the player
will throw out an error, on which we assert.
PiperOrigin-RevId: 380131458
2021-06-21 22:10:04 +01:00
samrobinson
9c12d08531 Do not check the validity of dates in MediaMetadata.
PiperOrigin-RevId: 380009757
2021-06-21 22:08:51 +01:00
samrobinson
259f0f67a3 Add genre to MediaMetadata.
PiperOrigin-RevId: 380000589
2021-06-21 22:07:39 +01:00
samrobinson
d1aacc5f3b Add release date and recording date fields to MediaMetadata.
PiperOrigin-RevId: 379962022
2021-06-21 22:06:29 +01:00
christosts
d4ca29d748 Set master playlist's channelCount only on audio renditions
PiperOrigin-RevId: 379935363
2021-06-21 22:04:04 +01:00
christosts
b5a464cbcc Forward FRAME-RATE from the master playlist to renditions
Issue: #8960

#minor-release

PiperOrigin-RevId: 379922704
2021-06-21 22:02:51 +01:00
ibaker
0f23fddeef Add a test for the provisioning flow to DefaultDrmSessionManagerTest
#minor-release

PiperOrigin-RevId: 379913814
2021-06-21 22:01:38 +01:00
kimvde
56e97783eb Simplify DefaultControlDispatcher by using Player methods
PiperOrigin-RevId: 379732136
2021-06-21 21:59:14 +01:00
olly
63f12f0216 Remove obsolete Checker Framework suppression strings
More information: go/checker-3130-lsc

Tested:
    TAP for global presubmit queue passed after automated deflaking of failures: http://mondo/deflaker/run/ff80a4f9-d5d7-47ac-9560-63372e1ff624 http://mondo/deflaker/run/ca3ce61f-2af8-4fa7-b6e4-c98b5c4d950c
    http://test/OCL:379405669:BASE:379421861:1623763190392:bd2d256a
PiperOrigin-RevId: 379623080
2021-06-21 21:57:56 +01:00
olly
a3dbd61239 Remove obsolete Checker Framework suppression strings
More information: go/checker-3130-lsc

Tested:
    Some test failures are present, but the CL author has decided to mail the change anyway
PiperOrigin-RevId: 379622938
2021-06-21 21:56:37 +01:00
olly
2536222fbd HLS: Fix issue where new init segment would not be loaded
Issue: #9004
#minor-release
PiperOrigin-RevId: 379516815
2021-06-15 18:48:21 +01:00
olly
4e8895d5cb Fix issue where a trun atom could be associated with the wrong track
Note that this removes a workaround for malformed content, in which the
track_ID is set incorrectly. It's unclear there was sufficient reason to
implement that workaround, and so it's preferable to remove it, rather
than implementing the concept of unrecognized tracks, which would be
needed to keep it and to also fix this issue.

Issue: #9056
#minor-release
PiperOrigin-RevId: 379506261
2021-06-15 18:45:21 +01:00
ibaker
391ad7dbb9 Add DRM info to Format.toLogString
The Widevine H264 samples in the demo app now log this from the EventLogger:
```
[X] Track:0, id=1, mimeType=video/avc, bitrate=772315, codecs=avc1.42c01e, drm=[widevine,cenc], res=320x142, fps=24.0, supported=YES
```

And the VP9 ones log:
```
[X] Track:0, id=1, mimeType=video/x-vnd.on2.vp9, bitrate=588256, codecs=vp9, drm=[widevine], res=320x142, fps=23.809525, supported=YES
```

#minor-release

PiperOrigin-RevId: 379498332
2021-06-15 18:43:46 +01:00
kimvde
912acacbe1 Add onFastForward/RewindIncrementChanged to Player
PiperOrigin-RevId: 379497408
2021-06-15 18:42:19 +01:00
samrobinson
7d81f20f92 Add disc fields to MediaMetadata.
PiperOrigin-RevId: 379469182
2021-06-15 18:40:46 +01:00
Oliver Woodman
f90d0a26a4 Merge pull request #9023 from DolbyLaboratories:dev-v2-multicodecs
PiperOrigin-RevId: 379440699
2021-06-15 18:39:14 +01:00
olly
0b97f08955 Suppress warnings in preparation for Checker Framework 3.13.0 upgrade.
LSC: go/checker-lsc

Tested:
    TAP train for global presubmit queue
    http://test/OCL:379220771:BASE:379219228:1623675799153:ea986c7c
PiperOrigin-RevId: 379284240
2021-06-15 18:34:39 +01:00
claincly
8cc1328d89 Allow customizing the RtspServer using RtspServerResponseProvider.
PiperOrigin-RevId: 379282201
2021-06-15 18:31:58 +01:00
jinpark
581e543d39 Add toBundle(boolean excludeMediaItems) to Timeline.
Add MediaItem.EMPTY.

PiperOrigin-RevId: 379273172
2021-06-15 18:30:32 +01:00
gyumin
8777146e33 Fix forwarding onPlaybackSuppressionReasonChanged
PiperOrigin-RevId: 379264658
2021-06-15 18:29:09 +01:00
aquilescanta
5f1921f531 Make Player.getPlayerError return a PlaybackException
PiperOrigin-RevId: 378899373
2021-06-15 18:27:48 +01:00
Oliver Woodman
5f77bf0469 Merge pull request #6500 from DolbyLaboratories:dev-v2-isDirectPlaybackSupported
PiperOrigin-RevId: 378895355
2021-06-15 18:26:27 +01:00
samrobinson
19629513af Populate MediaMetadata artwork from PictureFrame.
PiperOrigin-RevId: 378889901
2021-06-15 18:25:17 +01:00
kimvde
aeeef65430 Add onAvailableCommandsChanged to AnalyticsListener
PiperOrigin-RevId: 378886637
2021-06-15 18:24:06 +01:00
aquilescanta
c62e444c13 Make PlaybackException be able to de-serialize subclasses
Otherwise, Player clients would not be able to benefit from
PlaybackException subclasses, like ExoPlaybackException.

PiperOrigin-RevId: 378873767
2021-06-15 18:22:51 +01:00
samrobinson
b511ed3b37 Add more MediaMetadata fields.
Added composer, conductor and writer.

PiperOrigin-RevId: 378844760
2021-06-11 12:26:37 +01:00
samrobinson
22f05e549a Populate MediaMetadata from VorbisComment.
PiperOrigin-RevId: 378844617
2021-06-11 12:25:39 +01:00
kimvde
53d67daaef Add available commands to fast forward and rewind
PiperOrigin-RevId: 378842286
2021-06-11 12:24:37 +01:00
olly
3e819d082a Make javadoc valid html5
As of [JDK-8247957](https://bugs.openjdk.java.net/browse/JDK-8247957), doclint
no longer supports html4.

Tested:
    Some test failures are present, but the CL author has decided to mail the change anyway
PiperOrigin-RevId: 378819179
2021-06-11 12:23:35 +01:00
jaewan
3a519b539b Include remote player cases for reason constants in Player
PiperOrigin-RevId: 378779411
2021-06-11 12:22:28 +01:00
olly
047037e74b Bump version to 2.14.1 and tidy release notes
#minor-release

PiperOrigin-RevId: 378665771
2021-06-10 17:39:58 +01:00
aquilescanta
805cd47682 Add methods for comparing PlaybackException data
Also replace the equals() method in MediaUtils.

PiperOrigin-RevId: 378638642
2021-06-10 17:37:42 +01:00
aquilescanta
b5dbadee0c Remove ParserException(cause) constructor
PiperOrigin-RevId: 378635295
2021-06-10 17:36:29 +01:00
ybai001
d176891c9c Restore to the original solution after further discussion 2021-06-10 21:00:10 +08:00
ybai001
aefc6bf51c Revert "Restore to the original solution after further discussion"
This reverts commit e7d1adf9176148aa07c56d540a9e0ddf65aa15e6.
2021-06-10 20:55:46 +08:00
ybai001
e7d1adf917 Restore to the original solution after further discussion 2021-06-10 20:54:44 +08:00
olly
c728de9947 Fix IncorrectContextUseViolation on Android 11
Issue: #8246
PiperOrigin-RevId: 378606475
2021-06-10 11:25:35 +01:00
samrobinson
5204bb0d44 Add playlist MediaMetadata to the Player.
PiperOrigin-RevId: 378407609
2021-06-10 11:23:30 +01:00
ybai001
aac5e10dee Update solution that DD+JOC track can't be selected 2021-06-10 09:33:46 +08:00
olly
628ebeeb2b Update @SuppressWarnings annotations for go/nullness diagnostics
in preparation for upgrading the version of the Checker Framework in google3.

More information: go/checker-3110-lsc

PiperOrigin-RevId: 378184078
2021-06-09 00:09:16 +01:00
claincly
1ca0efdd9b Move RtspClient creation into RtspPeriod.
RtspMediaSource uses the timeline update paradigm from ProgressiveMediaPeriod.

#minor-release

PiperOrigin-RevId: 378150758
2021-06-08 16:40:54 +01:00
aquilescanta
22b126cac3 Assign ERROR_CODE_IO_NO_PERMISSION to ErrnoException (EACCES)
PiperOrigin-RevId: 378134423
2021-06-08 16:38:44 +01:00
kimvde
e4263c4a67 Add fast forward and rewind methods to Player
PiperOrigin-RevId: 378104210
2021-06-08 13:04:56 +01:00
claincly
d0dc72fb6a Fix TCP retry bug when some RTSP tracks are not selected.
The size of rtspLoaderWrappers must match the number of tracks exposed by the
RTSP session (a track is exposed if its media description entry appears in
DESCRIBE's SDP response).

When retrying with TCP, the old code will start loading all exposed RTSP
tracks, regardless of whether they are selected.
The fixed code will only start loading selected tracks.

#minor-release

PiperOrigin-RevId: 377931030
2021-06-08 13:03:51 +01:00
olly
4b30cca914 Update @SuppressWarnings annotations for go/nullness diagnostics
in preparation for upgrading the version of the Checker Framework in google3.

More information: go/checker-3110-lsc

PiperOrigin-RevId: 377925828
2021-06-08 13:02:47 +01:00
olly
71fb7411ce Notify the client when ExoPlayer fallbacks to a different codec.
PiperOrigin-RevId: 377602447
2021-06-08 13:01:44 +01:00
claincly
efdd55fad5 Propagate duplicated keys error in SDP better.
The current code does not catch the IAE thrown when building a MediaDescription
or SessionDescription. This CL catches the IAE and propagates it as a
ParserException.

Issue: #9014.

#minor-release

PiperOrigin-RevId: 377544439
2021-06-08 13:00:38 +01:00
aquilescanta
4e85184955 Make PlayerView depend on PlaybackException
PiperOrigin-RevId: 377542206
2021-06-08 12:59:38 +01:00
claincly
95c0c5caa5 Allow TCP retry when using authentication.
The old version's retry logic will not work if using authentication.
Specifically, we use the same authentication parameters from the previous
session, and the RTSP server will reject such parameter.

In this fix, we reset the authentication info on retry. Further, we retry the
last request on receiving a 401 Unauthorized, rather than sending out another
DESCRIBE request.

#minor-release

PiperOrigin-RevId: 377539711
2021-06-08 12:58:39 +01:00