Search in sources :

Example 1 with RenderersFactory

use of androidx.media3.exoplayer.RenderersFactory in project media by androidx.

the class SampleChooserActivity method onSampleDownloadButtonClicked.

private void onSampleDownloadButtonClicked(PlaylistHolder playlistHolder) {
    int downloadUnsupportedStringId = getDownloadUnsupportedStringId(playlistHolder);
    if (downloadUnsupportedStringId != 0) {
        Toast.makeText(getApplicationContext(), downloadUnsupportedStringId, Toast.LENGTH_LONG).show();
    } else {
        RenderersFactory renderersFactory = DemoUtil.buildRenderersFactory(/* context= */
        this, isNonNullAndChecked(preferExtensionDecodersMenuItem));
        downloadTracker.toggleDownload(getSupportFragmentManager(), playlistHolder.mediaItems.get(0), renderersFactory);
    }
}
Also used : RenderersFactory(androidx.media3.exoplayer.RenderersFactory)

Example 2 with RenderersFactory

use of androidx.media3.exoplayer.RenderersFactory in project media by androidx.

the class DownloadHelper method getRendererCapabilities.

/**
 * Extracts renderer capabilities for the renderers created by the provided renderers factory.
 *
 * @param renderersFactory A {@link RenderersFactory}.
 * @return The {@link RendererCapabilities} for each renderer created by the {@code
 *     renderersFactory}.
 */
public static RendererCapabilities[] getRendererCapabilities(RenderersFactory renderersFactory) {
    Renderer[] renderers = renderersFactory.createRenderers(Util.createHandlerForCurrentOrMainLooper(), new VideoRendererEventListener() {
    }, new AudioRendererEventListener() {
    }, (cues) -> {
    }, (metadata) -> {
    });
    RendererCapabilities[] capabilities = new RendererCapabilities[renderers.length];
    for (int i = 0; i < renderers.length; i++) {
        capabilities[i] = renderers[i].getCapabilities();
    }
    return capabilities;
}
Also used : Renderer(androidx.media3.exoplayer.Renderer) VideoRendererEventListener(androidx.media3.exoplayer.video.VideoRendererEventListener) AudioRendererEventListener(androidx.media3.exoplayer.audio.AudioRendererEventListener) RendererCapabilities(androidx.media3.exoplayer.RendererCapabilities)

Example 3 with RenderersFactory

use of androidx.media3.exoplayer.RenderersFactory in project media by androidx.

the class DefaultAnalyticsCollectorTest method onPlayerError_thrownDuringRenderAtPeriodTransition_isReportedForNewPeriod.

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

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

Example 4 with RenderersFactory

use of androidx.media3.exoplayer.RenderersFactory in project media by androidx.

the class DefaultAnalyticsCollectorTest method runAnalyticsTest.

private static TestAnalyticsListener runAnalyticsTest(MediaSource mediaSource, @Nullable ActionSchedule actionSchedule, RenderersFactory renderersFactory) throws Exception {
    Surface surface = new Surface(new SurfaceTexture(/* texName= */
    0));
    TestAnalyticsListener listener = new TestAnalyticsListener();
    try {
        new ExoPlayerTestRunner.Builder(ApplicationProvider.getApplicationContext()).setMediaSources(mediaSource).setRenderersFactory(renderersFactory).setVideoSurface(surface).setAnalyticsListener(listener).setActionSchedule(actionSchedule).build().start().blockUntilActionScheduleFinished(TIMEOUT_MS).blockUntilEnded(TIMEOUT_MS);
    } catch (ExoPlaybackException e) {
    // Ignore ExoPlaybackException as these may be expected.
    } finally {
        surface.release();
    }
    return listener;
}
Also used : SurfaceTexture(android.graphics.SurfaceTexture) ExoPlaybackException(androidx.media3.exoplayer.ExoPlaybackException) ExoPlayerTestRunner(androidx.media3.test.utils.ExoPlayerTestRunner) Surface(android.view.Surface)

Example 5 with RenderersFactory

use of androidx.media3.exoplayer.RenderersFactory in project media by androidx.

the class DefaultAnalyticsCollectorTest method onPlayerError_thrownDuringRendererEnableAtPeriodTransition_isReportedForNewPeriod.

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

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

Aggregations

ExoPlayer (androidx.media3.exoplayer.ExoPlayer)10 SurfaceTexture (android.graphics.SurfaceTexture)9 Surface (android.view.Surface)9 Test (org.junit.Test)9 MediaItem (androidx.media3.common.MediaItem)8 Timeline (androidx.media3.common.Timeline)8 FakeClock (androidx.media3.test.utils.FakeClock)8 FakeMediaSource (androidx.media3.test.utils.FakeMediaSource)8 FakeTimeline (androidx.media3.test.utils.FakeTimeline)8 ApplicationProvider (androidx.test.core.app.ApplicationProvider)8 AndroidJUnit4 (androidx.test.ext.junit.runners.AndroidJUnit4)8 Truth.assertThat (com.google.common.truth.Truth.assertThat)8 AtomicReference (java.util.concurrent.atomic.AtomicReference)8 RunWith (org.junit.runner.RunWith)8 AdPlaybackState (androidx.media3.common.AdPlaybackState)7 Player (androidx.media3.common.Player)7 ArgumentMatchers.any (org.mockito.ArgumentMatchers.any)7 ArgumentMatchers.anyInt (org.mockito.ArgumentMatchers.anyInt)7 ArgumentMatchers.eq (org.mockito.ArgumentMatchers.eq)7 Mockito.mock (org.mockito.Mockito.mock)7