@Override protected void onEnabled(boolean joining) throws ExoPlaybackException { decoderCounters = new DecoderCounters(); }
/** * @param tag A tag to use for logging. * @param expectedPlayingTimeMs The expected playing time. If set to a non-negative value, the * test will assert that the total time spent playing the media was within * {@link #MAX_PLAYING_TIME_DISCREPANCY_MS} of the specified value. * {@link #EXPECTED_PLAYING_TIME_MEDIA_DURATION_MS} should be passed to assert that the * expected playing time equals the duration of the media being played. Else * {@link #EXPECTED_PLAYING_TIME_UNSET} should be passed to indicate that the test should not * assert an expected playing time. * @param failOnPlayerError Whether a player error should be considered a test failure. */ public ExoHostedTest(String tag, long expectedPlayingTimeMs, boolean failOnPlayerError) { this.tag = tag; this.expectedPlayingTimeMs = expectedPlayingTimeMs; this.failOnPlayerError = failOnPlayerError; this.testFinished = new ConditionVariable(); this.videoDecoderCounters = new DecoderCounters(); this.audioDecoderCounters = new DecoderCounters(); }
@Override protected void onEnabled(boolean joining) throws ExoPlaybackException { decoderCounters = new DecoderCounters(); eventDispatcher.enabled(decoderCounters); }
/** * @param tag A tag to use for logging. * @param expectedPlayingTimeMs The expected playing time. If set to a non-negative value, the * test will assert that the total time spent playing the media was within * {@link #MAX_PLAYING_TIME_DISCREPANCY_MS} of the specified value. * {@link #EXPECTED_PLAYING_TIME_MEDIA_DURATION_MS} should be passed to assert that the * expected playing time equals the duration of the media being played. Else * {@link #EXPECTED_PLAYING_TIME_UNSET} should be passed to indicate that the test should not * assert an expected playing time. * @param failOnPlayerError Whether a player error should be considered a test failure. */ public ExoHostedTest(String tag, long expectedPlayingTimeMs, boolean failOnPlayerError) { this.tag = tag; this.expectedPlayingTimeMs = expectedPlayingTimeMs; this.failOnPlayerError = failOnPlayerError; this.testFinished = new ConditionVariable(); this.videoDecoderCounters = new DecoderCounters(); this.audioDecoderCounters = new DecoderCounters(); }
public FakeVideoRenderer(Handler handler, VideoRendererEventListener eventListener) { super(Builder.VIDEO_FORMAT); eventDispatcher = new VideoRendererEventListener.EventDispatcher(handler, eventListener); decoderCounters = new DecoderCounters(); }
public FakeAudioRenderer(Handler handler, AudioRendererEventListener eventListener) { super(Builder.AUDIO_FORMAT); eventDispatcher = new AudioRendererEventListener.EventDispatcher(handler, eventListener); decoderCounters = new DecoderCounters(); }
@Override protected void onEnabled(boolean joining) throws ExoPlaybackException { decoderCounters = new DecoderCounters(); eventDispatcher.enabled(decoderCounters); int tunnelingAudioSessionId = getConfiguration().tunnelingAudioSessionId; if (tunnelingAudioSessionId != C.AUDIO_SESSION_ID_UNSET) { audioSink.enableTunnelingV21(tunnelingAudioSessionId); } else { audioSink.disableTunneling(); } }