12205 Commits

Author SHA1 Message Date
bachinger
78ecb10ac0 Add RepresentationHolder.selectedBaseUrl and use it for new chunks
PiperOrigin-RevId: 384968532
2021-07-16 11:24:21 +01:00
aquilescanta
99abb4e1e9 Check for TS synchronization before parsing packet from random position
#minor-release
Issue: #9100
PiperOrigin-RevId: 384962258
2021-07-16 11:22:55 +01:00
olly
7157f3c119 Move E2E DASH test into DASH package
PiperOrigin-RevId: 384912341
2021-07-15 14:47:20 +01:00
kimvde
85f3af8864 Use Player commands to enable UI buttons
PiperOrigin-RevId: 384910388
2021-07-15 14:45:44 +01:00
olly
08ac778ad6 Fix package name for UI tests
PiperOrigin-RevId: 384893655
2021-07-15 13:23:42 +01:00
olly
7edcc89421 Fix 1 ErrorProneStyle finding:
* Constructors and methods with the same name should appear sequentially with no other code in between, even when modifiers such as static or private differ between the methods. Please re-order or re-name methods.
  (see http://go/bugpattern/UngroupedOverloads)

This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Suggest a fix on the CL (go/how-to-suggest-fix).
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/error-prone-bug for category ErrorProneStyle if the change looks generally problematic.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.

This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/media/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/media/METADATA.
Anything wrong with the signup? File a bug at go/clrobot-bug.

#codehealth

PiperOrigin-RevId: 384877648
2021-07-15 13:22:18 +01:00
bachinger
f60c080500 Minor change to extractor module to avoid formatting changes
PiperOrigin-RevId: 384730845
2021-07-14 21:18:23 +01:00
samrobinson
b9ac5a145f Implement a DefaultMediaDescriptionAdapter that uses MediaMetadata.
PiperOrigin-RevId: 384681659
2021-07-14 21:16:20 +01:00
claincly
6512463280 Make network-based DataSource implementations use ErrorCode.
PiperOrigin-RevId: 384666131
2021-07-14 12:19:49 +01:00
claincly
f9f93c5a49 Handle absolute URI in RtspMediaTrack.
Issue: #9183

RFC2326 Section C.1.1 specifies that the URI to identify a track can be either
absolute (like rtsp://example.com/path) or relative (like "path"). Currently
we don't handle absolute URI, and this CL is to add the support.

Note though, we don't currently use the Content-Base or Content-Location
headers for the session URI.

PiperOrigin-RevId: 384649818
2021-07-14 12:18:31 +01:00
kimvde
ae31ebb143 Rename previous/next to seekToPrevious/NextWindow in Player
Also rename hasPrevious/Next to hasPrevious/NextWindow for consistency.

This makes it clearer what the difference between
seekToPrevious/NextWindow and seekToPrevious/Next is.

PiperOrigin-RevId: 384643373
2021-07-14 12:17:15 +01:00
olly
3670541465 Add option to disable 5G-NSA disambiguation
PiperOrigin-RevId: 384575860
2021-07-14 12:15:48 +01:00
olly
e403dda105 End ListenerSet iteration sooner
PiperOrigin-RevId: 384500287
2021-07-14 12:14:19 +01:00
olly
949f715c6b Avoid IncorrectContextUseViolation on Android 11
Applications may need to pass a non-visual context when creating
a DefaultTrackSelector (e.g., because they're audio-only or are
creating the selector in a background service).

Obtaining the default display via DisplayManager avoids the strict
mode violation that occurs when retrieving it via WindowManager.

#minor-release

PiperOrigin-RevId: 384487363
2021-07-14 12:13:06 +01:00
kimvde
58541fa1d1 Add SEEK_TO_NEXT command
PiperOrigin-RevId: 384477188
2021-07-14 12:11:46 +01:00
claincly
002874e9e9 Use DataSourceException in FileDataSource.
PiperOrigin-RevId: 384451470
2021-07-14 12:10:20 +01:00
aquilescanta
72b416c617 Remove ExoPlaybackException factory method that doesn't take errorCode
PiperOrigin-RevId: 384442821
2021-07-14 12:08:53 +01:00
aquilescanta
cdaf3e4e99 Move DRM error code assignment into DefaultDrmSession
PiperOrigin-RevId: 384280087
2021-07-13 10:10:24 +01:00
kimvde
8451be1b0b Add SEEK_TO_PREVIOUS command
PiperOrigin-RevId: 384257929
2021-07-13 10:09:06 +01:00
ibaker
1058997e38 Explicitly override all non-deprecated methods in Player.Listener
Most of the super-interfaces are deprecated, but the intention is that
only the types are deprecated and the methods themselves shouldn't be.
In order to reflect this in javadoc we override all the methods in
`Player.Listener` in order to 'cancel' the deprecation.

This change deliberately doesn't override methods that are explicitly
deprecated with documented replacements (like
`Player.EventListener#onPlayerStateChanged`) - these should contine to
be marked as deprecated in javadoc.

PiperOrigin-RevId: 384253725
2021-07-13 10:07:54 +01:00
aquilescanta
6c37c3c2f4 Add ERROR_CODE_DRM_LICENSE_EXPIRED for KeysExpiredException
The errorCode assignment will be done in a following CL.

PiperOrigin-RevId: 384230228
2021-07-13 10:05:20 +01:00
olly
822f6282f1 The sound, vibrate and ticker will only be played once
Android doc:https://developer.android.com/reference/android/app/Notification.Builder#setOnlyAlertOnce(boolean)

PiperOrigin-RevId: 384227580
2021-07-13 10:04:11 +01:00
claincly
ca28d6a041 Move TYPE definition out from DataSourceException.
The types (open/close/read) does not provide extra information about the thrown
playback exception, and they are not utilized at higher levels.

PiperOrigin-RevId: 384219870
2021-07-13 10:03:01 +01:00
kimvde
d84e19a302 Rename COMMAND_GET_MEDIA_ITEMS to COMMAND_GET_TIMELINE
This is more descriptive.

PiperOrigin-RevId: 383887927
2021-07-13 10:01:46 +01:00
kimvde
7031c4398d Re-order next and previous commands
This is consistent with seek back and forward commands.

PiperOrigin-RevId: 383867710
2021-07-13 10:00:31 +01:00
kimvde
bc0f3935d6 Re-order seekBack and seekForward in Player
This is more consistent with other Player methods like previous and
next.

PiperOrigin-RevId: 383832298
2021-07-13 09:59:14 +01:00
kimvde
699579fd4e Add seekToNext method to Player
PiperOrigin-RevId: 383816880
2021-07-13 09:57:58 +01:00
kimvde
7e6d82237a Rename MEDIA_ITEM to WINDOW is seek commands
This is more correct and is consistent with the Javadoc.

PiperOrigin-RevId: 383808096
2021-07-13 09:56:42 +01:00
ibaker
0a20ec6b4b Add comments to constants.gradle about 'external' version limitations
PiperOrigin-RevId: 383806284
2021-07-13 09:55:25 +01:00
krocard
298af78b4e Move most of DefaultTrackSelector params to TrackSelectionParameters
The parameters staying in DefaultTrackSelector are considered
too ExoPlayer specific to be part of the `Player` interface.
Those are:
 - exceedVideoConstraintsIfNecessary;
 - allowVideoMixedMimeTypeAdaptiveness;
 - allowVideoNonSeamlessAdaptiveness;
 - exceedAudioConstraintsIfNecessary;
 - allowAudioMixedMimeTypeAdaptiveness;
 - allowAudioMixedSampleRateAdaptiveness;
 - allowAudioMixedChannelCountAdaptiveness;
 - disabledTextTrackSelectionFlags;
 - exceedRendererCapabilitiesIfNecessary;
 - tunnelingEnabled;
 - allowMultipleAdaptiveSelections;
 - rendererDisabledFlags

Track selection override will be migrated in a follow up cl.

To avoid breaking backward compatibility,
`DefaultTrackSelector.Parameters` extends
`TrackSelectionParameters` and
`DefaultTrackSelector.ParametersBuilder` extends `TrackSelectionParameters.Builder`.
The change are thus transparent for clients.

Test are incomplete for now, as this is a relatively big cl, I though
the reviewer could give a first pass will the tests are completed.

PiperOrigin-RevId: 383767021
2021-07-09 09:25:15 +01:00
kimvde
1309b26ebe Add support for MP4 H263 atom type
#minor-release
Issue:#9158
PiperOrigin-RevId: 383660258
2021-07-09 09:24:13 +01:00
ibaker
20d67eb34a Rename Player.EventFlags -> Player.Event
IntDef names (like enums) are normally singular, and this isn't a 'flag'
IntDef.

PiperOrigin-RevId: 383659574
2021-07-09 09:22:54 +01:00
kimvde
e828dfbd7c Add getMaxSeekToPreviousPosition to Player
PiperOrigin-RevId: 383656919
2021-07-09 09:21:27 +01:00
kimvde
c4e99902c3 Add seekToPrevious method to Player
PiperOrigin-RevId: 383623440
2021-07-09 09:20:04 +01:00
samrobinson
d9618b5104 Fix missing word in javadoc.
PiperOrigin-RevId: 383448851
2021-07-09 09:19:01 +01:00
krocard
0dd296c2c9 Move BundleableUtil in common
It is used to implement `Bundleable` for
`TrackSelection`.

PiperOrigin-RevId: 383408386
2021-07-09 09:17:57 +01:00
aquilescanta
8b1fcfc40f Drop support for subclass instance unbundling in PlaybackException
PiperOrigin-RevId: 383408075
2021-07-09 09:16:41 +01:00
aquilescanta
54b4f6635d Add an errorCode field to DrmSessionException
In order to avoid doing the classification in ExoPlayerImplInternal. Note:
This only makes the constructor change. The error code assignment will
happen in an immediately following CL.

PiperOrigin-RevId: 383397729
2021-07-09 09:15:17 +01:00
bachinger
c0051c502a Remove temporary workaround for missing ACTION_SET_PLAYBACK_SPEED
PiperOrigin-RevId: 383390096
2021-07-09 09:13:58 +01:00
kimvde
1608f6f9da Remove the seekBack/Forward increment setters
This simplifies the API surface and the MediaController implementation.

PiperOrigin-RevId: 383385436
2021-07-09 09:12:49 +01:00
aquilescanta
73b5d0c37b Expand documentation of ERROR_CODE_DRM_CONTENT_ERROR
PiperOrigin-RevId: 383382813
2021-07-09 09:11:34 +01:00
aquilescanta
a302e34992 Remove ExoPlaybackException factory method that doesn't take errorCode
PiperOrigin-RevId: 383379334
2021-07-09 09:10:19 +01:00
krocard
74f262615e Update nullness checker from 3.3 to 3.5.0
As of 3.4.0 jdk8 annotation are integrated in checker.
https://github.com/typetools/checker-framework/releases/tag/checker-framework-3.4.0

3.5 is the last version available internally.

PiperOrigin-RevId: 383377733
2021-07-09 09:09:10 +01:00
samrobinson
23c884ee2a Add @return to the MediaDescriptionAdapter documentation.
PiperOrigin-RevId: 383268454
2021-07-09 09:08:11 +01:00
ibaker
18ffc0f50f Update Gradle jetifier config to use non-deprecated option
PiperOrigin-RevId: 383255572
2021-07-09 09:07:03 +01:00
aquilescanta
5b2e854344 Add missing call and rename getErrorCodeForMediaDrmErrorCode
PiperOrigin-RevId: 383251000
2021-07-09 09:06:00 +01:00
bachinger
6dbc1eb189 Make customization of fallback selection more flexible
PiperOrigin-RevId: 383245932
2021-07-09 09:04:43 +01:00
kimvde
15c565c7d7 Rename fastForward/rewind to seekForward/Back in Player
This matches the Javadoc better.

PiperOrigin-RevId: 383228021
2021-07-09 09:02:17 +01:00
olly
a632acc1d0 Fix 1 ErrorProneStyle finding:
* @ImaAdState is not a TYPE_USE annotation, so should appear before any modifiers and after Javadocs.
  (see go/java-style#s4.8.5-annotations)

This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Suggest a fix on the CL (go/how-to-suggest-fix).
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/error-prone-bug for category ErrorProneStyle if the change looks generally problematic.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.

This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/media/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/media/METADATA.
Anything wrong with the signup? File a bug at go/clrobot-bug.

#codehealth

PiperOrigin-RevId: 383121587
2021-07-09 09:01:04 +01:00
aquilescanta
5bb2d0386f Remove createRendererException which doesn't take errorCode
And assign error codes to all callers.

PiperOrigin-RevId: 383118513
2021-07-09 08:59:47 +01:00