Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d55c6880
authored
May 10, 2021
by
tonihei
Committed by
Oliver Woodman
May 10, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove reference to deprecated Player.EventListener.
PiperOrigin-RevId: 372925409
parent
eb195eff
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
38 deletions
extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
library/core/src/main/java/com/google/android/exoplayer2/PlayerMessage.java
library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsListener.java
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioSink.java
library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSessionEventListener.java
library/core/src/main/java/com/google/android/exoplayer2/video/VideoRendererEventListener.java
extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java
View file @
d55c6880
...
@@ -426,7 +426,7 @@ public final class CastPlayer extends BasePlayer {
...
@@ -426,7 +426,7 @@ public final class CastPlayer extends BasePlayer {
return
playWhenReady
.
value
;
return
playWhenReady
.
value
;
}
}
// We still call
Event
Listener#onSeekProcessed() for backwards compatibility with listeners that
// We still call Listener#onSeekProcessed() for backwards compatibility with listeners that
// don't implement onPositionDiscontinuity().
// don't implement onPositionDiscontinuity().
@SuppressWarnings
(
"deprecation"
)
@SuppressWarnings
(
"deprecation"
)
@Override
@Override
...
@@ -848,7 +848,7 @@ public final class CastPlayer extends BasePlayer {
...
@@ -848,7 +848,7 @@ public final class CastPlayer extends BasePlayer {
}
}
/**
/**
* Updates the timeline and notifies {@link Player.
Event
Listener event listeners} if required.
* Updates the timeline and notifies {@link Player.Listener event listeners} if required.
*
*
* @return Whether the timeline change has caused a change of the period currently being played.
* @return Whether the timeline change has caused a change of the period currently being played.
*/
*/
...
@@ -1351,7 +1351,7 @@ public final class CastPlayer extends BasePlayer {
...
@@ -1351,7 +1351,7 @@ public final class CastPlayer extends BasePlayer {
private
final
class
SeekResultCallback
implements
ResultCallback
<
MediaChannelResult
>
{
private
final
class
SeekResultCallback
implements
ResultCallback
<
MediaChannelResult
>
{
// We still call
Event
Listener#onSeekProcessed() for backwards compatibility with listeners that
// We still call Listener#onSeekProcessed() for backwards compatibility with listeners that
// don't implement onPositionDiscontinuity().
// don't implement onPositionDiscontinuity().
@SuppressWarnings
(
"deprecation"
)
@SuppressWarnings
(
"deprecation"
)
@Override
@Override
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
View file @
d55c6880
...
@@ -242,7 +242,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
...
@@ -242,7 +242,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
/**
/**
* Set a limit on the time a call to {@link #setForegroundMode} can spend. If a call to {@link
* Set a limit on the time a call to {@link #setForegroundMode} can spend. If a call to {@link
* #setForegroundMode} takes more than {@code timeoutMs} milliseconds to complete, the player will
* #setForegroundMode} takes more than {@code timeoutMs} milliseconds to complete, the player will
* raise an error via {@link Player.
Event
Listener#onPlayerError}.
* raise an error via {@link Player.Listener#onPlayerError}.
*
*
* <p>This method is experimental, and will be renamed or removed in a future release. It should
* <p>This method is experimental, and will be renamed or removed in a future release. It should
* only be called before the player is used.
* only be called before the player is used.
...
...
library/core/src/main/java/com/google/android/exoplayer2/PlayerMessage.java
View file @
d55c6880
...
@@ -246,7 +246,7 @@ public final class PlayerMessage {
...
@@ -246,7 +246,7 @@ public final class PlayerMessage {
/**
/**
* Sends the message. If the target throws an {@link ExoPlaybackException} then it is propagated
* Sends the message. If the target throws an {@link ExoPlaybackException} then it is propagated
* out of the player as an error using {@link
* out of the player as an error using {@link
* Player.
Event
Listener#onPlayerError(ExoPlaybackException)}.
* Player.Listener#onPlayerError(ExoPlaybackException)}.
*
*
* @return This message.
* @return This message.
* @throws IllegalStateException If this message has already been sent.
* @throws IllegalStateException If this message has already been sent.
...
...
library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsListener.java
View file @
d55c6880
...
@@ -241,7 +241,7 @@ public interface AnalyticsListener {
...
@@ -241,7 +241,7 @@ public interface AnalyticsListener {
int
EVENT_PLAYER_ERROR
=
Player
.
EVENT_PLAYER_ERROR
;
int
EVENT_PLAYER_ERROR
=
Player
.
EVENT_PLAYER_ERROR
;
/**
/**
* A position discontinuity occurred. See {@link
* A position discontinuity occurred. See {@link
* Player.
Event
Listener#onPositionDiscontinuity(Player.PositionInfo, Player.PositionInfo, int)}.
* Player.Listener#onPositionDiscontinuity(Player.PositionInfo, Player.PositionInfo, int)}.
*/
*/
int
EVENT_POSITION_DISCONTINUITY
=
Player
.
EVENT_POSITION_DISCONTINUITY
;
int
EVENT_POSITION_DISCONTINUITY
=
Player
.
EVENT_POSITION_DISCONTINUITY
;
/** {@link Player#getPlaybackParameters()} changed. */
/** {@link Player#getPlaybackParameters()} changed. */
...
@@ -651,8 +651,7 @@ public interface AnalyticsListener {
...
@@ -651,8 +651,7 @@ public interface AnalyticsListener {
*
*
* <p>The provided {@link MediaMetadata} is a combination of the {@link MediaItem#mediaMetadata}
* <p>The provided {@link MediaMetadata} is a combination of the {@link MediaItem#mediaMetadata}
* and the static and dynamic metadata sourced from {@link
* and the static and dynamic metadata sourced from {@link
* Player.EventListener#onStaticMetadataChanged(List)} and {@link
* Player.Listener#onStaticMetadataChanged(List)} and {@link MetadataOutput#onMetadata(Metadata)}.
* MetadataOutput#onMetadata(Metadata)}.
*
*
* @param eventTime The event time.
* @param eventTime The event time.
* @param mediaMetadata The combined {@link MediaMetadata}.
* @param mediaMetadata The combined {@link MediaMetadata}.
...
@@ -695,9 +694,9 @@ public interface AnalyticsListener {
...
@@ -695,9 +694,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em>
* The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry.
* implement this method to display a user visible error or initiate an application level retry.
* {@link Player.
EventListener#onPlayerError} is the appropriate place to implement such behavior.
* {@link Player.
Listener#onPlayerError} is the appropriate place to implement such behavior. This
*
This method is called to provide the application with an opportunity to log the error if it
*
method is called to provide the application with an opportunity to log the error if it wishes
*
wishes
to do so.
* to do so.
*
*
* @param eventTime The event time.
* @param eventTime The event time.
* @param loadEventInfo The {@link LoadEventInfo} defining the load event.
* @param loadEventInfo The {@link LoadEventInfo} defining the load event.
...
@@ -890,9 +889,9 @@ public interface AnalyticsListener {
...
@@ -890,9 +889,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em>
* The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry.
* implement this method to display a user visible error or initiate an application level retry.
* {@link Player.
EventListener#onPlayerError} is the appropriate place to implement such behavior.
* {@link Player.
Listener#onPlayerError} is the appropriate place to implement such behavior. This
*
This method is called to provide the application with an opportunity to log the error if it
*
method is called to provide the application with an opportunity to log the error if it wishes
*
wishes
to do so.
* to do so.
*
*
* @param eventTime The event time.
* @param eventTime The event time.
* @param audioSinkError The error that occurred. Typically an {@link
* @param audioSinkError The error that occurred. Typically an {@link
...
@@ -907,9 +906,9 @@ public interface AnalyticsListener {
...
@@ -907,9 +906,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em>
* The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry.
* implement this method to display a user visible error or initiate an application level retry.
* {@link Player.
EventListener#onPlayerError} is the appropriate place to implement such behavior.
* {@link Player.
Listener#onPlayerError} is the appropriate place to implement such behavior. This
*
This method is called to provide the application with an opportunity to log the error if it
*
method is called to provide the application with an opportunity to log the error if it wishes
*
wishes
to do so.
* to do so.
*
*
* @param eventTime The event time.
* @param eventTime The event time.
* @param audioCodecError The error. Typically a {@link CodecException} if the renderer uses
* @param audioCodecError The error. Typically a {@link CodecException} if the renderer uses
...
@@ -1025,9 +1024,9 @@ public interface AnalyticsListener {
...
@@ -1025,9 +1024,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em>
* The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry.
* implement this method to display a user visible error or initiate an application level retry.
* {@link Player.
EventListener#onPlayerError} is the appropriate place to implement such behavior.
* {@link Player.
Listener#onPlayerError} is the appropriate place to implement such behavior. This
*
This method is called to provide the application with an opportunity to log the error if it
*
method is called to provide the application with an opportunity to log the error if it wishes
*
wishes
to do so.
* to do so.
*
*
* @param eventTime The event time.
* @param eventTime The event time.
* @param videoCodecError The error. Typically a {@link CodecException} if the renderer uses
* @param videoCodecError The error. Typically a {@link CodecException} if the renderer uses
...
@@ -1100,9 +1099,9 @@ public interface AnalyticsListener {
...
@@ -1100,9 +1099,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em>
* The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry.
* implement this method to display a user visible error or initiate an application level retry.
* {@link Player.
EventListener#onPlayerError} is the appropriate place to implement such behavior.
* {@link Player.
Listener#onPlayerError} is the appropriate place to implement such behavior. This
*
This method is called to provide the application with an opportunity to log the error if it
*
method is called to provide the application with an opportunity to log the error if it wishes
*
wishes
to do so.
* to do so.
*
*
* @param eventTime The event time.
* @param eventTime The event time.
* @param error The error.
* @param error The error.
...
...
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java
View file @
d55c6880
...
@@ -118,9 +118,9 @@ public interface AudioRendererEventListener {
...
@@ -118,9 +118,9 @@ public interface AudioRendererEventListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em>
* The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry.
* implement this method to display a user visible error or initiate an application level retry.
* {@link Player.
EventListener#onPlayerError} is the appropriate place to implement such behavior.
* {@link Player.
Listener#onPlayerError} is the appropriate place to implement such behavior. This
*
This method is called to provide the application with an opportunity to log the error if it
*
method is called to provide the application with an opportunity to log the error if it wishes
*
wishes
to do so.
* to do so.
*
*
* @param audioCodecError The error. Typically a {@link CodecException} if the renderer uses
* @param audioCodecError The error. Typically a {@link CodecException} if the renderer uses
* {@link MediaCodec}, or a {@link DecoderException} if the renderer uses a software decoder.
* {@link MediaCodec}, or a {@link DecoderException} if the renderer uses a software decoder.
...
@@ -136,9 +136,9 @@ public interface AudioRendererEventListener {
...
@@ -136,9 +136,9 @@ public interface AudioRendererEventListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em>
* The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry.
* implement this method to display a user visible error or initiate an application level retry.
* {@link Player.
EventListener#onPlayerError} is the appropriate place to implement such behavior.
* {@link Player.
Listener#onPlayerError} is the appropriate place to implement such behavior. This
*
This method is called to provide the application with an opportunity to log the error if it
*
method is called to provide the application with an opportunity to log the error if it wishes
*
wishes
to do so.
* to do so.
*
*
* @param audioSinkError The error that occurred. Typically an {@link
* @param audioSinkError The error that occurred. Typically an {@link
* AudioSink.InitializationException}, a {@link AudioSink.WriteException}, or an {@link
* AudioSink.InitializationException}, a {@link AudioSink.WriteException}, or an {@link
...
...
library/core/src/main/java/com/google/android/exoplayer2/audio/AudioSink.java
View file @
d55c6880
...
@@ -119,12 +119,12 @@ public interface AudioSink {
...
@@ -119,12 +119,12 @@ public interface AudioSink {
* The player may be able to recover from the error (for example by recreating the AudioTrack,
* The player may be able to recover from the error (for example by recreating the AudioTrack,
* possibly with different settings) and continue. Hence applications should <em>not</em>
* possibly with different settings) and continue. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry
* implement this method to display a user visible error or initiate an application level retry
* ({@link Player.
EventListener#onPlayerError} is the appropriate place to implement such
* ({@link Player.
Listener#onPlayerError} is the appropriate place to implement such behavior).
*
behavior). This method is called to provide the application with an opportunity to log the
*
This method is called to provide the application with an opportunity to log the error if it
*
error if it
wishes to do so.
* wishes to do so.
*
*
* <p>Fatal errors that cannot be recovered will be reported wrapped in a {@link
* <p>Fatal errors that cannot be recovered will be reported wrapped in a {@link
* ExoPlaybackException} by {@link Player.
Event
Listener#onPlayerError(ExoPlaybackException)}.
* ExoPlaybackException} by {@link Player.Listener#onPlayerError(ExoPlaybackException)}.
*
*
* @param audioSinkError The error that occurred. Typically an {@link InitializationException},
* @param audioSinkError The error that occurred. Typically an {@link InitializationException},
* a {@link WriteException}, or an {@link UnexpectedDiscontinuityException}.
* a {@link WriteException}, or an {@link UnexpectedDiscontinuityException}.
...
...
library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSessionEventListener.java
View file @
d55c6880
...
@@ -56,8 +56,8 @@ public interface DrmSessionEventListener {
...
@@ -56,8 +56,8 @@ public interface DrmSessionEventListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error and continue. Hence applications should
* The player may be able to recover from the error and continue. Hence applications should
* <em>not</em> implement this method to display a user visible error or initiate an application
* <em>not</em> implement this method to display a user visible error or initiate an application
* level retry ({@link Player.
EventListener#onPlayerError} is the appropriate place to implement
* level retry ({@link Player.
Listener#onPlayerError} is the appropriate place to implement such
*
such
behavior). This method is called to provide the application with an opportunity to log the
* behavior). This method is called to provide the application with an opportunity to log the
* error if it wishes to do so.
* error if it wishes to do so.
*
*
* @param windowIndex The window index in the timeline this media period belongs to.
* @param windowIndex The window index in the timeline this media period belongs to.
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/VideoRendererEventListener.java
View file @
d55c6880
...
@@ -141,9 +141,9 @@ public interface VideoRendererEventListener {
...
@@ -141,9 +141,9 @@ public interface VideoRendererEventListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em>
* The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry.
* implement this method to display a user visible error or initiate an application level retry.
* {@link Player.
EventListener#onPlayerError} is the appropriate place to implement such behavior.
* {@link Player.
Listener#onPlayerError} is the appropriate place to implement such behavior. This
*
This method is called to provide the application with an opportunity to log the error if it
*
method is called to provide the application with an opportunity to log the error if it wishes
*
wishes
to do so.
* to do so.
*
*
* @param videoCodecError The error. Typically a {@link CodecException} if the renderer uses
* @param videoCodecError The error. Typically a {@link CodecException} if the renderer uses
* {@link MediaCodec}, or a {@link DecoderException} if the renderer uses a software decoder.
* {@link MediaCodec}, or a {@link DecoderException} if the renderer uses a software decoder.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment