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);
}); });
} }
......
...@@ -148,10 +148,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -148,10 +148,6 @@ public final class DefaultAnalyticsCollectorTest {
private static final long EVENT_PLAYER_STATE_CHANGED = 1L << 63; private static final long EVENT_PLAYER_STATE_CHANGED = 1L << 63;
private static final long EVENT_SEEK_STARTED = 1L << 62; private static final long EVENT_SEEK_STARTED = 1L << 62;
private static final long EVENT_SEEK_PROCESSED = 1L << 61; private static final long EVENT_SEEK_PROCESSED = 1L << 61;
private static final long EVENT_DECODER_ENABLED = 1L << 60;
private static final long EVENT_DECODER_INIT = 1L << 59;
private static final long EVENT_DECODER_FORMAT_CHANGED = 1L << 58;
private static final long EVENT_DECODER_DISABLED = 1L << 57;
private static final UUID DRM_SCHEME_UUID = private static final UUID DRM_SCHEME_UUID =
UUID.nameUUIDFromBytes(TestUtil.createByteArray(7, 8, 9)); UUID.nameUUIDFromBytes(TestUtil.createByteArray(7, 8, 9));
...@@ -274,15 +270,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -274,15 +270,6 @@ public final class DefaultAnalyticsCollectorTest {
assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED)) assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED))
.containsExactly(period0 /* audio */, period0 /* video */) .containsExactly(period0 /* audio */, period0 /* video */)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED))
.containsExactly(period0 /* audio */, period0 /* video */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(period0 /* audio */, period0 /* video */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(period0 /* audio */, period0 /* video */)
.inOrder();
assertThat(listener.getEvents(EVENT_AUDIO_ENABLED)).containsExactly(period0); assertThat(listener.getEvents(EVENT_AUDIO_ENABLED)).containsExactly(period0);
assertThat(listener.getEvents(EVENT_AUDIO_DECODER_INITIALIZED)).containsExactly(period0); assertThat(listener.getEvents(EVENT_AUDIO_DECODER_INITIALIZED)).containsExactly(period0);
assertThat(listener.getEvents(EVENT_AUDIO_INPUT_FORMAT_CHANGED)).containsExactly(period0); assertThat(listener.getEvents(EVENT_AUDIO_INPUT_FORMAT_CHANGED)).containsExactly(period0);
...@@ -354,17 +341,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -354,17 +341,6 @@ public final class DefaultAnalyticsCollectorTest {
.containsExactly( .containsExactly(
period0 /* audio */, period0 /* video */, period1 /* audio */, period1 /* video */) period0 /* audio */, period0 /* video */, period1 /* audio */, period1 /* video */)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED))
.containsExactly(period0 /* audio */, period0 /* video */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(
period0 /* audio */, period0 /* video */, period1 /* audio */, period1 /* video */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(
period0 /* audio */, period0 /* video */, period1 /* audio */, period1 /* video */)
.inOrder();
assertThat(listener.getEvents(EVENT_AUDIO_ENABLED)).containsExactly(period0); assertThat(listener.getEvents(EVENT_AUDIO_ENABLED)).containsExactly(period0);
assertThat(listener.getEvents(EVENT_AUDIO_DECODER_INITIALIZED)) assertThat(listener.getEvents(EVENT_AUDIO_DECODER_INITIALIZED))
.containsExactly(period0, period1) .containsExactly(period0, period1)
...@@ -439,16 +415,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -439,16 +415,6 @@ public final class DefaultAnalyticsCollectorTest {
assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED)) assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED))
.containsExactly(period0 /* video */, period1 /* audio */) .containsExactly(period0 /* video */, period1 /* audio */)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED))
.containsExactly(period0 /* video */, period1 /* audio */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(period0 /* video */, period1 /* audio */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(period0 /* video */, period1 /* audio */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_DISABLED)).containsExactly(period0 /* video */);
assertThat(listener.getEvents(EVENT_AUDIO_ENABLED)).containsExactly(period1); assertThat(listener.getEvents(EVENT_AUDIO_ENABLED)).containsExactly(period1);
assertThat(listener.getEvents(EVENT_AUDIO_DECODER_INITIALIZED)).containsExactly(period1); assertThat(listener.getEvents(EVENT_AUDIO_DECODER_INITIALIZED)).containsExactly(period1);
assertThat(listener.getEvents(EVENT_AUDIO_INPUT_FORMAT_CHANGED)).containsExactly(period1); assertThat(listener.getEvents(EVENT_AUDIO_INPUT_FORMAT_CHANGED)).containsExactly(period1);
...@@ -529,18 +495,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -529,18 +495,6 @@ public final class DefaultAnalyticsCollectorTest {
assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED)) assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED))
.containsExactly(period0 /* video */, period0 /* audio */, period1 /* audio */) .containsExactly(period0 /* video */, period0 /* audio */, period1 /* audio */)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED))
.containsExactly(period0 /* video */, period0 /* audio */, period1 /* audio */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(period0 /* video */, period0 /* audio */, period1 /* audio */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(period0 /* video */, period0 /* audio */, period1 /* audio */)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_DISABLED))
.containsExactly(period0 /* video */, period0 /* audio */)
.inOrder();
assertThat(listener.getEvents(EVENT_AUDIO_ENABLED)).containsExactly(period0, period1).inOrder(); assertThat(listener.getEvents(EVENT_AUDIO_ENABLED)).containsExactly(period0, period1).inOrder();
assertThat(listener.getEvents(EVENT_AUDIO_DECODER_INITIALIZED)) assertThat(listener.getEvents(EVENT_AUDIO_DECODER_INITIALIZED))
.containsExactly(period0, period1) .containsExactly(period0, period1)
...@@ -634,16 +588,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -634,16 +588,6 @@ public final class DefaultAnalyticsCollectorTest {
assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED)) assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED))
.containsExactly(period0, period1Seq1, period1Seq1, period1Seq2, period1Seq2) .containsExactly(period0, period1Seq1, period1Seq1, period1Seq2, period1Seq2)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED))
.containsExactly(period0, period1, period0, period1Seq2)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(period0, period1Seq1, period1Seq1, period1Seq2, period1Seq2)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(period0, period1Seq1, period1Seq1, period1Seq2, period1Seq2)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_DISABLED)).containsExactly(period0, period0);
assertThat(listener.getEvents(EVENT_AUDIO_ENABLED)) assertThat(listener.getEvents(EVENT_AUDIO_ENABLED))
.containsExactly(period1, period1Seq2) .containsExactly(period1, period1Seq2)
.inOrder(); .inOrder();
...@@ -753,16 +697,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -753,16 +697,6 @@ public final class DefaultAnalyticsCollectorTest {
assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED)) assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED))
.containsExactly(period0Seq0, period0Seq1) .containsExactly(period0Seq0, period0Seq1)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED))
.containsExactly(period0Seq0, period0Seq1)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(period0Seq0, period0Seq1)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(period0Seq0, period0Seq1)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_DISABLED)).containsExactly(period0Seq0);
assertThat(listener.getEvents(EVENT_VIDEO_ENABLED)) assertThat(listener.getEvents(EVENT_VIDEO_ENABLED))
.containsExactly(period0Seq0, period0Seq1) .containsExactly(period0Seq0, period0Seq1)
.inOrder(); .inOrder();
...@@ -850,11 +784,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -850,11 +784,6 @@ public final class DefaultAnalyticsCollectorTest {
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED)) assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED))
.containsExactly(period0Seq0, period0Seq0); .containsExactly(period0Seq0, period0Seq0);
assertThat(listener.getEvents(EVENT_DECODER_ENABLED)).containsExactly(period0Seq0, period0Seq0);
assertThat(listener.getEvents(EVENT_DECODER_INIT)).containsExactly(period0Seq0, period0Seq0);
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(period0Seq0, period0Seq0);
assertThat(listener.getEvents(EVENT_DECODER_DISABLED)).containsExactly(period0Seq0);
assertThat(listener.getEvents(EVENT_VIDEO_ENABLED)).containsExactly(period0Seq0, period0Seq0); assertThat(listener.getEvents(EVENT_VIDEO_ENABLED)).containsExactly(period0Seq0, period0Seq0);
assertThat(listener.getEvents(EVENT_VIDEO_DECODER_INITIALIZED)) assertThat(listener.getEvents(EVENT_VIDEO_DECODER_INITIALIZED))
.containsExactly(period0Seq0, period0Seq0); .containsExactly(period0Seq0, period0Seq0);
...@@ -926,16 +855,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -926,16 +855,6 @@ public final class DefaultAnalyticsCollectorTest {
assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED)) assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED))
.containsExactly(window0Period1Seq0, window1Period0Seq1) .containsExactly(window0Period1Seq0, window1Period0Seq1)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED))
.containsExactly(window0Period1Seq0, window0Period1Seq0)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(window0Period1Seq0, window1Period0Seq1)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(window0Period1Seq0, window1Period0Seq1)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_DISABLED)).containsExactly(window0Period1Seq0);
assertThat(listener.getEvents(EVENT_VIDEO_ENABLED)) assertThat(listener.getEvents(EVENT_VIDEO_ENABLED))
.containsExactly(window0Period1Seq0, window0Period1Seq0) .containsExactly(window0Period1Seq0, window0Period1Seq0)
.inOrder(); .inOrder();
...@@ -1028,16 +947,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -1028,16 +947,6 @@ public final class DefaultAnalyticsCollectorTest {
assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED)) assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED))
.containsExactly(period0Seq0, period1Seq1) .containsExactly(period0Seq0, period1Seq1)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED))
.containsExactly(period0Seq0, period0Seq1)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(period0Seq0, period1Seq1)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(period0Seq0, period1Seq1)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_DISABLED)).containsExactly(period0Seq0);
assertThat(listener.getEvents(EVENT_VIDEO_ENABLED)) assertThat(listener.getEvents(EVENT_VIDEO_ENABLED))
.containsExactly(period0Seq0, period0Seq1) .containsExactly(period0Seq0, period0Seq1)
.inOrder(); .inOrder();
...@@ -1257,25 +1166,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -1257,25 +1166,6 @@ public final class DefaultAnalyticsCollectorTest {
postrollAd, postrollAd,
contentAfterPostroll) contentAfterPostroll)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED)).containsExactly(prerollAd);
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(
prerollAd,
contentAfterPreroll,
midrollAd,
contentAfterMidroll,
postrollAd,
contentAfterPostroll)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(
prerollAd,
contentAfterPreroll,
midrollAd,
contentAfterMidroll,
postrollAd,
contentAfterPostroll)
.inOrder();
assertThat(listener.getEvents(EVENT_VIDEO_ENABLED)).containsExactly(prerollAd); assertThat(listener.getEvents(EVENT_VIDEO_ENABLED)).containsExactly(prerollAd);
assertThat(listener.getEvents(EVENT_VIDEO_DECODER_INITIALIZED)) assertThat(listener.getEvents(EVENT_VIDEO_DECODER_INITIALIZED))
.containsExactly( .containsExactly(
...@@ -1428,16 +1318,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -1428,16 +1318,6 @@ public final class DefaultAnalyticsCollectorTest {
assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED)) assertThat(listener.getEvents(EVENT_DOWNSTREAM_FORMAT_CHANGED))
.containsExactly(contentBeforeMidroll, midrollAd, contentAfterMidroll) .containsExactly(contentBeforeMidroll, midrollAd, contentAfterMidroll)
.inOrder(); .inOrder();
assertThat(listener.getEvents(EVENT_DECODER_ENABLED))
.containsExactly(contentBeforeMidroll, midrollAd)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_INIT))
.containsExactly(contentBeforeMidroll, midrollAd, contentAfterMidroll)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_FORMAT_CHANGED))
.containsExactly(contentBeforeMidroll, midrollAd, contentAfterMidroll)
.inOrder();
assertThat(listener.getEvents(EVENT_DECODER_DISABLED)).containsExactly(contentBeforeMidroll);
assertThat(listener.getEvents(EVENT_VIDEO_ENABLED)) assertThat(listener.getEvents(EVENT_VIDEO_ENABLED))
.containsExactly(contentBeforeMidroll, midrollAd) .containsExactly(contentBeforeMidroll, midrollAd)
.inOrder(); .inOrder();
...@@ -2335,33 +2215,6 @@ public final class DefaultAnalyticsCollectorTest { ...@@ -2335,33 +2215,6 @@ public final class DefaultAnalyticsCollectorTest {
reportedEvents.add(new ReportedEvent(EVENT_METADATA, eventTime)); reportedEvents.add(new ReportedEvent(EVENT_METADATA, eventTime));
} }
@SuppressWarnings("deprecation")
@Override
public void onDecoderEnabled(
EventTime eventTime, int trackType, DecoderCounters decoderCounters) {
reportedEvents.add(new ReportedEvent(EVENT_DECODER_ENABLED, eventTime));
}
@SuppressWarnings("deprecation")
@Override
public void onDecoderInitialized(
EventTime eventTime, int trackType, String decoderName, long initializationDurationMs) {
reportedEvents.add(new ReportedEvent(EVENT_DECODER_INIT, eventTime));
}
@SuppressWarnings("deprecation")
@Override
public void onDecoderInputFormatChanged(EventTime eventTime, int trackType, Format format) {
reportedEvents.add(new ReportedEvent(EVENT_DECODER_FORMAT_CHANGED, eventTime));
}
@SuppressWarnings("deprecation")
@Override
public void onDecoderDisabled(
EventTime eventTime, int trackType, DecoderCounters decoderCounters) {
reportedEvents.add(new ReportedEvent(EVENT_DECODER_DISABLED, eventTime));
}
@Override @Override
public void onAudioEnabled(EventTime eventTime, DecoderCounters decoderCounters) { public void onAudioEnabled(EventTime eventTime, DecoderCounters decoderCounters) {
reportedEvents.add(new ReportedEvent(EVENT_AUDIO_ENABLED, eventTime)); reportedEvents.add(new ReportedEvent(EVENT_AUDIO_ENABLED, eventTime));
......
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