91 Commits

Author SHA1 Message Date
olly
5d7641c6f1 Fix some lint warnings
PiperOrigin-RevId: 424383900
2022-01-28 09:37:06 +00:00
ibaker
08d827f2ed Migrate usages of deprecated MediaItem symbols
#minor-release

PiperOrigin-RevId: 407847729
2021-11-08 09:48:45 +00:00
ibaker
7de079493c Migrate usages of Window-based Player methods
Where this introduced an inconsistency (e.g. assigning to something
called `windowIndex`), I generally renamed the transitive closure of
identifiers to maintain consistency (meaning this change is quite
large). The exception is code that interacts with Timeline and Window
directly, where sometimes I kept the 'window' nomenclature.

#minor-release

PiperOrigin-RevId: 407040052
2021-11-02 12:08:18 +00:00
tonihei
8e03a0653a Suppress lint warning about wrong IntDef usage in media2 Utils
AudioAttributesCompat.AttributeUsage and C.AudioUsage use equivalent values and can be directly assigned.

PiperOrigin-RevId: 406815447
2021-11-01 16:48:41 +00:00
ibaker
9c9671a0af Remove all references to @NonNull
Our package-info.java files are annotated with @NonNullApi which results
in everything being non-null by default, so this annotation is never
needed.

#minor-release

PiperOrigin-RevId: 405864737
2021-10-29 11:03:05 +01:00
olly
b3a1dcfee9 Fix remaining releaseArtifactId renames
PiperOrigin-RevId: 404236349
2021-10-19 14:36:15 +01:00
kimvde
5ef00f0e96 Remove deprecated ControlDispatcher
The possibilities to set a ControlDispatcher have been removed in
<unknown commit> so that the ControlDispatcher is always a
DefaultControlDispatcher.

PiperOrigin-RevId: 403327092
2021-10-15 12:45:39 +01:00
kimvde
746ad2e6aa Remove deprecated ControlDispatcher from API surface
PiperOrigin-RevId: 403101980
2021-10-14 17:03:23 +01:00
ibaker
23fc1f4384 Migrate usages of SimpleExoPlayer to ExoPlayer
SimpleExoPlayer is being deprecated in favour of ExoPlayer.

PiperOrigin-RevId: 402869414
2021-10-14 12:07:21 +01:00
olly
b7d53fa4b2 README updates for session and media2
PiperOrigin-RevId: 402290115
2021-10-12 19:36:40 +01:00
olly
e4a5c07b5f Mechanical README cleanups 2
PiperOrigin-RevId: 401777730
2021-10-09 18:18:12 +01:00
olly
e7c6ed5e7f Mechanical README cleanups
PiperOrigin-RevId: 401767060
2021-10-09 18:14:36 +01:00
ibaker
e4221c3844 Rollback of ed23b2905b
*** Original commit ***

Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()

An upcoming change will update build() to return Player.

PiperOrigin-RevId: 401468532
2021-10-07 21:53:57 +01:00
ibaker
ee71c8387c Migrate usages of deprecated Player COMMAND_ constants
PiperOrigin-RevId: 401292817
2021-10-06 21:19:37 +01:00
bachinger
47573d4575 Remove inlined, fully qualified class name
PiperOrigin-RevId: 400742025
2021-10-05 11:22:10 +01:00
ibaker
f39dba0c5b Migrate usages of MediaItem.ClippingProperties to ClippingConfiguration
PiperOrigin-RevId: 399471555
2021-09-29 10:10:13 +01:00
ibaker
ed23b2905b Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()
An upcoming change will update build() to return Player.

PiperOrigin-RevId: 399382297
2021-09-28 16:38:20 +01:00
ibaker
a04f1d1726 Migrate usages of MediaItem.PlaybackProperties to LocalConfiguration
PiperOrigin-RevId: 399206106
2021-09-28 16:35:31 +01:00
ibaker
ad99a44083 Add empty sdk-version node to all AndroidManifest.xml files
PiperOrigin-RevId: 397772916
2021-09-21 14:17:33 +01:00
kimvde
01613a2e55 Remove usages of deprecated SimpleExoPlayer.Builder
PiperOrigin-RevId: 390130681
2021-08-11 17:34:19 +01:00
olly
7e8ba03147 Deprecate final non-nested Factory classes in upstream
PiperOrigin-RevId: 389661768
2021-08-09 20:07:24 +01:00
andrewlewis
9c27cfcda7 Fix parameter names on overridden methods
The dokka javadoc generation tool complains when parameter names don't match between a method and its override. This change updates occurrences where there is currently a mismatch.

Notable renamings that might be controversial:
- `onPlaybackStateChanged(int state)` to `onPlaybackStateChanged(int playbackState)` affected a lot of lines but seems more consistent with other '-Changed' methods.
- `handleMessage(int messageType, Object payload)` to `handleMessage(int messageType, Object message)`
- `ExtractorInput` and `DataSource` inherit `DataReader` which had `read(byte[] target, ...`, while data sources normally called the first parameter `buffer`. I have standardized these all to use `buffer` even though it looks out of place in the `ExtractorInput` interface (which has more `read` methods with `target`).

PiperOrigin-RevId: 387290360
2021-07-28 09:15:29 +01:00
kimvde
90113ce013 Deprecate ControlDispatcher in media2
PiperOrigin-RevId: 386185285
2021-07-22 12:05:09 +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
7aaba1ffe5 Migrate usage of Player.EventListener to Player.Listener
PiperOrigin-RevId: 381837274
2021-06-30 13:43:51 +01:00
Charlotte Van Petegem
efc6992e17
Remove useless assertions 2021-06-28 12:06:28 +02:00
Charlotte Van Petegem
13fb0baf0e
Use better builtin ControlDispatcher methods in media2 extension 2021-06-26 12:31:25 +02:00
aquilescanta
fc1d3dd192 Make onPlayerError take a PlaybackException
PiperOrigin-RevId: 380174672
2021-06-21 22:15:01 +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
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
samrobinson
2914e574e6 Rename MediaMetadata trackTitle and trackArtist to title and artist.
#minor-release

PiperOrigin-RevId: 372537414
2021-05-07 14:58:03 +01:00
bachinger
4c1a294b2e Format Java source files
PiperOrigin-RevId: 372127633
2021-05-06 13:32:25 +01:00
bachinger
688fd73d39 Remove AutoClosable implementation of PlayerCommandQueue
PiperOrigin-RevId: 370875532
2021-04-28 12:53:31 +01:00
krocard
4fc4ddbc6a Move AudioComponent to ExoPlayer leaving key methods in Player
PiperOrigin-RevId: 368413660
2021-04-15 10:51:05 +01:00
bachinger
cc26a92e07 Use MediaItem.DEFAULT_MEDIA_ID as default media ID
PiperOrigin-RevId: 368204261
2021-04-13 14:59:40 +01:00
bachinger
dc4148d576 Add positions and new reasons to onPositionDiscontinuity
PiperOrigin-RevId: 364861539
2021-03-24 19:56:25 +00:00
gyumin
01cb6ee3a3 Replace ObjectsCompat.equals to Util.areEquals
It's for consistency throughout libraries.

PiperOrigin-RevId: 360549525
2021-03-12 10:37:30 +00:00
gyumin
ff269403bf Lower minSdkVersion to 16 for media2 extension
From media2 1.1.0, it supports API level 16 and above.

PiperOrigin-RevId: 358797986
2021-02-23 12:29:27 +00:00
olly
94a4b905c9 Make additional modules depend only on common
ControlDispatcher and DefaultControlDispatcher also need
to move to common for the UI module. As does PlaybackPreparer,
although that will be removed entirely in a future release.

PiperOrigin-RevId: 356467394
2021-02-09 13:59:41 +00:00
olly
2a22b347c4 Suppress SwitchIntDef warning where it makes sense
In both cases it's deliberate that all excluded constants should use
the default branch. Furthermore, there are quite a lot of excluded
constants missing, so it's probably better to suppress the warning
than to include them all.

#minor-release

PiperOrigin-RevId: 355426749
2021-02-04 00:24:04 +00:00
jaewan
77a559640b Remove workaround for media1 session's looper restriction
PiperOrigin-RevId: 351936232
2021-01-15 10:57:57 +00:00
Oliver Woodman
b8b9a6411d Merge pull request #8412 from h6ah4i:media2-move-playlist-item
PiperOrigin-RevId: 351305387
2021-01-12 08:46:25 +00:00
Haruki Hasegawa
d522dbaf44
Add SessionPlayer#movePlaylistItem(int, int) support 2020-12-30 17:22:39 +09:00
olly
cc6638d12e Disable flaky media2 test
PiperOrigin-RevId: 348784475
2020-12-23 22:53:33 +00:00
olly
d01093d711 Rollback of dd7b379dc0
*** Original commit ***

DataSource.open() throws if already opened.

Update DataSource implementations to throw an error if open() is called
when the DataSource is already open.

***

PiperOrigin-RevId: 348783425
2020-12-23 22:53:24 +00:00
christosts
dd7b379dc0 DataSource.open() throws if already opened.
Update DataSource implementations to throw an error if open() is called
when the DataSource is already open.

PiperOrigin-RevId: 348609860
2020-12-23 22:52:21 +00:00
sungsoo
4907cf877a Make media2 extension depend on androidx media2 1.1.0
Issue: #8011
#minor-release
PiperOrigin-RevId: 347288689
2020-12-14 10:19:03 +00:00
andrewlewis
809b8a0679 Removed unneeded activity from media2 extension tests
These tests appear not to need an activity, and removing it means we don't need
to switch away from the deprecated `ActivityTestRule`.

#exofixit

PiperOrigin-RevId: 344037927
2020-11-24 16:03:21 +00:00
andrewlewis
1b1a1a6414 Mark pending TODOs for media2 1.1.0 consistently
#exofixit

PiperOrigin-RevId: 344031062
2020-11-24 16:03:12 +00:00
olly
2ddb5b8d94 Update nullness issue in SilkCastApiImpl.java,SessionCallback.java
Null check warning was reported by //java/com/google/android/apps/gsa/staticplugins/silk/silkcast:silkcast_nullness_checker

//third_party/java_src/android_libs/exoplayer/v2/extensions/media2/src/main:library_nullness_test

PiperOrigin-RevId: 343939763
2020-11-24 16:02:55 +00:00