com.google.android.exoplayer2.audio.DefaultAudioSink Java Examples
The following examples show how to use
com.google.android.exoplayer2.audio.DefaultAudioSink.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UnexpectedErrorMapper.java From no-player with Apache License 2.0 | 6 votes |
static NoPlayer.PlayerError map(RuntimeException unexpectedException, String message) { if (unexpectedException instanceof EGLSurfaceTexture.GlException) { return new NoPlayerError(PlayerErrorType.UNEXPECTED, DetailErrorType.EGL_OPERATION_ERROR, message); } if (unexpectedException instanceof DefaultAudioSink.InvalidAudioTrackTimestampException) { return new NoPlayerError(PlayerErrorType.UNEXPECTED, DetailErrorType.SPURIOUS_AUDIO_TRACK_TIMESTAMP_ERROR, message); } if (unexpectedException instanceof IllegalStateException && message.contains("Multiple renderer media clocks")) { return new NoPlayerError(PlayerErrorType.UNEXPECTED, DetailErrorType.MULTIPLE_RENDERER_MEDIA_CLOCK_ENABLED_ERROR, message); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && unexpectedException instanceof MediaCodec.CodecException) { String errorMessage = ErrorFormatter.formatCodecException((MediaCodec.CodecException) unexpectedException); return new NoPlayerError(PlayerErrorType.UNEXPECTED, DetailErrorType.UNEXPECTED_CODEC_ERROR, errorMessage); } return new NoPlayerError(PlayerErrorType.UNKNOWN, DetailErrorType.UNKNOWN, message); }
Example #2
Source File: FfmpegAudioRenderer.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
/** * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be * null if delivery of events is not required. * @param eventListener A listener of events. May be null if delivery of events is not required. * @param audioProcessors Optional {@link AudioProcessor}s that will process audio before output. */ public FfmpegAudioRenderer( @Nullable Handler eventHandler, @Nullable AudioRendererEventListener eventListener, AudioProcessor... audioProcessors) { this( eventHandler, eventListener, new DefaultAudioSink(/* audioCapabilities= */ null, audioProcessors), /* enableFloatOutput= */ false); }
Example #3
Source File: FfmpegAudioRenderer.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
/** * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be * null if delivery of events is not required. * @param eventListener A listener of events. May be null if delivery of events is not required. * @param audioProcessors Optional {@link AudioProcessor}s that will process audio before output. */ public FfmpegAudioRenderer( @Nullable Handler eventHandler, @Nullable AudioRendererEventListener eventListener, AudioProcessor... audioProcessors) { this( eventHandler, eventListener, new DefaultAudioSink(/* audioCapabilities= */ null, audioProcessors), /* enableFloatOutput= */ false); }
Example #4
Source File: SoftAudioRenderer.java From DanDanPlayForAndroid with MIT License | 5 votes |
/** * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be * null if delivery of events is not required. * @param eventListener A listener of events. May be null if delivery of events is not required. * @param audioProcessors Optional {@link AudioProcessor}s that will process audio before output. */ public SoftAudioRenderer( @Nullable Handler eventHandler, @Nullable AudioRendererEventListener eventListener, AudioProcessor... audioProcessors) { this( eventHandler, eventListener, new DefaultAudioSink(/* audioCapabilities= */ null, audioProcessors), /* enableFloatOutput= */ false); }
Example #5
Source File: FfmpegAudioRenderer.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
/** * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be * null if delivery of events is not required. * @param eventListener A listener of events. May be null if delivery of events is not required. * @param audioProcessors Optional {@link AudioProcessor}s that will process audio before output. */ public FfmpegAudioRenderer( @Nullable Handler eventHandler, @Nullable AudioRendererEventListener eventListener, AudioProcessor... audioProcessors) { this( eventHandler, eventListener, new DefaultAudioSink(/* audioCapabilities= */ null, audioProcessors), /* enableFloatOutput= */ false); }
Example #6
Source File: FfmpegAudioRenderer.java From Telegram with GNU General Public License v2.0 | 5 votes |
/** * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be * null if delivery of events is not required. * @param eventListener A listener of events. May be null if delivery of events is not required. * @param audioProcessors Optional {@link AudioProcessor}s that will process audio before output. */ public FfmpegAudioRenderer( @Nullable Handler eventHandler, @Nullable AudioRendererEventListener eventListener, AudioProcessor... audioProcessors) { this( eventHandler, eventListener, new DefaultAudioSink(/* audioCapabilities= */ null, audioProcessors), /* enableFloatOutput= */ false); }