Class EventLogger
- java.lang.Object
-
- com.google.android.exoplayer2.util.EventLogger
-
- All Implemented Interfaces:
AnalyticsListener
@Deprecated public class EventLogger extends Object implements AnalyticsListener
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.analytics.AnalyticsListener
AnalyticsListener.EventFlags, AnalyticsListener.Events, AnalyticsListener.EventTime
-
-
Field Summary
-
Fields inherited from interface com.google.android.exoplayer2.analytics.AnalyticsListener
EVENT_AUDIO_ATTRIBUTES_CHANGED, EVENT_AUDIO_CODEC_ERROR, EVENT_AUDIO_DECODER_INITIALIZED, EVENT_AUDIO_DECODER_RELEASED, EVENT_AUDIO_DISABLED, EVENT_AUDIO_ENABLED, EVENT_AUDIO_INPUT_FORMAT_CHANGED, EVENT_AUDIO_POSITION_ADVANCING, EVENT_AUDIO_SESSION_ID, EVENT_AUDIO_SINK_ERROR, EVENT_AUDIO_UNDERRUN, EVENT_AVAILABLE_COMMANDS_CHANGED, EVENT_BANDWIDTH_ESTIMATE, EVENT_CUES, EVENT_DEVICE_INFO_CHANGED, EVENT_DEVICE_VOLUME_CHANGED, EVENT_DOWNSTREAM_FORMAT_CHANGED, EVENT_DRM_KEYS_LOADED, EVENT_DRM_KEYS_REMOVED, EVENT_DRM_KEYS_RESTORED, EVENT_DRM_SESSION_ACQUIRED, EVENT_DRM_SESSION_MANAGER_ERROR, EVENT_DRM_SESSION_RELEASED, EVENT_DROPPED_VIDEO_FRAMES, EVENT_IS_LOADING_CHANGED, EVENT_IS_PLAYING_CHANGED, EVENT_LOAD_CANCELED, EVENT_LOAD_COMPLETED, EVENT_LOAD_ERROR, EVENT_LOAD_STARTED, EVENT_MAX_SEEK_TO_PREVIOUS_POSITION_CHANGED, EVENT_MEDIA_ITEM_TRANSITION, EVENT_MEDIA_METADATA_CHANGED, EVENT_METADATA, EVENT_PLAY_WHEN_READY_CHANGED, EVENT_PLAYBACK_PARAMETERS_CHANGED, EVENT_PLAYBACK_STATE_CHANGED, EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED, EVENT_PLAYER_ERROR, EVENT_PLAYER_RELEASED, EVENT_PLAYLIST_METADATA_CHANGED, EVENT_POSITION_DISCONTINUITY, EVENT_RENDERED_FIRST_FRAME, EVENT_REPEAT_MODE_CHANGED, EVENT_SEEK_BACK_INCREMENT_CHANGED, EVENT_SEEK_FORWARD_INCREMENT_CHANGED, EVENT_SHUFFLE_MODE_ENABLED_CHANGED, EVENT_SKIP_SILENCE_ENABLED_CHANGED, EVENT_SURFACE_SIZE_CHANGED, EVENT_TIMELINE_CHANGED, EVENT_TRACK_SELECTION_PARAMETERS_CHANGED, EVENT_TRACKS_CHANGED, EVENT_UPSTREAM_DISCARDED, EVENT_VIDEO_CODEC_ERROR, EVENT_VIDEO_DECODER_INITIALIZED, EVENT_VIDEO_DECODER_RELEASED, EVENT_VIDEO_DISABLED, EVENT_VIDEO_ENABLED, EVENT_VIDEO_FRAME_PROCESSING_OFFSET, EVENT_VIDEO_INPUT_FORMAT_CHANGED, EVENT_VIDEO_SIZE_CHANGED, EVENT_VOLUME_CHANGED
-
-
Constructor Summary
Constructors Constructor Description EventLogger()
Deprecated.Creates an instance.EventLogger(MappingTrackSelector trackSelector)
Deprecated.UseEventLogger()
EventLogger(MappingTrackSelector trackSelector, String tag)
Deprecated.EventLogger(String tag)
Deprecated.Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
logd(String msg)
Deprecated.Logs a debug message.protected void
loge(String msg)
Deprecated.Logs an error message.void
onAudioAttributesChanged(AnalyticsListener.EventTime eventTime, AudioAttributes audioAttributes)
Deprecated.Called when the audio attributes change.void
onAudioDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)
Deprecated.void
onAudioDecoderReleased(AnalyticsListener.EventTime eventTime, String decoderName)
Deprecated.Called when an audio renderer releases a decoder.void
onAudioDisabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when an audio renderer is disabled.void
onAudioEnabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when an audio renderer is enabled.void
onAudioInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format, DecoderReuseEvaluation decoderReuseEvaluation)
Deprecated.Called when the format of the media being consumed by an audio renderer changes.void
onAudioSessionIdChanged(AnalyticsListener.EventTime eventTime, int audioSessionId)
Deprecated.Called when the audio session ID changes.void
onAudioUnderrun(AnalyticsListener.EventTime eventTime, int bufferSize, long bufferSizeMs, long elapsedSinceLastFeedMs)
Deprecated.Called when an audio underrun occurs.void
onBandwidthEstimate(AnalyticsListener.EventTime eventTime, int totalLoadTimeMs, long totalBytesLoaded, long bitrateEstimate)
Deprecated.Called when the bandwidth estimate for the current data source has been updated.void
onDownstreamFormatChanged(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)
Deprecated.Called when the downstream format sent to the renderers changed.void
onDrmKeysLoaded(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time drm keys are loaded.void
onDrmKeysRemoved(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time offline drm keys are removed.void
onDrmKeysRestored(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time offline drm keys are restored.void
onDrmSessionAcquired(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.drm.DrmSession.State int state)
Deprecated.Called each time a drm session is acquired.void
onDrmSessionManagerError(AnalyticsListener.EventTime eventTime, Exception error)
Deprecated.Called when a drm error occurs.void
onDrmSessionReleased(AnalyticsListener.EventTime eventTime)
Deprecated.Called each time a drm session is released.void
onDroppedVideoFrames(AnalyticsListener.EventTime eventTime, int droppedFrames, long elapsedMs)
Deprecated.Called after video frames have been dropped.void
onIsLoadingChanged(AnalyticsListener.EventTime eventTime, boolean isLoading)
Deprecated.Called when the player starts or stops loading data from a source.void
onIsPlayingChanged(AnalyticsListener.EventTime eventTime, boolean isPlaying)
Deprecated.Called when the player starts or stops playing.void
onLoadCanceled(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Called when a media source canceled loading data.void
onLoadCompleted(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Called when a media source completed loading data.void
onLoadError(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData, IOException error, boolean wasCanceled)
Deprecated.Called when a media source loading error occurred.void
onLoadStarted(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Called when a media source started loading data.void
onMediaItemTransition(AnalyticsListener.EventTime eventTime, MediaItem mediaItem, int reason)
Deprecated.Called when playback transitions to a different media item.void
onMetadata(AnalyticsListener.EventTime eventTime, Metadata metadata)
Deprecated.Called when there isMetadata
associated with the current playback time.void
onPlaybackParametersChanged(AnalyticsListener.EventTime eventTime, PlaybackParameters playbackParameters)
Deprecated.Called when the playback parameters changed.void
onPlaybackStateChanged(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.State int state)
Deprecated.Called when the playback state changed.void
onPlaybackSuppressionReasonChanged(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason)
Deprecated.Called when playback suppression reason changed.void
onPlayerError(AnalyticsListener.EventTime eventTime, PlaybackException error)
Deprecated.Called when a fatal player error occurred.void
onPlayWhenReadyChanged(AnalyticsListener.EventTime eventTime, boolean playWhenReady, @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int reason)
Deprecated.Called when the value changed that indicates whether playback will proceed when ready.void
onPositionDiscontinuity(AnalyticsListener.EventTime eventTime, Player.PositionInfo oldPosition, Player.PositionInfo newPosition, @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)
Deprecated.Called when a position discontinuity occurred.void
onRenderedFirstFrame(AnalyticsListener.EventTime eventTime, Object output, long renderTimeMs)
Deprecated.Called when a frame is rendered for the first time since setting the surface, or since the renderer was reset, or since the stream being rendered was changed.void
onRepeatModeChanged(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
Deprecated.Called when the repeat mode changed.void
onShuffleModeChanged(AnalyticsListener.EventTime eventTime, boolean shuffleModeEnabled)
Deprecated.Called when the shuffle mode changed.void
onSkipSilenceEnabledChanged(AnalyticsListener.EventTime eventTime, boolean skipSilenceEnabled)
Deprecated.Called when skipping silences is enabled or disabled in the audio stream.void
onSurfaceSizeChanged(AnalyticsListener.EventTime eventTime, int width, int height)
Deprecated.Called when the output surface size changed.void
onTimelineChanged(AnalyticsListener.EventTime eventTime, @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)
Deprecated.Called when the timeline changed.void
onTracksChanged(AnalyticsListener.EventTime eventTime, Tracks tracks)
Deprecated.Called when the tracks change.void
onUpstreamDiscarded(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)
Deprecated.Called when data is removed from the back of a media buffer, typically so that it can be re-buffered in a different format.void
onVideoDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)
Deprecated.void
onVideoDecoderReleased(AnalyticsListener.EventTime eventTime, String decoderName)
Deprecated.Called when a video renderer releases a decoder.void
onVideoDisabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when a video renderer is disabled.void
onVideoEnabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Called when a video renderer is enabled.void
onVideoInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format, DecoderReuseEvaluation decoderReuseEvaluation)
Deprecated.Called when the format of the media being consumed by a video renderer changes.void
onVideoSizeChanged(AnalyticsListener.EventTime eventTime, VideoSize videoSize)
Deprecated.Called before a frame is rendered for the first time since setting the surface, and each time there's a change in the size or pixel aspect ratio of the video being rendered.void
onVolumeChanged(AnalyticsListener.EventTime eventTime, float volume)
Deprecated.Called when the volume changes.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.android.exoplayer2.analytics.AnalyticsListener
onAudioCodecError, onAudioDecoderInitialized, onAudioInputFormatChanged, onAudioPositionAdvancing, onAudioSinkError, onAvailableCommandsChanged, onCues, onCues, onDeviceInfoChanged, onDeviceVolumeChanged, onDrmSessionAcquired, onEvents, onLoadingChanged, onMaxSeekToPreviousPositionChanged, onMediaMetadataChanged, onPlayerErrorChanged, onPlayerReleased, onPlayerStateChanged, onPlaylistMetadataChanged, onPositionDiscontinuity, onSeekBackIncrementChanged, onSeekForwardIncrementChanged, onSeekStarted, onTrackSelectionParametersChanged, onVideoCodecError, onVideoDecoderInitialized, onVideoFrameProcessingOffset, onVideoInputFormatChanged, onVideoSizeChanged
-
-
-
-
Constructor Detail
-
EventLogger
public EventLogger()
Deprecated.Creates an instance.
-
EventLogger
public EventLogger(String tag)
Deprecated.Creates an instance.- Parameters:
tag
- The tag used for logging.
-
EventLogger
@Deprecated public EventLogger(@Nullable MappingTrackSelector trackSelector)
Deprecated.UseEventLogger()
Creates an instance.- Parameters:
trackSelector
- This parameter is ignored.
-
EventLogger
@Deprecated public EventLogger(@Nullable MappingTrackSelector trackSelector, String tag)
Deprecated.Creates an instance.- Parameters:
trackSelector
- This parameter is ignored.tag
- The tag used for logging.
-
-
Method Detail
-
onIsLoadingChanged
public void onIsLoadingChanged(AnalyticsListener.EventTime eventTime, boolean isLoading)
Deprecated.Description copied from interface:AnalyticsListener
Called when the player starts or stops loading data from a source.- Specified by:
onIsLoadingChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.isLoading
- Whether the player is loading.
-
onPlaybackStateChanged
public void onPlaybackStateChanged(AnalyticsListener.EventTime eventTime, @State @com.google.android.exoplayer2.Player.State int state)
Deprecated.Description copied from interface:AnalyticsListener
Called when the playback state changed.- Specified by:
onPlaybackStateChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.state
- The newplayback state
.
-
onPlayWhenReadyChanged
public void onPlayWhenReadyChanged(AnalyticsListener.EventTime eventTime, boolean playWhenReady, @PlayWhenReadyChangeReason @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int reason)
Deprecated.Description copied from interface:AnalyticsListener
Called when the value changed that indicates whether playback will proceed when ready.- Specified by:
onPlayWhenReadyChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.playWhenReady
- Whether playback will proceed when ready.reason
- Thereason
of the change.
-
onPlaybackSuppressionReasonChanged
public void onPlaybackSuppressionReasonChanged(AnalyticsListener.EventTime eventTime, @PlaybackSuppressionReason @com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason)
Deprecated.Description copied from interface:AnalyticsListener
Called when playback suppression reason changed.- Specified by:
onPlaybackSuppressionReasonChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.playbackSuppressionReason
- The newPlayer.PlaybackSuppressionReason
.
-
onIsPlayingChanged
public void onIsPlayingChanged(AnalyticsListener.EventTime eventTime, boolean isPlaying)
Deprecated.Description copied from interface:AnalyticsListener
Called when the player starts or stops playing.- Specified by:
onIsPlayingChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.isPlaying
- Whether the player is playing.
-
onRepeatModeChanged
public void onRepeatModeChanged(AnalyticsListener.EventTime eventTime, @RepeatMode @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
Deprecated.Description copied from interface:AnalyticsListener
Called when the repeat mode changed.- Specified by:
onRepeatModeChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.repeatMode
- The new repeat mode.
-
onShuffleModeChanged
public void onShuffleModeChanged(AnalyticsListener.EventTime eventTime, boolean shuffleModeEnabled)
Deprecated.Description copied from interface:AnalyticsListener
Called when the shuffle mode changed.- Specified by:
onShuffleModeChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.shuffleModeEnabled
- Whether the shuffle mode is enabled.
-
onPositionDiscontinuity
public void onPositionDiscontinuity(AnalyticsListener.EventTime eventTime, Player.PositionInfo oldPosition, Player.PositionInfo newPosition, @DiscontinuityReason @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)
Deprecated.Description copied from interface:AnalyticsListener
Called when a position discontinuity occurred.- Specified by:
onPositionDiscontinuity
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.oldPosition
- The position before the discontinuity.newPosition
- The position after the discontinuity.reason
- The reason for the position discontinuity.
-
onPlaybackParametersChanged
public void onPlaybackParametersChanged(AnalyticsListener.EventTime eventTime, PlaybackParameters playbackParameters)
Deprecated.Description copied from interface:AnalyticsListener
Called when the playback parameters changed.- Specified by:
onPlaybackParametersChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.playbackParameters
- The new playback parameters.
-
onTimelineChanged
public void onTimelineChanged(AnalyticsListener.EventTime eventTime, @TimelineChangeReason @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)
Deprecated.Description copied from interface:AnalyticsListener
Called when the timeline changed.- Specified by:
onTimelineChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.reason
- The reason for the timeline change.
-
onMediaItemTransition
public void onMediaItemTransition(AnalyticsListener.EventTime eventTime, @Nullable MediaItem mediaItem, int reason)
Deprecated.Description copied from interface:AnalyticsListener
Called when playback transitions to a different media item.- Specified by:
onMediaItemTransition
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.mediaItem
- The media item.reason
- The reason for the media item transition.
-
onPlayerError
public void onPlayerError(AnalyticsListener.EventTime eventTime, PlaybackException error)
Deprecated.Description copied from interface:AnalyticsListener
Called when a fatal player error occurred.Implementations of
Player
may pass an instance of a subclass ofPlaybackException
to this method in order to include more information about the error.- Specified by:
onPlayerError
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.error
- The error.
-
onTracksChanged
public void onTracksChanged(AnalyticsListener.EventTime eventTime, Tracks tracks)
Deprecated.Description copied from interface:AnalyticsListener
Called when the tracks change.- Specified by:
onTracksChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.tracks
- The tracks. Never null, but may be of length zero.
-
onMetadata
public void onMetadata(AnalyticsListener.EventTime eventTime, Metadata metadata)
Deprecated.Description copied from interface:AnalyticsListener
Called when there isMetadata
associated with the current playback time.- Specified by:
onMetadata
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.metadata
- The metadata.
-
onAudioEnabled
public void onAudioEnabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Description copied from interface:AnalyticsListener
Called when an audio renderer is enabled.- Specified by:
onAudioEnabled
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.decoderCounters
-DecoderCounters
that will be updated by the renderer for as long as it remains enabled.
-
onAudioDecoderInitialized
public void onAudioDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)
Deprecated.- Specified by:
onAudioDecoderInitialized
in interfaceAnalyticsListener
-
onAudioInputFormatChanged
public void onAudioInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format, @Nullable DecoderReuseEvaluation decoderReuseEvaluation)
Deprecated.Description copied from interface:AnalyticsListener
Called when the format of the media being consumed by an audio renderer changes.- Specified by:
onAudioInputFormatChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.format
- The new format.decoderReuseEvaluation
- The result of the evaluation to determine whether an existing decoder instance can be reused for the new format, ornull
if the renderer did not have a decoder.
-
onAudioUnderrun
public void onAudioUnderrun(AnalyticsListener.EventTime eventTime, int bufferSize, long bufferSizeMs, long elapsedSinceLastFeedMs)
Deprecated.Description copied from interface:AnalyticsListener
Called when an audio underrun occurs.- Specified by:
onAudioUnderrun
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.bufferSize
- The size of the audio output buffer, in bytes.bufferSizeMs
- The size of the audio output buffer, in milliseconds, if it contains PCM encoded audio.C.TIME_UNSET
if the output buffer contains non-PCM encoded audio.elapsedSinceLastFeedMs
- The time since audio was last written to the output buffer.
-
onAudioDecoderReleased
public void onAudioDecoderReleased(AnalyticsListener.EventTime eventTime, String decoderName)
Deprecated.Description copied from interface:AnalyticsListener
Called when an audio renderer releases a decoder.- Specified by:
onAudioDecoderReleased
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.decoderName
- The decoder that was released.
-
onAudioDisabled
public void onAudioDisabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Description copied from interface:AnalyticsListener
Called when an audio renderer is disabled.- Specified by:
onAudioDisabled
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.decoderCounters
-DecoderCounters
that were updated by the renderer.
-
onAudioSessionIdChanged
public void onAudioSessionIdChanged(AnalyticsListener.EventTime eventTime, int audioSessionId)
Deprecated.Description copied from interface:AnalyticsListener
Called when the audio session ID changes.- Specified by:
onAudioSessionIdChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.audioSessionId
- The audio session ID.
-
onAudioAttributesChanged
public void onAudioAttributesChanged(AnalyticsListener.EventTime eventTime, AudioAttributes audioAttributes)
Deprecated.Description copied from interface:AnalyticsListener
Called when the audio attributes change.- Specified by:
onAudioAttributesChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.audioAttributes
- The audio attributes.
-
onSkipSilenceEnabledChanged
public void onSkipSilenceEnabledChanged(AnalyticsListener.EventTime eventTime, boolean skipSilenceEnabled)
Deprecated.Description copied from interface:AnalyticsListener
Called when skipping silences is enabled or disabled in the audio stream.- Specified by:
onSkipSilenceEnabledChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.skipSilenceEnabled
- Whether skipping silences in the audio stream is enabled.
-
onVolumeChanged
public void onVolumeChanged(AnalyticsListener.EventTime eventTime, float volume)
Deprecated.Description copied from interface:AnalyticsListener
Called when the volume changes.- Specified by:
onVolumeChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.volume
- The new volume, with 0 being silence and 1 being unity gain.
-
onVideoEnabled
public void onVideoEnabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Description copied from interface:AnalyticsListener
Called when a video renderer is enabled.- Specified by:
onVideoEnabled
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.decoderCounters
-DecoderCounters
that will be updated by the renderer for as long as it remains enabled.
-
onVideoDecoderInitialized
public void onVideoDecoderInitialized(AnalyticsListener.EventTime eventTime, String decoderName, long initializationDurationMs)
Deprecated.- Specified by:
onVideoDecoderInitialized
in interfaceAnalyticsListener
-
onVideoInputFormatChanged
public void onVideoInputFormatChanged(AnalyticsListener.EventTime eventTime, Format format, @Nullable DecoderReuseEvaluation decoderReuseEvaluation)
Deprecated.Description copied from interface:AnalyticsListener
Called when the format of the media being consumed by a video renderer changes.- Specified by:
onVideoInputFormatChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.format
- The new format.decoderReuseEvaluation
- The result of the evaluation to determine whether an existing decoder instance can be reused for the new format, ornull
if the renderer did not have a decoder.
-
onDroppedVideoFrames
public void onDroppedVideoFrames(AnalyticsListener.EventTime eventTime, int droppedFrames, long elapsedMs)
Deprecated.Description copied from interface:AnalyticsListener
Called after video frames have been dropped.- Specified by:
onDroppedVideoFrames
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.droppedFrames
- The number of dropped frames since the last call to this method.elapsedMs
- The duration in milliseconds over which the frames were dropped. This duration is timed from when the renderer was started or from when dropped frames were last reported (whichever was more recent), and not from when the first of the reported drops occurred.
-
onVideoDecoderReleased
public void onVideoDecoderReleased(AnalyticsListener.EventTime eventTime, String decoderName)
Deprecated.Description copied from interface:AnalyticsListener
Called when a video renderer releases a decoder.- Specified by:
onVideoDecoderReleased
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.decoderName
- The decoder that was released.
-
onVideoDisabled
public void onVideoDisabled(AnalyticsListener.EventTime eventTime, DecoderCounters decoderCounters)
Deprecated.Description copied from interface:AnalyticsListener
Called when a video renderer is disabled.- Specified by:
onVideoDisabled
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.decoderCounters
-DecoderCounters
that were updated by the renderer.
-
onRenderedFirstFrame
public void onRenderedFirstFrame(AnalyticsListener.EventTime eventTime, Object output, long renderTimeMs)
Deprecated.Description copied from interface:AnalyticsListener
Called when a frame is rendered for the first time since setting the surface, or since the renderer was reset, or since the stream being rendered was changed.- Specified by:
onRenderedFirstFrame
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.output
- The output to which a frame has been rendered. Normally aSurface
, however may also be other output types (e.g., aVideoDecoderOutputBufferRenderer
).renderTimeMs
-SystemClock.elapsedRealtime()
when the first frame was rendered.
-
onVideoSizeChanged
public void onVideoSizeChanged(AnalyticsListener.EventTime eventTime, VideoSize videoSize)
Deprecated.Description copied from interface:AnalyticsListener
Called before a frame is rendered for the first time since setting the surface, and each time there's a change in the size or pixel aspect ratio of the video being rendered.- Specified by:
onVideoSizeChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.videoSize
- The new size of the video.
-
onLoadStarted
public void onLoadStarted(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Description copied from interface:AnalyticsListener
Called when a media source started loading data.- Specified by:
onLoadStarted
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.loadEventInfo
- TheLoadEventInfo
defining the load event.mediaLoadData
- TheMediaLoadData
defining the data being loaded.
-
onLoadError
public void onLoadError(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData, IOException error, boolean wasCanceled)
Deprecated.Description copied from interface:AnalyticsListener
Called when a media source loading error occurred.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 not implement this method to display a user visible error or initiate an application level retry.
Player.Listener.onPlayerError(com.google.android.exoplayer2.PlaybackException)
is the appropriate place to implement such behavior. This method is called to provide the application with an opportunity to log the error if it wishes to do so.- Specified by:
onLoadError
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.loadEventInfo
- TheLoadEventInfo
defining the load event.mediaLoadData
- TheMediaLoadData
defining the data being loaded.error
- The load error.wasCanceled
- Whether the load was canceled as a result of the error.
-
onLoadCanceled
public void onLoadCanceled(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Description copied from interface:AnalyticsListener
Called when a media source canceled loading data.- Specified by:
onLoadCanceled
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.loadEventInfo
- TheLoadEventInfo
defining the load event.mediaLoadData
- TheMediaLoadData
defining the data being loaded.
-
onLoadCompleted
public void onLoadCompleted(AnalyticsListener.EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData)
Deprecated.Description copied from interface:AnalyticsListener
Called when a media source completed loading data.- Specified by:
onLoadCompleted
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.loadEventInfo
- TheLoadEventInfo
defining the load event.mediaLoadData
- TheMediaLoadData
defining the data being loaded.
-
onBandwidthEstimate
public void onBandwidthEstimate(AnalyticsListener.EventTime eventTime, int totalLoadTimeMs, long totalBytesLoaded, long bitrateEstimate)
Deprecated.Description copied from interface:AnalyticsListener
Called when the bandwidth estimate for the current data source has been updated.- Specified by:
onBandwidthEstimate
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.totalLoadTimeMs
- The total time spend loading this update is based on, in milliseconds.totalBytesLoaded
- The total bytes loaded this update is based on.bitrateEstimate
- The bandwidth estimate, in bits per second.
-
onSurfaceSizeChanged
public void onSurfaceSizeChanged(AnalyticsListener.EventTime eventTime, int width, int height)
Deprecated.Description copied from interface:AnalyticsListener
Called when the output surface size changed.- Specified by:
onSurfaceSizeChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.width
- The surface width in pixels. May beC.LENGTH_UNSET
if unknown, or 0 if the video is not rendered onto a surface.height
- The surface height in pixels. May beC.LENGTH_UNSET
if unknown, or 0 if the video is not rendered onto a surface.
-
onUpstreamDiscarded
public void onUpstreamDiscarded(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)
Deprecated.Description copied from interface:AnalyticsListener
Called when data is removed from the back of a media buffer, typically so that it can be re-buffered in a different format.- Specified by:
onUpstreamDiscarded
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.mediaLoadData
- TheMediaLoadData
defining the media being discarded.
-
onDownstreamFormatChanged
public void onDownstreamFormatChanged(AnalyticsListener.EventTime eventTime, MediaLoadData mediaLoadData)
Deprecated.Description copied from interface:AnalyticsListener
Called when the downstream format sent to the renderers changed.- Specified by:
onDownstreamFormatChanged
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.mediaLoadData
- TheMediaLoadData
defining the newly selected media data.
-
onDrmSessionAcquired
public void onDrmSessionAcquired(AnalyticsListener.EventTime eventTime, @State @com.google.android.exoplayer2.drm.DrmSession.State int state)
Deprecated.Description copied from interface:AnalyticsListener
Called each time a drm session is acquired.- Specified by:
onDrmSessionAcquired
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.state
- TheDrmSession.State
of the session when the acquisition completed.
-
onDrmSessionManagerError
public void onDrmSessionManagerError(AnalyticsListener.EventTime eventTime, Exception error)
Deprecated.Description copied from interface:AnalyticsListener
Called when a drm error occurs.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 not implement this method to display a user visible error or initiate an application level retry.
Player.Listener.onPlayerError(com.google.android.exoplayer2.PlaybackException)
is the appropriate place to implement such behavior. This method is called to provide the application with an opportunity to log the error if it wishes to do so.- Specified by:
onDrmSessionManagerError
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.error
- The error.
-
onDrmKeysRestored
public void onDrmKeysRestored(AnalyticsListener.EventTime eventTime)
Deprecated.Description copied from interface:AnalyticsListener
Called each time offline drm keys are restored.- Specified by:
onDrmKeysRestored
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.
-
onDrmKeysRemoved
public void onDrmKeysRemoved(AnalyticsListener.EventTime eventTime)
Deprecated.Description copied from interface:AnalyticsListener
Called each time offline drm keys are removed.- Specified by:
onDrmKeysRemoved
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.
-
onDrmKeysLoaded
public void onDrmKeysLoaded(AnalyticsListener.EventTime eventTime)
Deprecated.Description copied from interface:AnalyticsListener
Called each time drm keys are loaded.- Specified by:
onDrmKeysLoaded
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.
-
onDrmSessionReleased
public void onDrmSessionReleased(AnalyticsListener.EventTime eventTime)
Deprecated.Description copied from interface:AnalyticsListener
Called each time a drm session is released.- Specified by:
onDrmSessionReleased
in interfaceAnalyticsListener
- Parameters:
eventTime
- The event time.
-
logd
protected void logd(String msg)
Deprecated.Logs a debug message.- Parameters:
msg
- The message to log.
-
loge
protected void loge(String msg)
Deprecated.Logs an error message.- Parameters:
msg
- The message to log.
-
-