12248 Commits

Author SHA1 Message Date
ibaker
9c2b4b860b Enforce valid key responses in FakeExoMediaDrm
Make this behaviour optional, so it can be disabled for
AnalyticsCollectorTest where we don't use
FakeExoMediaDrm.LicenseServer.

PiperOrigin-RevId: 393133721
2021-08-27 16:39:47 +01:00
ibaker
84cf63a72f Test DefaultDrmSession provisioning is requested by provideKeyResponse
Follow-up to
<unknown commit>

PiperOrigin-RevId: 393132950
2021-08-27 16:37:59 +01:00
kimvde
f574ec952a Make TransformerTranscodingVideoRenderer support API < 23
PiperOrigin-RevId: 393100075
2021-08-27 16:36:09 +01:00
ibaker
c90d4fd371 Rollback of 557a1833f7
*** Original commit ***

Avoid adding spy to list in DataSourceContractTests

After the fix in https://github.com/mockito/mockito/issues/2331, the calls to
equals on the fake transfer listener (due to its use in a list of listeners)
are treated as interactions with it, meaning that the current verification of
'no more interactions' will fail.

This change makes the transfer listener used for testing count bytes then
delegate to another (mock) transfer listener that's passed in to avoid the
problem.

***

PiperOrigin-RevId: 393093785
2021-08-27 16:34:19 +01:00
bachinger
1d36083e25 Replace fully qualified link annotation
PiperOrigin-RevId: 393081803
2021-08-26 11:09:06 +01:00
kimvde
b42aa4c8dd Rename TransformerVideoRenderer
The new name indicates the difference with the
TransformerTranscodingVideoRenderer.

PiperOrigin-RevId: 393074749
2021-08-26 11:07:24 +01:00
ibaker
3710446b9d Test DefaultDrmSession with NotProvisionedException from getKeyRequest
PiperOrigin-RevId: 392927795
2021-08-26 11:05:31 +01:00
bachinger
a9913e5410 Add the media item to PositionInfo
PiperOrigin-RevId: 392914515
2021-08-26 11:03:40 +01:00
ibaker
e5a39eca1e Fix incorrect DataSourceContractTest test names
These should have been updated as part of
1affbf9357

#minor-release

PiperOrigin-RevId: 392913561
2021-08-26 11:01:59 +01:00
krocard
9fad5f4130 Add Track selection to the Player API
This cl doesn't implement completely the API for
`ExoPlayerImpl` as
`onTrackSelectionParametersChanged` is not called.

The follow up cl adds `TrackSelectionParameters` in PlaybackInfo
to correctly propagate the change event and mask it.

Additionally `TrackSelectionParameters` is serialized as a Parcelable
for now. It is transitioned to bundleable in a follow up cl.

PiperOrigin-RevId: 392899918
2021-08-26 10:58:27 +01:00
samrobinson
66c85245e6 Improve javadoc deprecation for ExoPlayer Components.
PiperOrigin-RevId: 392861577
2021-08-26 10:56:38 +01:00
kimvde
97466ab779 TsExtractor: handle packets without PTS
#minor-release
Issue: #9294
PiperOrigin-RevId: 392844983
2021-08-25 10:59:58 +01:00
andrewlewis
654a320792 Remove stray symlinks
These are unneeded for the external project

#minor-release

PiperOrigin-RevId: 392835942
2021-08-25 10:58:20 +01:00
samrobinson
628e744e26 Deprecate ExoPlayer VideoComponent.
PiperOrigin-RevId: 392668736
2021-08-25 10:56:33 +01:00
samrobinson
d3cc98d368 Deprecate ExoPlayer AudioComponent.
PiperOrigin-RevId: 392655598
2021-08-25 10:54:34 +01:00
olly
3d5e32dc2c Update references to ShadowBaseLooper to use ShadowLooper
ShadowBaseLooper is deprecated and will be removed in a forthcoming CL.

Tested:
    TAP --sample ran all affected tests and none failed
    http://test/OCL:391922969:BASE:391896312:1629439874303:285a1989
PiperOrigin-RevId: 392647041
2021-08-25 10:50:35 +01:00
kimvde
60681b9783 Add onReset implementation to TransformerTranscodingVideoRenderer
PiperOrigin-RevId: 392468554
2021-08-23 22:58:00 +01:00
bachinger
2f09ecef53 Make constructor of PlayerNotificationManager protected
Issue: #9303
#minor-release
PiperOrigin-RevId: 392022613
2021-08-23 14:08:39 +01:00
olly
3f16730763 Support generating notifications for paused downloads
- Android 12 will not allow our download service to be
  restarted from the background when conditions that
  allow downloads to continue are met. As an interim
  (and possibly permanent) solution, we'll keep the
  service in the foreground if there are unfinished
  downloads that would continue if conditions were met.
- Keeping the service in the foreground requires a
  foreground notification. Hence we need to be able to
  generate a meaningful notification for this state.

PiperOrigin-RevId: 391969986
2021-08-20 16:25:43 +01:00
olly
03d0b34ab9 Size dolby vision buffers for H265 by default
PiperOrigin-RevId: 391965200
2021-08-20 16:23:54 +01:00
olly
082542c152 Add note that isLastBuffer is best-effort only
PiperOrigin-RevId: 391952144
2021-08-20 11:54:15 +01:00
andrewlewis
557a1833f7 Avoid adding spy to list in DataSourceContractTests
After the fix in https://github.com/mockito/mockito/issues/2331, the calls to
equals on the fake transfer listener (due to its use in a list of listeners)
are treated as interactions with it, meaning that the current verification of
'no more interactions' will fail.

This change makes the transfer listener used for testing count bytes then
delegate to another (mock) transfer listener that's passed in to avoid the
problem.

PiperOrigin-RevId: 391949619
2021-08-20 11:52:32 +01:00
bachinger
0848188a43 Move TrackGroupTest and TrackGroupArrayTest to lib-common
PiperOrigin-RevId: 391837747
2021-08-20 11:50:51 +01:00
kimvde
1ae879788a 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.

#minor-release

PiperOrigin-RevId: 391776305
2021-08-20 11:49:12 +01:00
apodob
cbd6527926 Set format.sampleMimeType to TEXT_EXOPLAYER_CUES in SubtitleExtractor.
Samples are serialized using our custom CueEncoder. Information in
which format samples are encoded is needed by Renderer to decide which
decoder to use. Extractor receives Format object in the constructor and
prepares new Format object with sampleMimeType moved to codecs field
and new sampleMimeType set to "custom serialized exoplayer Cue".

PiperOrigin-RevId: 391739866
2021-08-20 11:44:06 +01:00
apodob
afc549fba4 Release subtitle outputBuffer after decoding.
PiperOrigin-RevId: 391509443
2021-08-19 10:51:34 +01:00
samrobinson
dfb9ac11e9 Deprecate ExoPlayer DeviceComponent.
PiperOrigin-RevId: 391499955
2021-08-19 10:48:03 +01:00
samrobinson
2e2e5e9feb Remove the ExoPlayerImpl implementation of ExoPlayer.
PiperOrigin-RevId: 391498621
2021-08-19 10:46:15 +01:00
bachinger
061d8ee193 Remove qualifier in link tag
PiperOrigin-RevId: 391485174
2021-08-19 10:44:38 +01:00
olly
85142be9a4 DRM refactor / cleanup
PiperOrigin-RevId: 391403236
2021-08-19 10:42:56 +01:00
krocard
cd297b048a Make Track selection objects Bundleable
Most of those objects needs to be sent to MediaControler.

`TrackSelectior.Parameters` could have stayed Parcelable,
but it needs to be `Bundleable` as it inherit from
`TrackSelectionParameters` that is and needs to be
serializable anyway for the demo app.
As a result it has also been migrated to bundleable.

PiperOrigin-RevId: 391353293
2021-08-19 10:38:51 +01:00
olly
b689fbd44e Rename DecryptionException to CryptoException
PiperOrigin-RevId: 391272611
2021-08-17 15:49:54 +01:00
andrewlewis
ce4c8e405c Add some range annotations
PiperOrigin-RevId: 391253301
2021-08-17 15:48:10 +01:00
samrobinson
d58e8df252 Deprecate ExoPlayer TextComponent.
PiperOrigin-RevId: 391077147
2021-08-17 15:46:16 +01:00
olly
ef0bfa487f Remove previously deprecated DefaultHttpDataSourceFactory
NO_EXTERNAL

PiperOrigin-RevId: 391054962
2021-08-17 15:42:49 +01:00
apodob
80d9d47d1c Add Extractor#release() implementation.
SubtitleExtractor.release() releases the underlying SubtitleDecoder.
This change introduces the STATE_RELEASED state. The extractor
handles the new state in the read() and seek() methods.

PiperOrigin-RevId: 391046478
2021-08-17 15:41:03 +01:00
olly
38e5864f87 Remove Player.Listener inheritance of TextOutput
PiperOrigin-RevId: 390630998
2021-08-17 15:37:29 +01:00
olly
743b33e821 Remove Player.Listener inheritance of VideoListener
NO_EXTERNAL

PiperOrigin-RevId: 390614839
2021-08-17 15:35:44 +01:00
ibaker
a44878482c Add section comments to MimeTypes.java
PiperOrigin-RevId: 390602716
2021-08-17 15:33:58 +01:00
olly
a83fe511b5 Move DecryptionException into decoder package
PiperOrigin-RevId: 390582804
2021-08-17 15:30:20 +01:00
olly
88a637bc45 Move format util classes to extractor package
PiperOrigin-RevId: 390577072
2021-08-13 11:45:37 +01:00
jaewan
149958fb07 Change return type of getMaxSeekToPreviousPosition() to long
This matches the type of all position related APIs.

PiperOrigin-RevId: 390558523
2021-08-13 11:43:52 +01:00
olly
24b0cf8c30 Fix references to AudioAttributes in Javadoc
PiperOrigin-RevId: 390365923
2021-08-12 16:39:52 +01:00
christosts
288fb4a8a5 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-08-12 16:36:23 +01:00
olly
2a6136f370 Remove Player.Listener inheritance of AudioListener
PiperOrigin-RevId: 390332263
2021-08-12 16:34:42 +01:00
apodob
c5b01b2f7b Add SubtitleExtractor which wraps a SubtitleDecoder.
SubtitleExtractor is a component that extracts subtitle data taken from
ExtractorInput into samples. Samples are pushed into an ExtractorOutput
(usually SampleQueue). As a temporary solution SubtitleExtractor uses
SubtitleDecoder to extract Cues from input data.

PiperOrigin-RevId: 390319875
2021-08-12 16:33:14 +01:00
claincly
21251e69a6 Revert unwanted changes.
PiperOrigin-RevId: 390319457
2021-08-12 16:31:51 +01:00
claincly
4ef0355884 Prototype video transcoding
The prototype is built upon Transformer and took many references from
TransformerAudioRenderer.

Please take a look and we can discuss more details.

PiperOrigin-RevId: 390192487
2021-08-12 16:30:21 +01:00
olly
f7a511af2d Remove Player.Listener inheritance of MetadataOutput
PiperOrigin-RevId: 390137267
2021-08-11 17:37:24 +01:00
christosts
2fa54e0df3 Minor javadoc fix in BaseUrlExclusionList
PiperOrigin-RevId: 390136807
2021-08-11 17:35:54 +01:00