Commit 81c666ff by ibaker Committed by Tofunmi Adigun-Hameed

Remove four deprecated AnalyticsListener decoder methods

Use the audio or video specific variants instead.

#minor-release

PiperOrigin-RevId: 534436644
(cherry picked from commit 868e44290e7701c55352368a72a63aa0647fc483)
parent a246969e
...@@ -855,35 +855,6 @@ public interface AnalyticsListener { ...@@ -855,35 +855,6 @@ public interface AnalyticsListener {
default void onCues(EventTime eventTime, CueGroup cueGroup) {} default void onCues(EventTime eventTime, CueGroup cueGroup) {}
/** /**
* @deprecated Use {@link #onAudioEnabled} and {@link #onVideoEnabled} instead.
*/
@Deprecated
default void onDecoderEnabled(
EventTime eventTime, int trackType, DecoderCounters decoderCounters) {}
/**
* @deprecated Use {@link #onAudioDecoderInitialized} and {@link #onVideoDecoderInitialized}
* instead.
*/
@Deprecated
default void onDecoderInitialized(
EventTime eventTime, int trackType, String decoderName, long initializationDurationMs) {}
/**
* @deprecated Use {@link #onAudioInputFormatChanged(EventTime, Format, DecoderReuseEvaluation)}
* and {@link #onVideoInputFormatChanged(EventTime, Format, DecoderReuseEvaluation)}. instead.
*/
@Deprecated
default void onDecoderInputFormatChanged(EventTime eventTime, int trackType, Format format) {}
/**
* @deprecated Use {@link #onAudioDisabled} and {@link #onVideoDisabled} instead.
*/
@Deprecated
default void onDecoderDisabled(
EventTime eventTime, int trackType, DecoderCounters decoderCounters) {}
/**
* Called when an audio renderer is enabled. * Called when an audio renderer is enabled.
* *
* @param eventTime The event time. * @param eventTime The event time.
......
...@@ -163,7 +163,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -163,7 +163,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
// Audio events. // Audio events.
@SuppressWarnings("deprecation") // Calling deprecated listener method.
@Override @Override
public final void onAudioEnabled(DecoderCounters counters) { public final void onAudioEnabled(DecoderCounters counters) {
EventTime eventTime = generateReadingMediaPeriodEventTime(); EventTime eventTime = generateReadingMediaPeriodEventTime();
...@@ -172,7 +171,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -172,7 +171,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
AnalyticsListener.EVENT_AUDIO_ENABLED, AnalyticsListener.EVENT_AUDIO_ENABLED,
listener -> { listener -> {
listener.onAudioEnabled(eventTime, counters); listener.onAudioEnabled(eventTime, counters);
listener.onDecoderEnabled(eventTime, C.TRACK_TYPE_AUDIO, counters);
}); });
} }
...@@ -188,8 +186,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -188,8 +186,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
listener.onAudioDecoderInitialized(eventTime, decoderName, initializationDurationMs); listener.onAudioDecoderInitialized(eventTime, decoderName, initializationDurationMs);
listener.onAudioDecoderInitialized( listener.onAudioDecoderInitialized(
eventTime, decoderName, initializedTimestampMs, initializationDurationMs); eventTime, decoderName, initializedTimestampMs, initializationDurationMs);
listener.onDecoderInitialized(
eventTime, C.TRACK_TYPE_AUDIO, decoderName, initializationDurationMs);
}); });
} }
...@@ -204,7 +200,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -204,7 +200,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
listener -> { listener -> {
listener.onAudioInputFormatChanged(eventTime, format); listener.onAudioInputFormatChanged(eventTime, format);
listener.onAudioInputFormatChanged(eventTime, format, decoderReuseEvaluation); listener.onAudioInputFormatChanged(eventTime, format, decoderReuseEvaluation);
listener.onDecoderInputFormatChanged(eventTime, C.TRACK_TYPE_AUDIO, format);
}); });
} }
...@@ -238,7 +233,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -238,7 +233,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
} }
@Override @Override
@SuppressWarnings("deprecation") // Calling deprecated listener method.
public final void onAudioDisabled(DecoderCounters counters) { public final void onAudioDisabled(DecoderCounters counters) {
EventTime eventTime = generatePlayingMediaPeriodEventTime(); EventTime eventTime = generatePlayingMediaPeriodEventTime();
sendEvent( sendEvent(
...@@ -246,7 +240,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -246,7 +240,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
AnalyticsListener.EVENT_AUDIO_DISABLED, AnalyticsListener.EVENT_AUDIO_DISABLED,
listener -> { listener -> {
listener.onAudioDisabled(eventTime, counters); listener.onAudioDisabled(eventTime, counters);
listener.onDecoderDisabled(eventTime, C.TRACK_TYPE_AUDIO, counters);
}); });
} }
...@@ -280,7 +273,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -280,7 +273,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
// Video events. // Video events.
@Override @Override
@SuppressWarnings("deprecation") // Calling deprecated listener method.
public final void onVideoEnabled(DecoderCounters counters) { public final void onVideoEnabled(DecoderCounters counters) {
EventTime eventTime = generateReadingMediaPeriodEventTime(); EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent( sendEvent(
...@@ -288,7 +280,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -288,7 +280,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
AnalyticsListener.EVENT_VIDEO_ENABLED, AnalyticsListener.EVENT_VIDEO_ENABLED,
listener -> { listener -> {
listener.onVideoEnabled(eventTime, counters); listener.onVideoEnabled(eventTime, counters);
listener.onDecoderEnabled(eventTime, C.TRACK_TYPE_VIDEO, counters);
}); });
} }
...@@ -304,8 +295,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -304,8 +295,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
listener.onVideoDecoderInitialized(eventTime, decoderName, initializationDurationMs); listener.onVideoDecoderInitialized(eventTime, decoderName, initializationDurationMs);
listener.onVideoDecoderInitialized( listener.onVideoDecoderInitialized(
eventTime, decoderName, initializedTimestampMs, initializationDurationMs); eventTime, decoderName, initializedTimestampMs, initializationDurationMs);
listener.onDecoderInitialized(
eventTime, C.TRACK_TYPE_VIDEO, decoderName, initializationDurationMs);
}); });
} }
...@@ -320,7 +309,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -320,7 +309,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
listener -> { listener -> {
listener.onVideoInputFormatChanged(eventTime, format); listener.onVideoInputFormatChanged(eventTime, format);
listener.onVideoInputFormatChanged(eventTime, format, decoderReuseEvaluation); listener.onVideoInputFormatChanged(eventTime, format, decoderReuseEvaluation);
listener.onDecoderInputFormatChanged(eventTime, C.TRACK_TYPE_VIDEO, format);
}); });
} }
...@@ -343,7 +331,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -343,7 +331,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
} }
@Override @Override
@SuppressWarnings("deprecation") // Calling deprecated listener method.
public final void onVideoDisabled(DecoderCounters counters) { public final void onVideoDisabled(DecoderCounters counters) {
EventTime eventTime = generatePlayingMediaPeriodEventTime(); EventTime eventTime = generatePlayingMediaPeriodEventTime();
sendEvent( sendEvent(
...@@ -351,7 +338,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector { ...@@ -351,7 +338,6 @@ public class DefaultAnalyticsCollector implements AnalyticsCollector {
AnalyticsListener.EVENT_VIDEO_DISABLED, AnalyticsListener.EVENT_VIDEO_DISABLED,
listener -> { listener -> {
listener.onVideoDisabled(eventTime, counters); listener.onVideoDisabled(eventTime, counters);
listener.onDecoderDisabled(eventTime, C.TRACK_TYPE_VIDEO, counters);
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment