Search in sources :

Example 96 with ActionSchedule

use of com.google.android.exoplayer2.playbacktests.util.ActionSchedule in project ExoPlayer by google.

the class ExoPlayerTest method sendMessagesRepeatWithoutDeletingDoesRepost.

@Test
public void sendMessagesRepeatWithoutDeletingDoesRepost() throws Exception {
    PositionGrabbingMessageTarget target = new PositionGrabbingMessageTarget();
    ActionSchedule actionSchedule = new ActionSchedule.Builder(TAG).pause().waitForPlaybackState(Player.STATE_BUFFERING).sendMessage(target, /* mediaItemIndex= */
    0, /* positionMs= */
    50, /* deleteAfterDelivery= */
    false).setRepeatMode(Player.REPEAT_MODE_ALL).playUntilPosition(/* mediaItemIndex= */
    0, /* positionMs= */
    1).playUntilStartOfMediaItem(/* mediaItemIndex= */
    0).setRepeatMode(Player.REPEAT_MODE_OFF).play().build();
    new ExoPlayerTestRunner.Builder(context).setActionSchedule(actionSchedule).build().start().blockUntilEnded(TIMEOUT_MS);
    assertThat(target.messageCount).isEqualTo(2);
    assertThat(target.positionMs).isAtLeast(50L);
}
Also used : ActionSchedule(com.google.android.exoplayer2.testutil.ActionSchedule) TestExoPlayerBuilder(com.google.android.exoplayer2.testutil.TestExoPlayerBuilder) Test(org.junit.Test)

Example 97 with ActionSchedule

use of com.google.android.exoplayer2.playbacktests.util.ActionSchedule in project ExoPlayer by google.

the class ExoPlayerTest method periodTransitionReportsCorrectBufferedPosition.

@Test
public void periodTransitionReportsCorrectBufferedPosition() throws Exception {
    int periodCount = 3;
    long periodDurationUs = 5 * C.MICROS_PER_SECOND;
    long windowDurationUs = periodCount * periodDurationUs;
    Timeline timeline = new FakeTimeline(new TimelineWindowDefinition(periodCount, /* id= */
    new Object(), /* isSeekable= */
    true, /* isDynamic= */
    false, windowDurationUs));
    AtomicReference<Player> playerReference = new AtomicReference<>();
    AtomicLong bufferedPositionAtFirstDiscontinuityMs = new AtomicLong(C.TIME_UNSET);
    Player.Listener playerListener = new Player.Listener() {

        @Override
        public void onPositionDiscontinuity(@DiscontinuityReason int reason) {
            if (reason == Player.DISCONTINUITY_REASON_AUTO_TRANSITION) {
                if (bufferedPositionAtFirstDiscontinuityMs.get() == C.TIME_UNSET) {
                    bufferedPositionAtFirstDiscontinuityMs.set(playerReference.get().getBufferedPosition());
                }
            }
        }
    };
    ActionSchedule actionSchedule = new ActionSchedule.Builder(TAG).executeRunnable(new PlayerRunnable() {

        @Override
        public void run(ExoPlayer player) {
            playerReference.set(player);
            player.addListener(playerListener);
        }
    }).pause().waitForIsLoading(/* targetIsLoading= */
    true).waitForIsLoading(/* targetIsLoading= */
    false).play().build();
    new ExoPlayerTestRunner.Builder(context).setTimeline(timeline).setActionSchedule(actionSchedule).build().start().blockUntilEnded(TIMEOUT_MS);
    assertThat(bufferedPositionAtFirstDiscontinuityMs.get()).isEqualTo(Util.usToMs(windowDurationUs));
}
Also used : TransferListener(com.google.android.exoplayer2.upstream.TransferListener) Listener(com.google.android.exoplayer2.Player.Listener) MediaSourceEventListener(com.google.android.exoplayer2.source.MediaSourceEventListener) AnalyticsListener(com.google.android.exoplayer2.analytics.AnalyticsListener) DrmSessionEventListener(com.google.android.exoplayer2.drm.DrmSessionEventListener) DiscontinuityReason(com.google.android.exoplayer2.Player.DiscontinuityReason) ActionSchedule(com.google.android.exoplayer2.testutil.ActionSchedule) PlayerRunnable(com.google.android.exoplayer2.testutil.ActionSchedule.PlayerRunnable) TestExoPlayerBuilder(com.google.android.exoplayer2.testutil.TestExoPlayerBuilder) AtomicReference(java.util.concurrent.atomic.AtomicReference) Listener(com.google.android.exoplayer2.Player.Listener) NoUidTimeline(com.google.android.exoplayer2.testutil.NoUidTimeline) SinglePeriodTimeline(com.google.android.exoplayer2.source.SinglePeriodTimeline) FakeTimeline(com.google.android.exoplayer2.testutil.FakeTimeline) AtomicLong(java.util.concurrent.atomic.AtomicLong) FakeTimeline(com.google.android.exoplayer2.testutil.FakeTimeline) TimelineWindowDefinition(com.google.android.exoplayer2.testutil.FakeTimeline.TimelineWindowDefinition) ExoPlayerTestRunner(com.google.android.exoplayer2.testutil.ExoPlayerTestRunner) Test(org.junit.Test)

Example 98 with ActionSchedule

use of com.google.android.exoplayer2.playbacktests.util.ActionSchedule in project ExoPlayer by google.

the class ExoPlayerTest method setMediaSources_whenPrepared_invalidSeek_correctMaskingPlaybackState.

@Test
public void setMediaSources_whenPrepared_invalidSeek_correctMaskingPlaybackState() throws Exception {
    Timeline firstTimeline = new FakeTimeline(/* windowCount= */
    1, 1L);
    MediaSource firstMediaSource = new FakeMediaSource(firstTimeline);
    final int[] maskingPlaybackStates = new int[1];
    Arrays.fill(maskingPlaybackStates, C.INDEX_UNSET);
    ActionSchedule actionSchedule = new ActionSchedule.Builder(TAG).pause().waitForPlaybackState(Player.STATE_ENDED).executeRunnable(new PlayerRunnable() {

        @Override
        public void run(ExoPlayer player) {
            // An implicit, invalid seek picking up the position set by the initial seek.
            player.setMediaSource(firstMediaSource, /* resetPosition= */
            false);
            // Expect masking state is ended,
            maskingPlaybackStates[0] = player.getPlaybackState();
        }
    }).waitForTimelineChanged().setMediaSources(/* mediaItemIndex= */
    0, /* positionMs= */
    C.TIME_UNSET, firstMediaSource).waitForPlaybackState(Player.STATE_READY).play().waitForPlaybackState(Player.STATE_ENDED).build();
    ExoPlayerTestRunner exoPlayerTestRunner = new ExoPlayerTestRunner.Builder(context).setExpectedPlayerEndedCount(/* expectedPlayerEndedCount= */
    2).initialSeek(/* mediaItemIndex= */
    1, /* positionMs= */
    C.TIME_UNSET).setMediaSources(new ConcatenatingMediaSource()).setActionSchedule(actionSchedule).build().start().blockUntilActionScheduleFinished(TIMEOUT_MS).blockUntilEnded(TIMEOUT_MS);
    // Expect reset of masking to first media item.
    exoPlayerTestRunner.assertPlaybackStatesEqual(// Empty source has been prepared.
    Player.STATE_ENDED, // After setting another source.
    Player.STATE_BUFFERING, Player.STATE_READY, Player.STATE_ENDED);
    assertArrayEquals(new int[] { Player.STATE_ENDED }, maskingPlaybackStates);
    exoPlayerTestRunner.assertTimelineChangeReasonsEqual(Player.TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED, Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE, Player.TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED, Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE);
}
Also used : FakeMediaSource(com.google.android.exoplayer2.testutil.FakeMediaSource) ActionSchedule(com.google.android.exoplayer2.testutil.ActionSchedule) PlayerRunnable(com.google.android.exoplayer2.testutil.ActionSchedule.PlayerRunnable) TestExoPlayerBuilder(com.google.android.exoplayer2.testutil.TestExoPlayerBuilder) NoUidTimeline(com.google.android.exoplayer2.testutil.NoUidTimeline) SinglePeriodTimeline(com.google.android.exoplayer2.source.SinglePeriodTimeline) FakeTimeline(com.google.android.exoplayer2.testutil.FakeTimeline) ServerSideAdInsertionMediaSource(com.google.android.exoplayer2.source.ads.ServerSideAdInsertionMediaSource) FakeAdaptiveMediaSource(com.google.android.exoplayer2.testutil.FakeAdaptiveMediaSource) MaskingMediaSource(com.google.android.exoplayer2.source.MaskingMediaSource) ConcatenatingMediaSource(com.google.android.exoplayer2.source.ConcatenatingMediaSource) MediaSource(com.google.android.exoplayer2.source.MediaSource) CompositeMediaSource(com.google.android.exoplayer2.source.CompositeMediaSource) ClippingMediaSource(com.google.android.exoplayer2.source.ClippingMediaSource) FakeMediaSource(com.google.android.exoplayer2.testutil.FakeMediaSource) FakeTimeline(com.google.android.exoplayer2.testutil.FakeTimeline) ConcatenatingMediaSource(com.google.android.exoplayer2.source.ConcatenatingMediaSource) ExoPlayerTestRunner(com.google.android.exoplayer2.testutil.ExoPlayerTestRunner) Test(org.junit.Test)

Example 99 with ActionSchedule

use of com.google.android.exoplayer2.playbacktests.util.ActionSchedule in project ExoPlayer by google.

the class ExoPlayerTest method setMediaSources_whenEmpty_correctMaskingMediaItemIndex.

@Test
public void setMediaSources_whenEmpty_correctMaskingMediaItemIndex() throws Exception {
    final int[] currentMediaItemIndices = { C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET, C.INDEX_UNSET };
    ActionSchedule actionSchedule = new ActionSchedule.Builder(TAG).waitForPlaybackState(Player.STATE_READY).executeRunnable(new PlayerRunnable() {

        @Override
        public void run(ExoPlayer player) {
            // Increase current media item index.
            player.addMediaSource(/* index= */
            0, new FakeMediaSource());
            currentMediaItemIndices[0] = player.getCurrentMediaItemIndex();
        }
    }).executeRunnable(new PlayerRunnable() {

        @Override
        public void run(ExoPlayer player) {
            // Current media item index is unchanged.
            player.addMediaSource(/* index= */
            2, new FakeMediaSource());
            currentMediaItemIndices[1] = player.getCurrentMediaItemIndex();
        }
    }).executeRunnable(new PlayerRunnable() {

        @Override
        public void run(ExoPlayer player) {
            MediaSource mediaSource = new FakeMediaSource();
            ConcatenatingMediaSource concatenatingMediaSource = new ConcatenatingMediaSource(mediaSource, mediaSource, mediaSource);
            // Increase current media item with multi media item source.
            player.addMediaSource(/* index= */
            0, concatenatingMediaSource);
            currentMediaItemIndices[2] = player.getCurrentMediaItemIndex();
        }
    }).executeRunnable(new PlayerRunnable() {

        @Override
        public void run(ExoPlayer player) {
            ConcatenatingMediaSource concatenatingMediaSource = new ConcatenatingMediaSource();
            // Current media item index is unchanged when adding empty source.
            player.addMediaSource(/* index= */
            0, concatenatingMediaSource);
            currentMediaItemIndices[3] = player.getCurrentMediaItemIndex();
        }
    }).build();
    new ExoPlayerTestRunner.Builder(context).setMediaSources(new FakeMediaSource()).setActionSchedule(actionSchedule).build().start().blockUntilActionScheduleFinished(TIMEOUT_MS).blockUntilEnded(TIMEOUT_MS);
    assertArrayEquals(new int[] { 1, 1, 4, 4 }, currentMediaItemIndices);
}
Also used : FakeMediaSource(com.google.android.exoplayer2.testutil.FakeMediaSource) ServerSideAdInsertionMediaSource(com.google.android.exoplayer2.source.ads.ServerSideAdInsertionMediaSource) FakeAdaptiveMediaSource(com.google.android.exoplayer2.testutil.FakeAdaptiveMediaSource) MaskingMediaSource(com.google.android.exoplayer2.source.MaskingMediaSource) ConcatenatingMediaSource(com.google.android.exoplayer2.source.ConcatenatingMediaSource) MediaSource(com.google.android.exoplayer2.source.MediaSource) CompositeMediaSource(com.google.android.exoplayer2.source.CompositeMediaSource) ClippingMediaSource(com.google.android.exoplayer2.source.ClippingMediaSource) FakeMediaSource(com.google.android.exoplayer2.testutil.FakeMediaSource) ActionSchedule(com.google.android.exoplayer2.testutil.ActionSchedule) PlayerRunnable(com.google.android.exoplayer2.testutil.ActionSchedule.PlayerRunnable) TestExoPlayerBuilder(com.google.android.exoplayer2.testutil.TestExoPlayerBuilder) ConcatenatingMediaSource(com.google.android.exoplayer2.source.ConcatenatingMediaSource) Test(org.junit.Test)

Example 100 with ActionSchedule

use of com.google.android.exoplayer2.playbacktests.util.ActionSchedule in project ExoPlayer by google.

the class DefaultAnalyticsCollectorTest method onPlayerError_thrownDuringRendererReplaceStreamAtPeriodTransition_isReportedForNewPeriod.

@Test
public void onPlayerError_thrownDuringRendererReplaceStreamAtPeriodTransition_isReportedForNewPeriod() throws Exception {
    FakeMediaSource source = new FakeMediaSource(new FakeTimeline(), ExoPlayerTestRunner.AUDIO_FORMAT);
    RenderersFactory renderersFactory = (eventHandler, videoListener, audioListener, textOutput, metadataOutput) -> new Renderer[] { new FakeRenderer(C.TRACK_TYPE_AUDIO) {

        private int streamChangeCount = 0;

        @Override
        protected void onStreamChanged(Format[] formats, long startPositionUs, long offsetUs) throws ExoPlaybackException {
            // period transition (as the first time is when enabling the stream initially).
            if (++streamChangeCount == 2) {
                throw createRendererException(new IllegalStateException(), ExoPlayerTestRunner.AUDIO_FORMAT, PlaybackException.ERROR_CODE_UNSPECIFIED);
            }
        }
    } };
    TestAnalyticsListener listener = runAnalyticsTest(new ConcatenatingMediaSource(source, source), /* actionSchedule= */
    null, renderersFactory);
    populateEventIds(listener.lastReportedTimeline);
    assertThat(listener.getEvents(EVENT_PLAYER_ERROR)).containsExactly(period1);
}
Also used : ExoPlaybackException(com.google.android.exoplayer2.ExoPlaybackException) LoadEventInfo(com.google.android.exoplayer2.source.LoadEventInfo) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) EVENT_TIMELINE_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_TIMELINE_CHANGED) ExoMediaDrm(com.google.android.exoplayer2.drm.ExoMediaDrm) TestExoPlayerBuilder(com.google.android.exoplayer2.testutil.TestExoPlayerBuilder) EVENT_RENDERED_FIRST_FRAME(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_RENDERED_FIRST_FRAME) ExoPlayerTestRunner(com.google.android.exoplayer2.testutil.ExoPlayerTestRunner) MimeTypes(com.google.android.exoplayer2.util.MimeTypes) Looper(android.os.Looper) EVENT_AUDIO_DECODER_INITIALIZED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_AUDIO_DECODER_INITIALIZED) C(com.google.android.exoplayer2.C) EVENT_LOAD_STARTED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_LOAD_STARTED) DefaultDrmSessionManager(com.google.android.exoplayer2.drm.DefaultDrmSessionManager) PlayerRunnable(com.google.android.exoplayer2.testutil.ActionSchedule.PlayerRunnable) Surface(android.view.Surface) EVENT_AUDIO_ENABLED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_AUDIO_ENABLED) Mockito.atLeastOnce(org.mockito.Mockito.atLeastOnce) FakeClock(com.google.android.exoplayer2.testutil.FakeClock) FakeAudioRenderer(com.google.android.exoplayer2.testutil.FakeAudioRenderer) Nullable(androidx.annotation.Nullable) Timeline(com.google.android.exoplayer2.Timeline) EVENT_PLAYER_ERROR(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_PLAYER_ERROR) RobolectricUtil(com.google.android.exoplayer2.robolectric.RobolectricUtil) ArgumentMatchers.anyFloat(org.mockito.ArgumentMatchers.anyFloat) EVENT_POSITION_DISCONTINUITY(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_POSITION_DISCONTINUITY) EVENT_VIDEO_INPUT_FORMAT_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_VIDEO_INPUT_FORMAT_CHANGED) EVENT_IS_PLAYING_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_IS_PLAYING_CHANGED) Mockito.mock(org.mockito.Mockito.mock) AdPlaybackState(com.google.android.exoplayer2.source.ads.AdPlaybackState) RunWith(org.junit.runner.RunWith) PlaybackParameters(com.google.android.exoplayer2.PlaybackParameters) ArgumentMatchers.anyBoolean(org.mockito.ArgumentMatchers.anyBoolean) Mockito.spy(org.mockito.Mockito.spy) EVENT_PLAYBACK_PARAMETERS_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_PLAYBACK_PARAMETERS_CHANGED) TestUtil(com.google.android.exoplayer2.testutil.TestUtil) EVENT_VIDEO_SIZE_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_VIDEO_SIZE_CHANGED) ArrayList(java.util.ArrayList) ExoPlayer(com.google.android.exoplayer2.ExoPlayer) EVENT_VIDEO_FRAME_PROCESSING_OFFSET(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_VIDEO_FRAME_PROCESSING_OFFSET) MediaDrmCallbackException(com.google.android.exoplayer2.drm.MediaDrmCallbackException) EVENT_DRM_SESSION_ACQUIRED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_DRM_SESSION_ACQUIRED) Clock(com.google.android.exoplayer2.util.Clock) ShadowLooper(org.robolectric.shadows.ShadowLooper) IOException(java.io.IOException) Test(org.junit.Test) EVENT_VIDEO_DISABLED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_VIDEO_DISABLED) TestPlayerRunHelper(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper) TracksInfo(com.google.android.exoplayer2.TracksInfo) DrmSessionManager(com.google.android.exoplayer2.drm.DrmSessionManager) DrmInitData(com.google.android.exoplayer2.drm.DrmInitData) ArgumentMatchers.same(org.mockito.ArgumentMatchers.same) Util(com.google.android.exoplayer2.util.Util) EVENT_VIDEO_ENABLED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_VIDEO_ENABLED) MediaPeriodId(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ConcatenatingMediaSource(com.google.android.exoplayer2.source.ConcatenatingMediaSource) Player(com.google.android.exoplayer2.Player) EVENT_VIDEO_DECODER_INITIALIZED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_VIDEO_DECODER_INITIALIZED) AndroidJUnit4(androidx.test.ext.junit.runners.AndroidJUnit4) ApplicationProvider(androidx.test.core.app.ApplicationProvider) Format(com.google.android.exoplayer2.Format) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) EVENT_IS_LOADING_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_IS_LOADING_CHANGED) Method(java.lang.reflect.Method) MediaSource(com.google.android.exoplayer2.source.MediaSource) ActionSchedule(com.google.android.exoplayer2.testutil.ActionSchedule) EVENT_PLAYER_RELEASED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_PLAYER_RELEASED) RenderersFactory(com.google.android.exoplayer2.RenderersFactory) EVENT_PLAYBACK_STATE_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_PLAYBACK_STATE_CHANGED) MediaItem(com.google.android.exoplayer2.MediaItem) EVENT_DRM_KEYS_LOADED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_DRM_KEYS_LOADED) END_OF_STREAM_ITEM(com.google.android.exoplayer2.testutil.FakeSampleStream.FakeSampleStreamItem.END_OF_STREAM_ITEM) EVENT_TRACKS_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_TRACKS_CHANGED) UUID(java.util.UUID) EVENT_DRM_SESSION_MANAGER_ERROR(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_DRM_SESSION_MANAGER_ERROR) SparseArray(android.util.SparseArray) FakeSampleStreamItem.oneByteSample(com.google.android.exoplayer2.testutil.FakeSampleStream.FakeSampleStreamItem.oneByteSample) DrmSession(com.google.android.exoplayer2.drm.DrmSession) List(java.util.List) FakeTimeline(com.google.android.exoplayer2.testutil.FakeTimeline) Mockito.inOrder(org.mockito.Mockito.inOrder) EVENT_DRM_SESSION_RELEASED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_DRM_SESSION_RELEASED) PlaybackException(com.google.android.exoplayer2.PlaybackException) MediaLoadData(com.google.android.exoplayer2.source.MediaLoadData) FakeVideoRenderer(com.google.android.exoplayer2.testutil.FakeVideoRenderer) EVENT_AUDIO_POSITION_ADVANCING(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_AUDIO_POSITION_ADVANCING) Metadata(com.google.android.exoplayer2.metadata.Metadata) EVENT_LOAD_COMPLETED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_LOAD_COMPLETED) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) DecoderCounters(com.google.android.exoplayer2.decoder.DecoderCounters) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) TimelineWindowDefinition(com.google.android.exoplayer2.testutil.FakeTimeline.TimelineWindowDefinition) AtomicReference(java.util.concurrent.atomic.AtomicReference) EVENT_LOAD_ERROR(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_LOAD_ERROR) ArgumentCaptor(org.mockito.ArgumentCaptor) ImmutableList(com.google.common.collect.ImmutableList) FakeRenderer(com.google.android.exoplayer2.testutil.FakeRenderer) ConditionVariable(com.google.android.exoplayer2.util.ConditionVariable) ArgumentMatchers.anyInt(org.mockito.ArgumentMatchers.anyInt) VideoSize(com.google.android.exoplayer2.video.VideoSize) SurfaceTexture(android.graphics.SurfaceTexture) Window(com.google.android.exoplayer2.Timeline.Window) EVENT_MEDIA_ITEM_TRANSITION(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_MEDIA_ITEM_TRANSITION) MediaDrmCallback(com.google.android.exoplayer2.drm.MediaDrmCallback) InOrder(org.mockito.InOrder) Iterator(java.util.Iterator) EVENT_AUDIO_DISABLED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_AUDIO_DISABLED) EVENT_DOWNSTREAM_FORMAT_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_DOWNSTREAM_FORMAT_CHANGED) Truth.assertThat(com.google.common.truth.Truth.assertThat) EVENT_DROPPED_VIDEO_FRAMES(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_DROPPED_VIDEO_FRAMES) Mockito.verify(org.mockito.Mockito.verify) EVENT_PLAY_WHEN_READY_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_PLAY_WHEN_READY_CHANGED) FakeMediaSource(com.google.android.exoplayer2.testutil.FakeMediaSource) FakeExoMediaDrm(com.google.android.exoplayer2.testutil.FakeExoMediaDrm) EVENT_AUDIO_INPUT_FORMAT_CHANGED(com.google.android.exoplayer2.analytics.AnalyticsListener.EVENT_AUDIO_INPUT_FORMAT_CHANGED) Renderer(com.google.android.exoplayer2.Renderer) FakeRenderer(com.google.android.exoplayer2.testutil.FakeRenderer) FakeMediaSource(com.google.android.exoplayer2.testutil.FakeMediaSource) FakeTimeline(com.google.android.exoplayer2.testutil.FakeTimeline) FakeAudioRenderer(com.google.android.exoplayer2.testutil.FakeAudioRenderer) FakeVideoRenderer(com.google.android.exoplayer2.testutil.FakeVideoRenderer) FakeRenderer(com.google.android.exoplayer2.testutil.FakeRenderer) Renderer(com.google.android.exoplayer2.Renderer) ConcatenatingMediaSource(com.google.android.exoplayer2.source.ConcatenatingMediaSource) RenderersFactory(com.google.android.exoplayer2.RenderersFactory) Test(org.junit.Test)

Aggregations

ActionSchedule (com.google.android.exoplayer2.testutil.ActionSchedule)143 Test (org.junit.Test)142 TestExoPlayerBuilder (com.google.android.exoplayer2.testutil.TestExoPlayerBuilder)103 ExoPlayerTestRunner (com.google.android.exoplayer2.testutil.ExoPlayerTestRunner)97 FakeMediaSource (com.google.android.exoplayer2.testutil.FakeMediaSource)96 FakeTimeline (com.google.android.exoplayer2.testutil.FakeTimeline)84 PlayerRunnable (com.google.android.exoplayer2.testutil.ActionSchedule.PlayerRunnable)79 SinglePeriodTimeline (com.google.android.exoplayer2.source.SinglePeriodTimeline)59 NoUidTimeline (com.google.android.exoplayer2.testutil.NoUidTimeline)59 ConcatenatingMediaSource (com.google.android.exoplayer2.source.ConcatenatingMediaSource)55 MediaSource (com.google.android.exoplayer2.source.MediaSource)40 TimelineWindowDefinition (com.google.android.exoplayer2.testutil.FakeTimeline.TimelineWindowDefinition)36 ClippingMediaSource (com.google.android.exoplayer2.source.ClippingMediaSource)30 CompositeMediaSource (com.google.android.exoplayer2.source.CompositeMediaSource)30 MaskingMediaSource (com.google.android.exoplayer2.source.MaskingMediaSource)30 ServerSideAdInsertionMediaSource (com.google.android.exoplayer2.source.ads.ServerSideAdInsertionMediaSource)30 FakeAdaptiveMediaSource (com.google.android.exoplayer2.testutil.FakeAdaptiveMediaSource)30 TransferListener (com.google.android.exoplayer2.upstream.TransferListener)19 AnalyticsListener (com.google.android.exoplayer2.analytics.AnalyticsListener)17 ArrayList (java.util.ArrayList)16