710 Commits

Author SHA1 Message Date
aquilescanta
764f9f20d6 Add info about trick-playness to the Format log string
PiperOrigin-RevId: 382139109
2021-06-30 13:50:32 +01:00
aquilescanta
155e27ec7c Move ExoPlaybackException back into core
PiperOrigin-RevId: 381941053
2021-06-30 13:47:30 +01:00
claincly
ffbec2234d Assign PlaybackException.ErrorCode to renderer failures.
PiperOrigin-RevId: 381852092
2021-06-30 13:45:02 +01:00
aquilescanta
465f7c06d8 Add ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED
And assign it to CleartextNotPermittedException.

PiperOrigin-RevId: 381247430
2021-06-30 13:34:31 +01:00
olly
1e9b6d66a3 [CronetDataSource] Support keeping the POST method and body for 302
Currently when a HTTP POST request receives a 302, CronetDataSource will change the request method from POST to GET for the redirected request, and drop the post body. This aligns with the behaviours of many user agents, but our use case would like to keep the POST method and the post body.

org.chromium.net.UrlRequest.followRedirect also changes POST to GET for 302, so should be avoided here.

PiperOrigin-RevId: 381233011
2021-06-30 13:28:50 +01:00
aquilescanta
fc26d4eeb1 Remove the last deprecated ParserException constructor
PiperOrigin-RevId: 381221669
2021-06-30 13:27:45 +01:00
samrobinson
2d44f82aa4 Correct naming of compilation field MediaMetadata.
PiperOrigin-RevId: 381016088
2021-06-30 13:20:18 +01:00
aquilescanta
1a8592c5c0 Add Player.Listener.onPlayerErrorChanged
Equivalent to onPlayerError, except it's also called for null.

PiperOrigin-RevId: 381015336
2021-06-30 13:17:49 +01:00
aquilescanta
81c542b6a7 Remove deprecated ParserException constructor
And replace it with factory method which includes more
context for error code assignment.

PiperOrigin-RevId: 380624625
2021-06-21 22:29:27 +01:00
samrobinson
775507088c Add a playlist title field to MediaMetadata.
Allows for compatibility with METADATA_KEY_COMPILATION.

PiperOrigin-RevId: 380179505
2021-06-21 22:17:25 +01:00
aquilescanta
fc1d3dd192 Make onPlayerError take a PlaybackException
PiperOrigin-RevId: 380174672
2021-06-21 22:15:01 +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
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
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
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
samrobinson
19629513af Populate MediaMetadata artwork from PictureFrame.
PiperOrigin-RevId: 378889901
2021-06-15 18:25:17 +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
samrobinson
5204bb0d44 Add playlist MediaMetadata to the Player.
PiperOrigin-RevId: 378407609
2021-06-10 11:23:30 +01:00
kimvde
e4263c4a67 Add fast forward and rewind methods to Player
PiperOrigin-RevId: 378104210
2021-06-08 13:04:56 +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
b56b769faa 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: 377374612
2021-06-08 12:50:09 +01:00
aquilescanta
af4b891c99 Use UnrecognizedFormatException for progressive media only
PiperOrigin-RevId: 377303025
2021-06-03 20:07:04 +01:00
kimvde
b0a3bc5b28 Rename ExoFlags to FlagSet
We want to remove mentions of ExoPlayer for
convergence.

PiperOrigin-RevId: 377290376
2021-06-03 20:04:39 +01:00
aquilescanta
36841d4f6f Replace one of the ParserException constructors with factory method
PiperOrigin-RevId: 377281961
2021-06-03 20:03:16 +01:00
olly
bb2e0bc0ef Bump targetSdkVersion to 30
- Remove Robolectric workarounds that are no longer needed
- Add workarounds for b/190021699

PiperOrigin-RevId: 377279422
2021-06-03 20:01:50 +01:00
andrewlewis
2260678bee Fix texture transformation in gldemo
`SurfaceTexture` provides a transform matrix with each buffer. Previously
gldemo ignored this but it is important to apply it to have the video render
properly.

The transformation matrix from the surface texture includes flipping so this
change removes the hard-coded flipping from `a_texcoord`.

Issue: #8992

#minor-release

PiperOrigin-RevId: 377271389
2021-06-03 19:59:43 +01:00
jinpark
0edb7873e0 Make RemotableTimeline public
PiperOrigin-RevId: 377231322
2021-06-03 13:52:42 +01:00
tonihei
2938d40bf4 Allow to specify the number of removed ad groups in AdPlaybackState.
This helps to remove old ad groups (e.g. those that fell out
of the live window) to keep the data size of AdPlaybackState small.

Also added this case to some existing unit tests to ensure it's
covered.

PiperOrigin-RevId: 376170653
2021-05-27 18:49:53 +01:00
tonihei
0d0ccadc83 Add getter for ad groups in AdPlaybackState.
This allows to decouple the data structure from the access. In
a future change, this allows to completely remove old ad groups
(e.g. for live streams where the number of groups would otherwise
grow forever).

Also move the time into the group itself for better encapsulation.

PiperOrigin-RevId: 376170408
2021-05-27 18:48:40 +01:00
ibaker
4033832cba Cleanup the MediaItem.Builder javadoc for 'conditional' setters
Many of the setters are ignored unless others are set - this change:
* Lists these conditions exhaustively.
* Uses more concise language to avoid overshadowing the main details
  of what the setter sets.
* Tweaks the language from 'is ignored' to 'shouldn't be called', to
  open up the future possibility of throwing an error if these are
  called without the 'required' setter also being present (see
  Issue: #8957).

#minor-release

PiperOrigin-RevId: 376162385
2021-05-27 16:10:54 +01:00
claincly
6d04b998f9 Use more factory method to create ParserException.
ParserException's constructor methods are deprecated.

#minor-release

PiperOrigin-RevId: 376150191
2021-05-27 16:04:10 +01:00
ibaker
41ce635a42 Fix docs on MediaItem.Builder#setDrmUuid
The docs on setLicenseUri say it's optional, and it has been since
379cd8a04f
(which should have changed this javadoc too)

#minor-release

PiperOrigin-RevId: 376139158
2021-05-27 16:02:56 +01:00