Search in sources :

Example 46 with ExoPlayer

use of com.google.android.exoplayer2.ExoPlayer in project ExoPlayer by google.

the class TestPlayerRunHelper method runUntilSleepingForOffload.

/**
 * Runs tasks of the main {@link Looper} until {@link
 * ExoPlayer.AudioOffloadListener#onExperimentalSleepingForOffloadChanged(boolean)} is called or a
 * playback error occurs.
 *
 * <p>If a playback error occurs it will be thrown wrapped in an {@link IllegalStateException}.
 *
 * @param player The {@link Player}.
 * @param expectedSleepForOffload The expected sleep of offload state.
 * @throws TimeoutException If the {@link RobolectricUtil#DEFAULT_TIMEOUT_MS default timeout} is
 *     exceeded.
 */
public static void runUntilSleepingForOffload(ExoPlayer player, boolean expectedSleepForOffload) throws TimeoutException {
    verifyMainTestThread(player);
    AtomicBoolean receiverCallback = new AtomicBoolean(false);
    ExoPlayer.AudioOffloadListener listener = new ExoPlayer.AudioOffloadListener() {

        @Override
        public void onExperimentalSleepingForOffloadChanged(boolean sleepingForOffload) {
            if (sleepingForOffload == expectedSleepForOffload) {
                receiverCallback.set(true);
            }
        }
    };
    player.addAudioOffloadListener(listener);
    runMainLooperUntil(() -> receiverCallback.get() || player.getPlayerError() != null);
    if (player.getPlayerError() != null) {
        throw new IllegalStateException(player.getPlayerError());
    }
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ExoPlayer(com.google.android.exoplayer2.ExoPlayer)

Example 47 with ExoPlayer

use of com.google.android.exoplayer2.ExoPlayer in project ExoPlayer by google.

the class TestPlayerRunHelper method runUntilRenderedFirstFrame.

/**
 * Runs tasks of the main {@link Looper} until the {@link Player.Listener#onRenderedFirstFrame}
 * callback is called or a playback error occurs.
 *
 * <p>If a playback error occurs it will be thrown wrapped in an {@link IllegalStateException}..
 *
 * @param player The {@link Player}.
 * @throws TimeoutException If the {@link RobolectricUtil#DEFAULT_TIMEOUT_MS default timeout} is
 *     exceeded.
 */
public static void runUntilRenderedFirstFrame(ExoPlayer player) throws TimeoutException {
    verifyMainTestThread(player);
    AtomicBoolean receivedCallback = new AtomicBoolean(false);
    Player.Listener listener = new Player.Listener() {

        @Override
        public void onRenderedFirstFrame() {
            receivedCallback.set(true);
        }
    };
    player.addListener(listener);
    runMainLooperUntil(() -> receivedCallback.get() || player.getPlayerError() != null);
    player.removeListener(listener);
    if (player.getPlayerError() != null) {
        throw new IllegalStateException(player.getPlayerError());
    }
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Player(com.google.android.exoplayer2.Player) ExoPlayer(com.google.android.exoplayer2.ExoPlayer)

Example 48 with ExoPlayer

use of com.google.android.exoplayer2.ExoPlayer in project ExoPlayer by google.

the class ExoPlayerTest method playerIdle_withSetPlaybackSpeed_usesPlaybackParameterSpeedWithPitchUnchanged.

@Test
public void playerIdle_withSetPlaybackSpeed_usesPlaybackParameterSpeedWithPitchUnchanged() {
    ExoPlayer player = new TestExoPlayerBuilder(context).build();
    player.setPlaybackParameters(new PlaybackParameters(/* speed= */
    1, /* pitch= */
    2));
    Player.Listener mockListener = mock(Player.Listener.class);
    player.addListener(mockListener);
    player.prepare();
    player.setPlaybackSpeed(2);
    verify(mockListener).onPlaybackParametersChanged(new PlaybackParameters(/* speed= */
    2, /* pitch= */
    2));
}
Also used : Listener(com.google.android.exoplayer2.Player.Listener) TestExoPlayerBuilder(com.google.android.exoplayer2.testutil.TestExoPlayerBuilder) Test(org.junit.Test)

Example 49 with ExoPlayer

use of com.google.android.exoplayer2.ExoPlayer in project ExoPlayer by google.

the class ExoPlayerTest method enableOffloadSchedulingWhileIdle_isToggled_isReported.

@Test
public void enableOffloadSchedulingWhileIdle_isToggled_isReported() throws Exception {
    ExoPlayer player = new TestExoPlayerBuilder(context).build();
    player.experimentalSetOffloadSchedulingEnabled(true);
    assertThat(runUntilReceiveOffloadSchedulingEnabledNewState(player)).isTrue();
    player.experimentalSetOffloadSchedulingEnabled(false);
    assertThat(runUntilReceiveOffloadSchedulingEnabledNewState(player)).isFalse();
}
Also used : TestExoPlayerBuilder(com.google.android.exoplayer2.testutil.TestExoPlayerBuilder) Test(org.junit.Test)

Example 50 with ExoPlayer

use of com.google.android.exoplayer2.ExoPlayer in project ExoPlayer by google.

the class ExoPlayerTest method play_playedSSAIPreMidPostRollsMultiPeriodWindow_contentPeriodTransitionsOnly.

@Test
public void play_playedSSAIPreMidPostRollsMultiPeriodWindow_contentPeriodTransitionsOnly() throws Exception {
    ArgumentCaptor<PositionInfo> oldPositionArgumentCaptor = ArgumentCaptor.forClass(PositionInfo.class);
    ArgumentCaptor<PositionInfo> newPositionArgumentCaptor = ArgumentCaptor.forClass(PositionInfo.class);
    ArgumentCaptor<Integer> reasonArgumentCaptor = ArgumentCaptor.forClass(Integer.class);
    FakeTimeline adTimeline = FakeTimeline.createMultiPeriodAdTimeline("windowId", /* numberOfPlayedAds= */
    Integer.MAX_VALUE, /* isAdPeriodFlags...= */
    true, false, true, true, false, true, true, true);
    Listener listener = mock(Listener.class);
    ExoPlayer player = new TestExoPlayerBuilder(context).build();
    player.addListener(listener);
    AtomicReference<ServerSideAdInsertionMediaSource> sourceReference = new AtomicReference<>();
    sourceReference.set(new ServerSideAdInsertionMediaSource(new FakeMediaSource(adTimeline, ExoPlayerTestRunner.AUDIO_FORMAT), contentTimeline -> {
        sourceReference.get().setAdPlaybackStates(adTimeline.getAdPlaybackStates(/* windowIndex= */
        0));
        return true;
    }));
    player.setMediaSource(sourceReference.get());
    player.prepare();
    player.play();
    runUntilPlaybackState(player, Player.STATE_ENDED);
    player.release();
    ArgumentCaptor<Integer> playbackStateCaptor = ArgumentCaptor.forClass(Integer.class);
    verify(listener, times(3)).onPlaybackStateChanged(playbackStateCaptor.capture());
    assertThat(playbackStateCaptor.getAllValues()).containsExactly(2, 3, 4).inOrder();
    verify(listener, times(3)).onPositionDiscontinuity(oldPositionArgumentCaptor.capture(), newPositionArgumentCaptor.capture(), reasonArgumentCaptor.capture());
    assertThat(reasonArgumentCaptor.getAllValues()).containsExactly(0, 0, 0).inOrder();
    List<PositionInfo> oldPositions = oldPositionArgumentCaptor.getAllValues();
    List<PositionInfo> newPositions = newPositionArgumentCaptor.getAllValues();
    // Auto discontinuity from the empty pre-roll period to the first content period.
    assertThat(oldPositions.get(0).periodIndex).isEqualTo(0);
    assertThat(oldPositions.get(0).adGroupIndex).isEqualTo(-1);
    assertThat(oldPositions.get(0).positionMs).isEqualTo(0);
    assertThat(newPositions.get(0).periodIndex).isEqualTo(1);
    assertThat(newPositions.get(0).adGroupIndex).isEqualTo(-1);
    assertThat(newPositions.get(0).positionMs).isEqualTo(0);
    // Auto discontinuity from the first content to the second content period.
    assertThat(oldPositions.get(1).periodIndex).isEqualTo(1);
    assertThat(oldPositions.get(1).adGroupIndex).isEqualTo(-1);
    assertThat(newPositions.get(1).periodIndex).isEqualTo(4);
    assertThat(newPositions.get(1).adGroupIndex).isEqualTo(-1);
    assertThat(newPositions.get(1).positionMs).isEqualTo(1250);
    // Auto discontinuity from the second content period to the last frame of the last ad period.
    assertThat(oldPositions.get(2).periodIndex).isEqualTo(4);
    assertThat(oldPositions.get(2).adGroupIndex).isEqualTo(-1);
    assertThat(newPositions.get(2).periodIndex).isEqualTo(7);
    assertThat(newPositions.get(2).adGroupIndex).isEqualTo(-1);
    assertThat(newPositions.get(2).positionMs).isEqualTo(2500);
}
Also used : Arrays(java.util.Arrays) ArgumentMatchers(org.mockito.ArgumentMatchers) COMMAND_SEEK_TO_NEXT_MEDIA_ITEM(com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Uri(android.net.Uri) BinaryFrame(com.google.android.exoplayer2.metadata.id3.BinaryFrame) TrackGroupArray(com.google.android.exoplayer2.source.TrackGroupArray) FakeTrackSelector(com.google.android.exoplayer2.testutil.FakeTrackSelector) TestExoPlayerBuilder(com.google.android.exoplayer2.testutil.TestExoPlayerBuilder) NoUidTimeline(com.google.android.exoplayer2.testutil.NoUidTimeline) COMMAND_SEEK_TO_PREVIOUS(com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_PREVIOUS) ExoPlayerTestRunner(com.google.android.exoplayer2.testutil.ExoPlayerTestRunner) TestPlayerRunHelper.runUntilTimelineChanged(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper.runUntilTimelineChanged) MimeTypes(com.google.android.exoplayer2.util.MimeTypes) TestPlayerRunHelper.playUntilStartOfMediaItem(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper.playUntilStartOfMediaItem) COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM(com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM) Looper(android.os.Looper) MediaPeriod(com.google.android.exoplayer2.source.MediaPeriod) FakeSampleStream(com.google.android.exoplayer2.testutil.FakeSampleStream) COMMAND_GET_TRACK_INFOS(com.google.android.exoplayer2.Player.COMMAND_GET_TRACK_INFOS) TextInformationFrame(com.google.android.exoplayer2.metadata.id3.TextInformationFrame) TransferListener(com.google.android.exoplayer2.upstream.TransferListener) PlayerRunnable(com.google.android.exoplayer2.testutil.ActionSchedule.PlayerRunnable) Surface(android.view.Surface) DEFAULT_WINDOW_DURATION_US(com.google.android.exoplayer2.testutil.FakeTimeline.TimelineWindowDefinition.DEFAULT_WINDOW_DURATION_US) Mockito.atLeastOnce(org.mockito.Mockito.atLeastOnce) Range(com.google.common.collect.Range) FakeClock(com.google.android.exoplayer2.testutil.FakeClock) CountDownLatch(java.util.concurrent.CountDownLatch) COMMAND_STOP(com.google.android.exoplayer2.Player.COMMAND_STOP) Nullable(androidx.annotation.Nullable) ArgumentMatchers.anyFloat(org.mockito.ArgumentMatchers.anyFloat) ServerSideAdInsertionMediaSource(com.google.android.exoplayer2.source.ads.ServerSideAdInsertionMediaSource) COMMAND_GET_TEXT(com.google.android.exoplayer2.Player.COMMAND_GET_TEXT) Mockito.mock(org.mockito.Mockito.mock) FakeAdaptiveMediaSource(com.google.android.exoplayer2.testutil.FakeAdaptiveMediaSource) TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled) Iterables(com.google.common.collect.Iterables) COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM(com.google.android.exoplayer2.Player.COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM) AdPlaybackState(com.google.android.exoplayer2.source.ads.AdPlaybackState) RunWith(org.junit.runner.RunWith) Config(org.robolectric.annotation.Config) SinglePeriodTimeline(com.google.android.exoplayer2.source.SinglePeriodTimeline) ArgumentMatchers.anyBoolean(org.mockito.ArgumentMatchers.anyBoolean) ArrayList(java.util.ArrayList) Listener(com.google.android.exoplayer2.Player.Listener) Assert.assertArrayEquals(org.junit.Assert.assertArrayEquals) TestPlayerRunHelper.runUntilPositionDiscontinuity(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper.runUntilPositionDiscontinuity) FakeChunkSource(com.google.android.exoplayer2.testutil.FakeChunkSource) MediaSourceEventListener(com.google.android.exoplayer2.source.MediaSourceEventListener) Before(org.junit.Before) DiscontinuityReason(com.google.android.exoplayer2.Player.DiscontinuityReason) COMMAND_GET_CURRENT_MEDIA_ITEM(com.google.android.exoplayer2.Player.COMMAND_GET_CURRENT_MEDIA_ITEM) Clock(com.google.android.exoplayer2.util.Clock) ShadowLooper(org.robolectric.shadows.ShadowLooper) COMMAND_GET_TIMELINE(com.google.android.exoplayer2.Player.COMMAND_GET_TIMELINE) PlayerTarget(com.google.android.exoplayer2.testutil.ActionSchedule.PlayerTarget) COMMAND_SET_TRACK_SELECTION_PARAMETERS(com.google.android.exoplayer2.Player.COMMAND_SET_TRACK_SELECTION_PARAMETERS) TestPlayerRunHelper.runUntilReceiveOffloadSchedulingEnabledNewState(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper.runUntilReceiveOffloadSchedulingEnabledNewState) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) Test(org.junit.Test) TrackSelectionArray(com.google.android.exoplayer2.trackselection.TrackSelectionArray) TestUtil.assertTimelinesSame(com.google.android.exoplayer2.testutil.TestUtil.assertTimelinesSame) TestPlayerRunHelper(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper) AtomicLong(java.util.concurrent.atomic.AtomicLong) Mockito.never(org.mockito.Mockito.never) COMMAND_SEEK_TO_DEFAULT_POSITION(com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_DEFAULT_POSITION) COMMAND_GET_AUDIO_ATTRIBUTES(com.google.android.exoplayer2.Player.COMMAND_GET_AUDIO_ATTRIBUTES) MaskingMediaSource(com.google.android.exoplayer2.source.MaskingMediaSource) Loader(com.google.android.exoplayer2.upstream.Loader) FakeShuffleOrder(com.google.android.exoplayer2.testutil.FakeShuffleOrder) DrmSessionManager(com.google.android.exoplayer2.drm.DrmSessionManager) Mockito.reset(org.mockito.Mockito.reset) COMMAND_PREPARE(com.google.android.exoplayer2.Player.COMMAND_PREPARE) Assertions(com.google.android.exoplayer2.util.Assertions) COMMAND_CHANGE_MEDIA_ITEMS(com.google.android.exoplayer2.Player.COMMAND_CHANGE_MEDIA_ITEMS) Util(com.google.android.exoplayer2.util.Util) MediaPeriodId(com.google.android.exoplayer2.source.MediaSource.MediaPeriodId) FakeMediaClockRenderer(com.google.android.exoplayer2.testutil.FakeMediaClockRenderer) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) COMMAND_SEEK_TO_NEXT(com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_NEXT) ConcatenatingMediaSource(com.google.android.exoplayer2.source.ConcatenatingMediaSource) Random(java.util.Random) TestPlayerRunHelper.playUntilPosition(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper.playUntilPosition) AndroidJUnit4(androidx.test.ext.junit.runners.AndroidJUnit4) ApplicationProvider(androidx.test.core.app.ApplicationProvider) ArgumentMatcher(org.mockito.ArgumentMatcher) Allocation(com.google.android.exoplayer2.upstream.Allocation) COMMAND_SET_VOLUME(com.google.android.exoplayer2.Player.COMMAND_SET_VOLUME) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServerSideAdInsertionUtil.addAdGroupToAdPlaybackState(com.google.android.exoplayer2.source.ads.ServerSideAdInsertionUtil.addAdGroupToAdPlaybackState) Mockito.atLeast(org.mockito.Mockito.atLeast) DefaultTrackSelector(com.google.android.exoplayer2.trackselection.DefaultTrackSelector) Assert.fail(org.junit.Assert.fail) COMMAND_SEEK_BACK(com.google.android.exoplayer2.Player.COMMAND_SEEK_BACK) MediaSource(com.google.android.exoplayer2.source.MediaSource) ActionSchedule(com.google.android.exoplayer2.testutil.ActionSchedule) COMMAND_GET_MEDIA_ITEMS_METADATA(com.google.android.exoplayer2.Player.COMMAND_GET_MEDIA_ITEMS_METADATA) RobolectricUtil.runMainLooperUntil(com.google.android.exoplayer2.robolectric.RobolectricUtil.runMainLooperUntil) TestPlayerRunHelper.runUntilPlaybackState(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper.runUntilPlaybackState) END_OF_STREAM_ITEM(com.google.android.exoplayer2.testutil.FakeSampleStream.FakeSampleStreamItem.END_OF_STREAM_ITEM) COMMAND_ADJUST_DEVICE_VOLUME(com.google.android.exoplayer2.Player.COMMAND_ADJUST_DEVICE_VOLUME) TrackGroup(com.google.android.exoplayer2.source.TrackGroup) Collectors(java.util.stream.Collectors) COMMAND_SET_REPEAT_MODE(com.google.android.exoplayer2.Player.COMMAND_SET_REPEAT_MODE) COMMAND_SET_SHUFFLE_MODE(com.google.android.exoplayer2.Player.COMMAND_SET_SHUFFLE_MODE) FakeSampleStreamItem.oneByteSample(com.google.android.exoplayer2.testutil.FakeSampleStream.FakeSampleStreamItem.oneByteSample) List(java.util.List) FakeTimeline(com.google.android.exoplayer2.testutil.FakeTimeline) COMMAND_GET_VOLUME(com.google.android.exoplayer2.Player.COMMAND_GET_VOLUME) Mockito.inOrder(org.mockito.Mockito.inOrder) FakeVideoRenderer(com.google.android.exoplayer2.testutil.FakeVideoRenderer) FakeAdaptiveDataSet(com.google.android.exoplayer2.testutil.FakeAdaptiveDataSet) COMMAND_PLAY_PAUSE(com.google.android.exoplayer2.Player.COMMAND_PLAY_PAUSE) Action(com.google.android.exoplayer2.testutil.Action) AdditionalMatchers.not(org.mockito.AdditionalMatchers.not) AudioAttributes(com.google.android.exoplayer2.audio.AudioAttributes) Metadata(com.google.android.exoplayer2.metadata.Metadata) CompositeMediaSource(com.google.android.exoplayer2.source.CompositeMediaSource) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) AnalyticsListener(com.google.android.exoplayer2.analytics.AnalyticsListener) COMMAND_GET_DEVICE_VOLUME(com.google.android.exoplayer2.Player.COMMAND_GET_DEVICE_VOLUME) COMMAND_SEEK_FORWARD(com.google.android.exoplayer2.Player.COMMAND_SEEK_FORWARD) Context(android.content.Context) COMMAND_SEEK_TO_MEDIA_ITEM(com.google.android.exoplayer2.Player.COMMAND_SEEK_TO_MEDIA_ITEM) COMMAND_SET_MEDIA_ITEMS_METADATA(com.google.android.exoplayer2.Player.COMMAND_SET_MEDIA_ITEMS_METADATA) DEFAULT_WINDOW_OFFSET_IN_FIRST_PERIOD_US(com.google.android.exoplayer2.testutil.FakeTimeline.TimelineWindowDefinition.DEFAULT_WINDOW_OFFSET_IN_FIRST_PERIOD_US) TimelineWindowDefinition(com.google.android.exoplayer2.testutil.FakeTimeline.TimelineWindowDefinition) Assert.assertThrows(org.junit.Assert.assertThrows) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Intent(android.content.Intent) AtomicReference(java.util.concurrent.atomic.AtomicReference) STATE_ENDED(com.google.android.exoplayer2.Player.STATE_ENDED) Shadows.shadowOf(org.robolectric.Shadows.shadowOf) AudioManager(android.media.AudioManager) HashSet(java.util.HashSet) ArgumentCaptor(org.mockito.ArgumentCaptor) ShadowAudioManager(org.robolectric.shadows.ShadowAudioManager) DrmSessionEventListener(com.google.android.exoplayer2.drm.DrmSessionEventListener) ImmutableList(com.google.common.collect.ImmutableList) TestPlayerRunHelper.runUntilSleepingForOffload(com.google.android.exoplayer2.robolectric.TestPlayerRunHelper.runUntilSleepingForOffload) FakeRenderer(com.google.android.exoplayer2.testutil.FakeRenderer) COMMAND_SET_DEVICE_VOLUME(com.google.android.exoplayer2.Player.COMMAND_SET_DEVICE_VOLUME) ArgumentMatchers.anyInt(org.mockito.ArgumentMatchers.anyInt) ClippingMediaSource(com.google.android.exoplayer2.source.ClippingMediaSource) COMMAND_SET_SPEED_AND_PITCH(com.google.android.exoplayer2.Player.COMMAND_SET_SPEED_AND_PITCH) Allocator(com.google.android.exoplayer2.upstream.Allocator) SurfaceTexture(android.graphics.SurfaceTexture) COMMAND_SET_VIDEO_SURFACE(com.google.android.exoplayer2.Player.COMMAND_SET_VIDEO_SURFACE) Window(com.google.android.exoplayer2.Timeline.Window) FakeSampleStreamItem(com.google.android.exoplayer2.testutil.FakeSampleStream.FakeSampleStreamItem) InOrder(org.mockito.InOrder) PositionInfo(com.google.android.exoplayer2.Player.PositionInfo) Truth.assertThat(com.google.common.truth.Truth.assertThat) FakeMediaPeriod(com.google.android.exoplayer2.testutil.FakeMediaPeriod) Mockito.verify(org.mockito.Mockito.verify) FakeDataSource(com.google.android.exoplayer2.testutil.FakeDataSource) FakeMediaSource(com.google.android.exoplayer2.testutil.FakeMediaSource) FakeMediaSourceFactory(com.google.android.exoplayer2.testutil.FakeMediaSourceFactory) Mockito(org.mockito.Mockito) FakeTrackSelection(com.google.android.exoplayer2.testutil.FakeTrackSelection) Collections(java.util.Collections) 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) FakeMediaSource(com.google.android.exoplayer2.testutil.FakeMediaSource) AtomicReference(java.util.concurrent.atomic.AtomicReference) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServerSideAdInsertionMediaSource(com.google.android.exoplayer2.source.ads.ServerSideAdInsertionMediaSource) FakeTimeline(com.google.android.exoplayer2.testutil.FakeTimeline) PositionInfo(com.google.android.exoplayer2.Player.PositionInfo) TestExoPlayerBuilder(com.google.android.exoplayer2.testutil.TestExoPlayerBuilder) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)248 FakeMediaSource (com.google.android.exoplayer2.testutil.FakeMediaSource)179 TestExoPlayerBuilder (com.google.android.exoplayer2.testutil.TestExoPlayerBuilder)172 FakeTimeline (com.google.android.exoplayer2.testutil.FakeTimeline)121 PlayerRunnable (com.google.android.exoplayer2.testutil.ActionSchedule.PlayerRunnable)108 ActionSchedule (com.google.android.exoplayer2.testutil.ActionSchedule)92 SinglePeriodTimeline (com.google.android.exoplayer2.source.SinglePeriodTimeline)89 NoUidTimeline (com.google.android.exoplayer2.testutil.NoUidTimeline)89 Listener (com.google.android.exoplayer2.Player.Listener)85 TimelineWindowDefinition (com.google.android.exoplayer2.testutil.FakeTimeline.TimelineWindowDefinition)73 ExoPlayerTestRunner (com.google.android.exoplayer2.testutil.ExoPlayerTestRunner)67 ConcatenatingMediaSource (com.google.android.exoplayer2.source.ConcatenatingMediaSource)65 MediaSource (com.google.android.exoplayer2.source.MediaSource)55 FakeClock (com.google.android.exoplayer2.testutil.FakeClock)48 ClippingMediaSource (com.google.android.exoplayer2.source.ClippingMediaSource)47 CompositeMediaSource (com.google.android.exoplayer2.source.CompositeMediaSource)47 MaskingMediaSource (com.google.android.exoplayer2.source.MaskingMediaSource)47 ServerSideAdInsertionMediaSource (com.google.android.exoplayer2.source.ads.ServerSideAdInsertionMediaSource)47 FakeAdaptiveMediaSource (com.google.android.exoplayer2.testutil.FakeAdaptiveMediaSource)47 ExoPlayer (com.google.android.exoplayer2.ExoPlayer)44