@Config(sdk = 19) @Test public void testSupportsFormatAtApi19() { assertThat(audioRenderer.supportsFormat(FORMAT)) .isEqualTo(ADAPTIVE_NOT_SEAMLESS | TUNNELING_NOT_SUPPORTED | FORMAT_HANDLED); }
@Override public final int supportsFormat(Format format) { if (!MimeTypes.isAudio(format.sampleMimeType)) { return FORMAT_UNSUPPORTED_TYPE; } int formatSupport = supportsFormatInternal(drmSessionManager, format); if (formatSupport <= FORMAT_UNSUPPORTED_DRM) { return formatSupport; } int tunnelingSupport = Util.SDK_INT >= 21 ? TUNNELING_SUPPORTED : TUNNELING_NOT_SUPPORTED; return ADAPTIVE_NOT_SEAMLESS | tunnelingSupport | formatSupport; }
SimpleDecoderAudioRenderer extends BaseRenderer implements MediaClock { @Override public final int supportsFormat(Format format) { if (!MimeTypes.isAudio(format.sampleMimeType)) { return FORMAT_UNSUPPORTED_TYPE; } int formatSupport = supportsFormatInternal(drmSessionManager, format); if (formatSupport <= FORMAT_UNSUPPORTED_DRM) { return formatSupport; } int tunnelingSupport = Util.SDK_INT >= 21 ? TUNNELING_SUPPORTED : TUNNELING_NOT_SUPPORTED; return ADAPTIVE_NOT_SEAMLESS | tunnelingSupport | formatSupport; } }
SimpleDecoderAudioRenderer extends BaseRenderer implements MediaClock { @Override public final int supportsFormat(Format format) { if (!MimeTypes.isAudio(format.sampleMimeType)) { return FORMAT_UNSUPPORTED_TYPE; } int formatSupport = supportsFormatInternal(drmSessionManager, format); if (formatSupport <= FORMAT_UNSUPPORTED_DRM) { return formatSupport; } int tunnelingSupport = Util.SDK_INT >= 21 ? TUNNELING_SUPPORTED : TUNNELING_NOT_SUPPORTED; return ADAPTIVE_NOT_SEAMLESS | tunnelingSupport | formatSupport; } SimpleDecoderAudioRenderer();  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      AudioProcessor... audioProcessors);  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      @Nullable AudioCapabilities audioCapabilities);  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      @Nullable AudioCapabilities audioCapabilities,
      @Nullable DrmSessionManager<ExoMediaCrypto> drmSessionManager,
      boolean playClearSamplesWithoutKeys,
      AudioProcessor... audioProcessors);  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      @Nullable DrmSessionManager<ExoMediaCrypto> drmSessionManager,
      boolean playClearSamplesWithoutKeys,
      AudioSink audioSink); }
SimpleDecoderAudioRenderer extends BaseRenderer implements MediaClock { @Override public final int supportsFormat(Format format) { if (!MimeTypes.isAudio(format.sampleMimeType)) { return FORMAT_UNSUPPORTED_TYPE; } int formatSupport = supportsFormatInternal(drmSessionManager, format); if (formatSupport <= FORMAT_UNSUPPORTED_DRM) { return formatSupport; } int tunnelingSupport = Util.SDK_INT >= 21 ? TUNNELING_SUPPORTED : TUNNELING_NOT_SUPPORTED; return ADAPTIVE_NOT_SEAMLESS | tunnelingSupport | formatSupport; } SimpleDecoderAudioRenderer();  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      AudioProcessor... audioProcessors);  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      @Nullable AudioCapabilities audioCapabilities);  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      @Nullable AudioCapabilities audioCapabilities,
      @Nullable DrmSessionManager<ExoMediaCrypto> drmSessionManager,
      boolean playClearSamplesWithoutKeys,
      AudioProcessor... audioProcessors);  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      @Nullable DrmSessionManager<ExoMediaCrypto> drmSessionManager,
      boolean playClearSamplesWithoutKeys,
      AudioSink audioSink); @Override MediaClock getMediaClock(); @Override final int supportsFormat(Format format); @Override void render(long positionUs, long elapsedRealtimeUs); @Override boolean isEnded(); @Override boolean isReady(); @Override long getPositionUs(); @Override PlaybackParameters setPlaybackParameters(PlaybackParameters playbackParameters); @Override PlaybackParameters getPlaybackParameters(); @Override void handleMessage(int messageType, @Nullable Object message); }
SimpleDecoderAudioRenderer extends BaseRenderer implements MediaClock { @Override public final int supportsFormat(Format format) { if (!MimeTypes.isAudio(format.sampleMimeType)) { return FORMAT_UNSUPPORTED_TYPE; } int formatSupport = supportsFormatInternal(drmSessionManager, format); if (formatSupport <= FORMAT_UNSUPPORTED_DRM) { return formatSupport; } int tunnelingSupport = Util.SDK_INT >= 21 ? TUNNELING_SUPPORTED : TUNNELING_NOT_SUPPORTED; return ADAPTIVE_NOT_SEAMLESS | tunnelingSupport | formatSupport; } SimpleDecoderAudioRenderer();  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      AudioProcessor... audioProcessors);  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      @Nullable AudioCapabilities audioCapabilities);  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      @Nullable AudioCapabilities audioCapabilities,
      @Nullable DrmSessionManager<ExoMediaCrypto> drmSessionManager,
      boolean playClearSamplesWithoutKeys,
      AudioProcessor... audioProcessors);  SimpleDecoderAudioRenderer(
      @Nullable Handler eventHandler,
      @Nullable AudioRendererEventListener eventListener,
      @Nullable DrmSessionManager<ExoMediaCrypto> drmSessionManager,
      boolean playClearSamplesWithoutKeys,
      AudioSink audioSink); @Override MediaClock getMediaClock(); @Override final int supportsFormat(Format format); @Override void render(long positionUs, long elapsedRealtimeUs); @Override boolean isEnded(); @Override boolean isReady(); @Override long getPositionUs(); @Override PlaybackParameters setPlaybackParameters(PlaybackParameters playbackParameters); @Override PlaybackParameters getPlaybackParameters(); @Override void handleMessage(int messageType, @Nullable Object message);  }