7514 Commits

Author SHA1 Message Date
kim-vde
0a93cc23f0 Merge pull request #8894 from cdongieux:fix/issue-8847
PiperOrigin-RevId: 373128118
2021-05-11 16:01:03 +01:00
olly
b95fba2cb7 Remove deprecated Timeline.getWindow method
PiperOrigin-RevId: 373126944
2021-05-11 16:00:40 +01:00
aquilescanta
508c6652ba Add test for PlaybackException
PiperOrigin-RevId: 373026239
2021-05-10 23:42:51 +01:00
claincly
beeb6e829d Enable reading interleaved message in RtspMessageChannel.
RTSP interleaving enables RTP packets to be sent using RTSP's TCP connection.
The interleaving RTSP messages contain binary data only and always start with a
'$'. Normal RTSP messages contain line breaks (CRLFs) that indicate complete
lines.

#minor-release

PiperOrigin-RevId: 372990181
2021-05-10 23:42:31 +01:00
olly
89cfa4df32 Remove some deprecated Player methods
PiperOrigin-RevId: 372981744
2021-05-10 23:42:10 +01:00
olly
d282ad25c1 Include RTSP module in gradle project
#minor-release

PiperOrigin-RevId: 372981022
2021-05-10 23:41:50 +01:00
aquilescanta
763ef2b911 Avoid type-ambiguous overloads in ExoPlaybackExceptionTest
PiperOrigin-RevId: 372942778
2021-05-10 23:41:09 +01:00
tonihei
5167ca65fb Fix bug where content position of ads in moving live windows is updated
The method to handle Timeline updates currently uses
 isAd() || isPlaceholder()
to trigger two things:
 1. Using the existing requested content position as the content
    position.
 2. Re-resolving the content position from window to period in case
    it changed since the last update.

The condition is correct for case (1) because ads must use the content
position (and not the position in the ad) and a placeholder period must
keep using the requested content position as well until the media
information is no longer a placeholder.

However, case (2) only needs to be done if the content position is
C.TIME_UNSET (to start at the default position) OR if the period is
still a placeholder and we want to re-resolve the position.

The case where re-resolution shouldn't be done is for ads with a non-
placeholder period and a concrete content position. This likely only
affects ads in live stream where the content position is currently
moving with the live stream instead of staying where it is.

PiperOrigin-RevId: 372929439
2021-05-10 23:40:47 +01:00
tonihei
8a5d21adef Remove reference to deprecated Player.EventListener.
#minor-release

PiperOrigin-RevId: 372925409
2021-05-10 23:40:26 +01:00
olly
3c64bc1b49 Fix Javadoc references to deprecated EventListener
#minor-release

PiperOrigin-RevId: 372919342
2021-05-10 23:40:05 +01:00
olly
01f85394d2 Clean up RtspMediaSource.Factory
- Don't deprecate methods not deprecated in the base class and that
  could one day be useful.
- Better document deprecation of other methods.

#minor-release

PiperOrigin-RevId: 372919080
2021-05-10 23:39:45 +01:00
olly
e908750336 Bump version to 2.14.0 and tidy release notes
#minor-release

PiperOrigin-RevId: 372910834
2021-05-10 23:39:25 +01:00
ibaker
7a3d8b5ef0 Swallow exceptions in TestContentProvider when writing to a pipe fails
The existing code results in flaky tests, where sometimes the write
fails (with "EPIPE (broken pipe)") and the exception propagates out
and causes the test to never complete and time out.

Swallowing the exception resolves this flakiness.

#minor-release

PiperOrigin-RevId: 372909415
2021-05-10 23:39:03 +01:00
Christophe Dongieux
928537182b Make DASH segment available at full network speed if index is marked as explicit 2021-05-10 17:34:29 +02:00
kimvde
7f2922d6f2 Deprecate ExoPlayer.Builder.
Apps should migrate from ExoPlayerImpl to SimpleExoPlayer.

#minor-release

PiperOrigin-RevId: 372562923
2021-05-10 09:38:08 +01:00
aquilescanta
f415ea2372 Make PlaybackException's Bundleable implementation subclass friendly
PiperOrigin-RevId: 372552003
2021-05-10 09:37:51 +01:00
samrobinson
1a6984fbe0 Add javadoc to the MediaMetadata setters.
#minor-release

PiperOrigin-RevId: 372549185
2021-05-10 09:37:33 +01:00
aquilescanta
e96fde5fe4 Add an IntDef for PlaybackException's Bundle key fields
PiperOrigin-RevId: 372548259
2021-05-10 09:37:14 +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
samrobinson
09a8993b56 Add fields to MediaMetadata requested by MediaAPIs
#minor-release

PiperOrigin-RevId: 372448985
2021-05-07 10:22:27 +01:00
bachinger
15ce148877 Avoid media item transitions for auto discontinuities when ads involved
#minor-release

PiperOrigin-RevId: 372433555
2021-05-07 10:22:08 +01:00
samrobinson
bbeedd5e76 Use getters in Rating subclasses rather than direct field access.
#minor-release

PiperOrigin-RevId: 372368685
2021-05-07 10:21:50 +01:00
aquilescanta
1408fe0403 Remove ExoPlaybackException's cause field
It was originally introduced because it was guaranteed to be non-null
unlike the inherited field. But ExoPlaybackException.cause has been
nullable for some time, so there's no gain in not using the inherited
field.

PiperOrigin-RevId: 372329740
2021-05-07 10:21:28 +01:00
olly
782c1739c8 Use correct Log class
#minor-release

PiperOrigin-RevId: 372314890
2021-05-06 13:35:40 +01:00
jinpark
d388ab25cc Make Player.Commands Bundleable
PiperOrigin-RevId: 372266634
2021-05-06 13:34:04 +01:00
aquilescanta
1f83926d2f Reserve x000 error codes for the UNSPECIFIED error codes
PiperOrigin-RevId: 372146069
2021-05-06 13:33:25 +01:00
tonihei
61bbdb3794 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:33:06 +01:00
bachinger
4c1a294b2e Format Java source files
PiperOrigin-RevId: 372127633
2021-05-06 13:32:25 +01:00
aquilescanta
10ee4689f1 Fix some comments pending from previous change
PiperOrigin-RevId: 372094221
2021-05-06 13:31:47 +01:00
olly
2ef52904af Remove remaining PlayerView/StyledPlayerView core dep
PiperOrigin-RevId: 372092412
2021-05-06 13:31:27 +01:00
olly
9626e24905 Remove Format.create deprecated methods
PiperOrigin-RevId: 372088869
2021-05-06 13:30:50 +01:00
krocard
4d4e235697 Allow disabling offload gapless
Issues have been identified around
offload gapless track transitions blocking
the track timestamp.
Until those issues are root caused, this settings
allows to disable gapless offload completely.

PiperOrigin-RevId: 372081545
2021-05-06 13:30:31 +01:00
tonihei
b71c47f0dd Clarify timebase of media times in MediaLoadData.
Also fix unncessary adjustment done in ClippingMediaSource.

#minor-release

PiperOrigin-RevId: 372080724
2021-05-06 13:30:12 +01:00
aquilescanta
0b7865ead9 Add PlaybackException error codes
PiperOrigin-RevId: 371919596
2021-05-04 18:35:55 +01:00
olly
a264a0a04f Remove deprecated UI methods
PiperOrigin-RevId: 371809078
2021-05-04 11:18:26 +01:00
olly
dd0981a5b6 Access ExoPlayer specific UI components via reflection
PiperOrigin-RevId: 371799441
2021-05-04 11:18:07 +01:00
gyumin
416bd43584 Revise javadoc for Rating classes
PiperOrigin-RevId: 371625281
2021-05-04 11:17:44 +01:00
jinpark
f7a8c6e4de Add command for setting media items metadata
PiperOrigin-RevId: 371482546
2021-05-04 11:17:22 +01:00
krocard
3dc6cf6bec Deprecate EventListener in favor of Listener
#minor-release

PiperOrigin-RevId: 371348520
2021-04-30 18:56:35 +01:00
claincly
4bf7477e3e Flatten packages within the RTSP package.
#minor-release

PiperOrigin-RevId: 371337762
2021-04-30 18:56:17 +01:00
claincly
dfb87638e7 Introduce RtpDataChannel interface.
#minor-release

PiperOrigin-RevId: 371326814
2021-04-30 18:55:59 +01:00
claincly
4eccc0356c Allow retry opening RTP ports.
In RtpDataLoadable.load, the second UDP data source is opened on the port we
specify. If the port is already in use, a BindException is thrown.

#minor-release

PiperOrigin-RevId: 371319522
2021-04-30 18:55:42 +01:00
krocard
ffe31be08b 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-04-30 18:55:06 +01:00
olly
67fc1f0c0a Remove deprecated Downloader constructors
PiperOrigin-RevId: 371307278
2021-04-30 18:54:32 +01:00
dlafayet
8c7d6447c0 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-04-30 18:54:13 +01:00
bachinger
99492902c0 Merge pull request #8877 from dlafayet:textAlign
PiperOrigin-RevId: 371306900
2021-04-30 18:53:54 +01:00
ibaker
0a54360f99 Tweak verifyApplicationThread to compare Threads, not Loopers
#minor-release

PiperOrigin-RevId: 371306241
2021-04-30 18:53:35 +01:00
olly
f7c4fd491b Remove deprecated PlaybackPreparer
PiperOrigin-RevId: 371170769
2021-04-30 11:44:07 +01:00
christosts
7d2a2aa283 Override available commands in ForwardingPlayer
This change adds an API in the ForwardingPlayer to disable commands.
This is affecting what Player.isCommandAvailable() returns as
well as what is being advertised from the
EventListener.onAvailableCommandsChanged() callback.

For the callback case, the ForwardingPlayer needs to intercept the
callback. It does so by wrapping registered EventListener and Listener
instances, which resulted in some boiler-plate code. In addition, there
is logic on the wrapped listeners to avoid triggering a queued callback
if all listeners have been removed in the meantime. This includes the
case where new listeners are added while callbacks scheduled for the
removed listeners are still pending.

PiperOrigin-RevId: 371139703
2021-04-30 11:43:48 +01:00
bachinger
cdff456621 Make copybara remove the LINT.IfChange tag
PiperOrigin-RevId: 371135534
2021-04-29 17:35:05 +01:00