412 Commits

Author SHA1 Message Date
olly
5e88837ecc Bump version to 2.14.1 and tidy release notes
PiperOrigin-RevId: 378665771
2021-06-10 17:51:02 +01:00
andrewlewis
a83e4a7ab8 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-06 23:38:22 +01:00
ibaker
5cec2a761f 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-06-06 23:36:55 +01:00
ibaker
6ec0044cd5 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-06-06 23:36:39 +01:00
samrobinson
50cae4b944 Add year to MediaMetadata.
#minor-release

PiperOrigin-RevId: 375674759
2021-06-06 23:34:25 +01:00
ibaker
55f50e24eb Defensively copy potentially mutable text in Cue constructor
Without this the Cue isn't deeply immutable, which can be a bit
surprising.

PiperOrigin-RevId: 375477571
2021-06-06 23:33:59 +01:00
samrobinson
81b8bb671c Add an extras bundle to MediaMetadata.
#minor-release

PiperOrigin-RevId: 375435339
2021-06-06 23:31:29 +01:00
samrobinson
ae400176b2 Add a mediaType field to MediaMetadata.
#minor-release

PiperOrigin-RevId: 375097412
2021-06-06 23:31:23 +01:00
samrobinson
941a71ae28 Add track number & total to MediaMetadata
#minor-release

PiperOrigin-RevId: 374235979
2021-06-06 23:28:41 +01:00
samrobinson
6bba218e72 Add an artwork field to MediaMetadata
#minor-release

PiperOrigin-RevId: 373410795
2021-06-06 23:28:08 +01:00
kim-vde
cfe2811091 Merge pull request #8860 from KeiMurayamaS:dev-v2-add-mpegh-parser
PiperOrigin-RevId: 373142159
2021-06-06 23:15:12 +01:00
olly
eb195eff36 Fix Javadoc references to deprecated EventListener
#minor-release

PiperOrigin-RevId: 372919342
2021-05-10 23:49:20 +01:00
olly
90fc24c900 Bump version to 2.14.0 and tidy release notes
PiperOrigin-RevId: 372910834
2021-05-10 23:49:01 +01:00
samrobinson
e295a15d2d Add javadoc to the MediaMetadata setters.
#minor-release

PiperOrigin-RevId: 372549185
2021-05-10 23:47:37 +01:00
samrobinson
1c8f91c130 Rename MediaMetadata trackTitle and trackArtist to title and artist.
#minor-release

PiperOrigin-RevId: 372537414
2021-05-07 14:59:09 +01:00
samrobinson
07cd8d101d Add fields to MediaMetadata requested by MediaAPIs
#minor-release

PiperOrigin-RevId: 372448985
2021-05-07 11:00:53 +01:00
samrobinson
c97956ea29 Use getters in Rating subclasses rather than direct field access.
#minor-release

PiperOrigin-RevId: 372368685
2021-05-07 10:59:51 +01:00
gyumin
3be50b26a0 Revise javadoc for Rating classes
PiperOrigin-RevId: 371625281
2021-05-07 10:59:05 +01:00
jaewan
54440261b0 Move Rating class to library-common
Rating class should be in the same module as MediaMetadata.

Tested:
  $ ./gradlew --stacktrace :exo-library-common:tDUT
  $ ./gradlew --stacktrace :media2-session:tDUT
  $ ./gradlew --stacktrace :media2-session-vct-current:cAT
PiperOrigin-RevId: 370902917
2021-05-07 10:52:40 +01:00
tonihei
1a06f3c855 Add missing isPlaceholder forwarding in SinglePeriodAdTimeline
Also make future similar issues less likely by adding isPlaceholder
to the set method of Period (in case forwarding Timeline
implementations use this instead of just updating values selectively)

#minor-release

PiperOrigin-RevId: 372138523
2021-05-06 13:43:47 +01:00
krocard
002ee4de26 Deprecate EventListener in favor of Listener
#minor-release

PiperOrigin-RevId: 371348520
2021-05-04 11:25:52 +01:00
krocard
3375ee9c6a Deprecate component listener in favor of player
All `add*Listener` and `add*Output` methods are
deprecated in favor of `addListener`.

As for the class themselves `VideoListener` and
`AudioListener` are not used internaly by ExoPlayer,
`VideoRendererEventListener`
and `AudioRendererEventListener` are use in their
place.
As a result `VideoListener` and `AudioListener`
can be deprecated in favor `Listener`.

On the other hand `TextOutput` and `MedataOutput`
are used both in the player interface and internally in
renderers.
This means that those class can't be deprecated.
There usage in the public interface are indirectly
deprecated as their is no way to use them without
using the deprecated `add*Output`.
Thus it's not an issue that the class themselves are
not deprecated.

#minor-release

PiperOrigin-RevId: 371318268
2021-05-04 11:24:03 +01:00
dlafayet
cd3ebb3fe7 Merge #8858: Support ebutts:multiRowAlign in TTML text renderer
Imported from GitHub PR https://github.com/google/ExoPlayer/pull/8858

Fix bug in text alignment inheritance where child does not correctly inherit ancestor's setting

@icbaker
Merge 70eb4bceb73b3f07e2f8d545b4fa7961189ac52a into 45616f916b28c9187b3e0f0dd18797464a079cdc

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/ExoPlayer/pull/8877 from dlafayet:multirowalign-cue d942b50a40525fea5d11b35a33d3bbc512550960
PiperOrigin-RevId: 371306966
2021-05-04 11:23:37 +01:00
ibaker
cfec557ff0 Reformat some javadoc
PiperOrigin-RevId: 371068549
2021-05-04 11:21:28 +01:00
bachinger
d8da136d0f Remove ForwardingPlayer from 2.14.0 release 2021-04-30 12:05:07 +01:00
krocard
0f7ef1ea60 Add get video size
Move VideoSize in the common module and have the Player return it.

`Listener` and `AnalyticsListener` `onVideoSizeChanged` are updated
with the old method deprecated.

`VideoRendererEventListener.onVideoSizeChanged` was also migrated to
`VideoSize` but the old method is removed, not deprecated.
This is because:
 - apps calling/listening to this method is a rare and niche use-case.
 - it would introduce hard to diagnostic issues where if only the caller
   or the callee is updated to use the new method, the event will be lost.
   This doesn't occur with the other 2 listeners as the caller is always
   in ExoPlayer library and was updated to call both the old and new methods.

VideoSize is used everywhere except in `Format` as this would lead to
too much refactoring and backward compatibility breakage for little gain.

#minor-release

PiperOrigin-RevId: 371087419
2021-04-29 13:26:41 +01:00
samrobinson
79316aa5ac Add track artist, album artist and album title to MediaMetadata.
#minor-release

PiperOrigin-RevId: 370881618
2021-04-28 17:39:28 +01:00
bachinger
b71b067b81 Revert "Add initial code for PlaybackException"
This reverts commit 1d96d6b6b097cca0ba511821e2309e4c966b4954.
2021-04-28 16:35:29 +01:00
samrobinson
b336df3ed3 Move the ownership of MediaMetadata to ExoPlayerImpl.
Add the onMediaMetadataChanged event to onEvents.

PiperOrigin-RevId: 370738521
2021-04-27 21:42:39 +01:00
aquilescanta
1d96d6b6b0 Add initial code for PlaybackException
Deferred the addition of error codes to ease the review process.

PiperOrigin-RevId: 370687238
2021-04-27 17:43:09 +01:00
tonihei
26a6aad3e4 Misc ad handling improvements.
1. Clarify intention of getAdGroupIndexForPositionUs and
   getAdGroupIndexAfterPositionUs. Both methods are used for very
   specific but different purposes and encode the logic of which
   ads should be played at which time, so it's helpful to clarify
   this in the documentation as well.
2. Change one usage getAdGroupIndexForPositionUs to use the already
   existing nextAdGroupIndex. This is also more in line with the
   intended usage as clarified in step 1.
3. Update MediaPeriodQueueTest for updateQueuedPeriods to only
   look for duration changes in future periods, not in the
   current one, because that's not handled MediaPeriodQueue for ads
   and the test is just passing by chance now. Also remove wrong
   advancePlaying() calls that are already implicitly included in
   the preceding enqueueNext() call.
4. Fix a minor bug where post-roll ads are not checked whether they
   are played already before using them as the next ad group. Also
   added a test covering this case.

#minor-release

PiperOrigin-RevId: 370664131
2021-04-27 17:42:39 +01:00
claincly
8135b9c273 Publish ExoPlayer's support for RTSP.
Allow ExoPlayer to open URIs starting with rtsp://

PiperOrigin-RevId: 370653248
2021-04-27 17:41:38 +01:00
christosts
74de77a1b6 Add ForwardingPlayer
The ForwardingPlayer implements the Player interface and forwards all
operations to another Player instance. Apps will be able to override
methods of ForwardinPlayer in order to modify and/or suppress specific
Player funcionalities.

This commit introduces the ForwardingPlayer which simply forwards all
Player operations to another Player instance. In follow-up changes,
the ForwardingPlayer will be extended so that it eventually reaches the
feature-set offered by ControlDispatcher.

PiperOrigin-RevId: 370653167
2021-04-27 17:41:23 +01:00
krocard
5153ccde98 Remove release command for symmetry with Player construction
Release is a life cycle operation that should only be called when
the player is no longer needed. It's linked to the player lifecycle
and thus very different from prepare/stop.
As a result, it should not be in the same command.

Additionally it's not clear if remote players will ever need to call release,
as the player creator is best candidate to release it.

As a result the release operation doesn't have a use case for a command.
A release command can be added later if a need is identified.

PiperOrigin-RevId: 370649214
2021-04-27 17:41:06 +01:00
samrobinson
3f3d1fb5f2 Change String MediaMetadata.title to CharSequence trackTitle.
PiperOrigin-RevId: 370439509
2021-04-26 18:29:01 +01:00
christosts
0616c0d118 Add Player.getAvailableCommands()
Add method getAvailableCommands() in Player interface to return
the available commands. Method isCommandAvailable() moved to
BasePlayer since it can be implelented by calling
getAvailableCommands().

PiperOrigin-RevId: 370059328
2021-04-26 18:01:03 +01:00
samrobinson
9d4cbd4e05 Update MediaMetadata from static and dynamic metadata.
PiperOrigin-RevId: 369671127
2021-04-21 18:46:58 +01:00
ibaker
d63cd461fa Remove spurious blank lines introduced in dafea4e40f
PiperOrigin-RevId: 369648457
2021-04-21 18:46:22 +01:00
ibaker
dafea4e40f Re-format some javadoc
PiperOrigin-RevId: 369642047
2021-04-21 18:46:00 +01:00
olly
2e5a616f26 Core/UI decoupling: Move spherical back to core
A subsequent change will make the UI module access
SphericalGLSurfaceView and VideoDecoderGLSurfaceView
using reflection, now we're at the point where we only
need to reflect the constructors.

PiperOrigin-RevId: 369630102
2021-04-21 18:45:24 +01:00
olly
a78b18298b Remove some long deprecated methods
PiperOrigin-RevId: 369626542
2021-04-21 18:45:06 +01:00
andrewlewis
efce7b9e2c Update internal codebase location for vp9 extension
PiperOrigin-RevId: 369443204
2021-04-21 09:48:30 +01:00
krocard
08336e372d Rollforward of Move VideoComponent to ExoPlayer
The original cl has been fixed by not implementing
VideoListener but Player.Listener in
StyledPlayerView.

VideoFrameMetadataListener and CameraMotionListener are still part
of the Player interface as a good way to break the UI dependency
on them has not yet been finalised.

PiperOrigin-RevId: 369417682
2021-04-20 14:02:48 +01:00
ibaker
6550ea88ea Rollback of cdebf6c68b
*** Original commit ***

Move VideoComponent in ExoPlayer

VideoFrameMetadataListener and CameraMotionListener are still part
of the Player interface as a good way to break the UI dependency
on them has not yet been finalised.

***

PiperOrigin-RevId: 369194309
2021-04-20 00:09:45 +01:00
krocard
cdebf6c68b Move VideoComponent in ExoPlayer
VideoFrameMetadataListener and CameraMotionListener are still part
of the Player interface as a good way to break the UI dependency
on them has not yet been finalised.

PiperOrigin-RevId: 368863829
2021-04-20 00:08:08 +01:00
ibaker
fff7b8079a Replace Util.toUpperInvariant() with Ascii.toUpperCase()
Even when fixed to the US locale (and thus avoiding surprising behaviour
in e.g. Turkish locale with "i" and "I") there are unexpected behaviours
when upper and lower casing non-ASCII characters.

For example it's sometimes not symmetric, e.g.:
"ẞ".toLowerCase() -> "ß"
"ß".toUpperCase() -> "SS"

In all the ExoPlayer usages we are either dealing with known-ASCII
strings (e.g. MIME types) or comparing against ASCII constant strings
anyway, so it seems easier to just use Guava's ASCII-only class in these
cases.

Util.toUpperInvariant() is null-tolerant, while Ascii.toLowercase() is
not. Most usages in this change are clearly non-null. The BandwidthMeter
usages aren't annotated @Nullable, but the current code *would* work if
countryCode was null in both cases. These methods will now throw NPE if
they're passed null.

PiperOrigin-RevId: 368816287
2021-04-16 14:13:08 +01:00
jaewan
66e4e47e1a Fix typo
PiperOrigin-RevId: 368789636
2021-04-16 14:12:33 +01:00
andrewlewis
14e085d6c0 Update internal codebase location for av1 extension
PiperOrigin-RevId: 368585664
2021-04-15 10:53:36 +01:00
jaewan
56899cb0e5 Tweak discontinuity reason definitions for remote players
Discontinuity reasons may not be precisely obtained for remote
player. 'Remote Player' means that playback is owned by another
app or device and the same playback can be controller by other
clients simultaneously. The MediaController is an example.
If the remote playback doesn't provide discontinuity reason, then
player cannot differentiate between automatic playback transition
and seekTo() from another client.

This CL tweaks the discontinuity reason definitions, so reasons
can be obtained without remote playback's support.
This doesn't effect the local Players, such as SimpleExoPlayer.

PiperOrigin-RevId: 368579577
2021-04-15 10:53:26 +01:00
jaewan
f0d84f21d3 Make PositionInfo Bundleable
PiperOrigin-RevId: 368453894
2021-04-15 10:53:15 +01:00